Skip to content

jack-mcivor/mcdiet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The McDiet

Constrained integer optimisation of McDonalds meals

Develop

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)

Usage

See the example_diets.py script for example usage

Requirements

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.

Data

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!

Roadmap

  • constrain nutrition, minimise price
  • constrain price, maximise nutrition (or 'health')
  • input validation
  • allergens
  • fractional solutions?

About

An optimal McDonalds diet

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages