Skip to content

ladymeyy/nutritionist

 
 

Repository files navigation

nutritionist

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

Project Architecture:

screen shot 2018-08-27 at 16 08 38


Background

As presented at the Revesim Summit 2018 presentation

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.

screen shot 2018-08-27 at 16 13 20

After modeling our problem as CSP, we modeled the solutions as solutions of Genetic Algorithm:

screen shot 2018-08-27 at 16 15 24

finally, this is our Genetic Algorithm flow:

screen shot 2018-08-27 at 15 50 04


Activation:

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.

  1. Download / clone project

  2. Build & run planner container : cd planner /planner $ scripts/run.sh build /planner $ scripts/run.sh up

  3. 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:

    screen shot 2018-08-27 at 11 52 44

For an example Activation - copy request from: planner ->test->testData->request.json and insert it to the swaggerUI. It should look like :

screen shot 2018-08-27 at 13 57 03

Then if everything works like expected your results should look like:

screen shot 2018-08-27 at 13 54 03

Activation of all microservices:

  1. Build all microservices: $ ./runMeToBuildApp.sh
  2. Start all microservices: $ cd planner $ docker-compose -f docker-compose-all.local.yml up
  3. Load nutrition data to MongoDB:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 88.8%
  • Shell 6.9%
  • Dockerfile 4.3%