Constrained integer optimisation of McDonalds meals
Install locally and run some quick tests:
python setup.py develop
python setup.py test
(Alternatively may install using pip install -e .
and/or test with pytest directly using pytest
)
See the example_diets.py
script for example usage
Building the problem and solving it requires PuLP, which comes with a preconfigured MIP solver called CBC. These should be automatically installed by setuptools when installing the package.
Price data is scraped from Uber Eats, nutritional information is scraped from McDonalds, and the two manually merged. The resulting data is stored as static json files in the /assets
directory. Note that the data hasn't been updated since 2017-12 and is due for a freshen up!
- constrain nutrition, minimise price
- constrain price, maximise nutrition (or 'health')
- input validation
- allergens
- fractional solutions?