This repository provides source code used for my bachelor-thesis at the University of Regensburg.
Either you use the source from the CD attached to the thesis or (recommended) the final commit from GitHub.
If you read this, you are using v0.1.0. Committed and taged by Friday the 29-03-2019. Due to the weekend I have to submit my printed thesis (attached with this code) 2 days before the deadline. I will fix some minor issues till Sunday night and tag the commit with v0.1.1.
$ git clone https://github.com/conpat/ba_diet-planner.git
$ git checkout v0.1.1
or copy the source code to your working directory
Install the dependencies.
$ cd ba_diet_planner
$ npm install
The CLI will give you rudimentary help about the available and .
$ node index.js -h
It's important to understand, that the entry point (in terms of code) is the main.js
. But to use the CLI you need to use the index.js
, this is due to the esm
package.
Basically you can run
- a single test.
- all tests together
- prepare the date for further evaluation
- show clients information
- plan and show a demo day
With the plain test
you run all three algorithms in all possible variations.
$ node index.js test
Adding the planner_version option <-1/-2/-3> you run the test just for one of the algorithms. This can be useful if you want create just the test date for one specific algorithm.
$ node index.js test -2
After running the tests, the results has to be prepared and exported for further evaluation. Again you can use options for exporting results from only one algorithm.
$ node index.js data
The demo can be used to see the the result of planing one day for a client with the chosen planner. In detail it shows:
- all the information of the client.
- all the meals and their information.
- the nutritional values of the planned day.
$ node index.js demo 3 A 99
The CLI help will show how to use it.
The client will prepare all clients (calculate the nutritional requirements) and log them to the console.
$ node index.js clients
There are more READMEs in subdirectories. Each will document the specific directory/files.
Copyright © 2019 Patrick Conrad