Example for running a Python application on the Nextmv Platform using the Gurobi solver. We solve a knapsack Mixed Integer Programming problem.
If you have a Gurobi WSL license, remove the .template
extension from the
gurobi.lic.template
file and replace the contents with your actual license
key. Modify the app.yaml
file to include the gurobi.lic
in the files list.
-
Install packages.
pip3 install -r requirements.txt
-
Run the app.
python3 main.py -input input.json -output output.json -duration 30
Alternatively, you may reference the main.ipynb
Jupyter notebook which, in
addition to running locally, showcases how to push the app and run it remotely.