Author: Vítor de Oliveira Pochmann (Otragal) Advisor: Fernando Von Zuben
This work belongs to this author's Master's project at the Faculty of Electrical and Computer Engineering - Unicamp (2020 - 2022).
This work is a multi-objective dietary recommendation system (bi-level system) that uses two solvers algorithms to find a set of daily meal menus (breakfast, lunch, dinner and snack).
The search for finding the best menu solutions is carried out using the Pareto-Optimum method, by the NSGA-II algorithm using objectives of each candidate solution, calculated by Gurobi solver.
Development environment used:
- Ubuntu 20.04 GNU Linux 64-bits
- Python Version 3.7 or greater (with virtual environment)
- SQLite3 (Database)
- [Gurobi Versão 9.1.0] or greater(https://www.gurobi.com/)
- \Multiobjective-Bilevel-Recommendation-System
- \database (backup Database with all food information and original prices)
- \dietprogram (\src of project)
- \app.py (main of project)
Performs git clone
cloning or zip download from master
repository.
- Create a virtual environment for this project (or just leave it on your machine).
- Download the project's dependent libraries with
pip3 install <library_name>
- sqlite3
- numpy
- unicodedata
- matplotlib
- pandas
- Have Gurobi and its license on your machine to use the libraries:
- gurobipy
NOTE: The used version of the Gurobi tool was Gurobi 9.1.0
. It is possible to download this version from the Official Site, but you can use the tool with the latest version.
Gurobi Solver is a proprietary tool from Gurobi Optimization company. It is possible to use this tool for free through the Academic License. If using it for other purposes, follow the procedures on the Official Site.
- Must log in and create an account in "Academic" view on Gurobi Optimization Official Website.
- Download the Gurobi tool from Gurobi Optimizer. É possível usar o Gurobi com Anaconda.
- LINUX (Ubuntu): There is an installation guide made by Unicamp or in the Documentation on Official Site.
- WINDOWS 64-bits: There is an installation guide made by the University of Mississippi or in Documentation on Official Site.
- MAC OS: In Documentation on Official Site
After installing the gurobi library on your machine, a license is required.
- Having accessed the account on the Official Website, the step of acquiring the Academic License begins.
- Accept the conditions and get the license.
- Accept the conditions and get the license.
- Place the license in the default system directory. Click here to see the Recommendation to put the license on your machine.
On Linux, it is recommended to place the license in the directory at /opt/gurobi
or opt/gurobiXXX
(XXX = version number).
Still on Linux, you must create a PATH
so that python understands that the Gurobi library exists. In your .bashrc
or .profile_bash
, insert these lines of code and make the necessary changes:
export GUROBI_HOME="/opt/gurobiXXX/linux64"
export PATH="${PATH}:${GUROBI_HOME}/bin"
export LD_LIBRARY_PATH="${GUROBI_HOME}/lib"
export GRB_LICENSE_FILE="/opt/gurobiXXX/linux64/gurobi.lic"