This project is forked from a mutual project of Liron Blum & me. This project is identical to the original project we developed together but contains additional information (screenshots, presentation & background ) which will be presented by me at Reversim Summit 2018 - https://summit2018.reversim.com/session/5b0d4dfc4b330d00147e3374
When was the last time you wrote an algorithm to plan your diet?
Genetic Algorithm is known for being able to solve Constraint Satifaction Problems. Modeling our problem - what to eat in order to maintain a diat - as a Constraint Satifaction Problem helped to better understand the use of Genetic Algorithm.
After modeling our problem as CSP, we modeled the solutions as solutions of Genetic Algorithm:
finally, this is our Genetic Algorithm flow:
There are detailed activation instructions in each service Readme file. Here I will elborate on activating and getting results from the service 'planner' since this is the service which activates the Genetic Algorithm.
-
Download / clone project
-
Build & run planner container : cd planner /planner $ scripts/run.sh build /planner $ scripts/run.sh up
-
In order to make sure you did it all correctly go to the swaggerUI at this address: http://localhost:9122/docs/#/
screenshot of planner swaggerUI:
For an example Activation - copy request from: planner ->test->testData->request.json and insert it to the swaggerUI. It should look like :
Then if everything works like expected your results should look like:
- Build all microservices: $ ./runMeToBuildApp.sh
- Start all microservices: $ cd planner $ docker-compose -f docker-compose-all.local.yml up
- Load nutrition data to MongoDB:
- follow the instructions in this repo: https://github.com/schirinos/nutrient-db