Example of solving a Vehicle Routing Problem using OR-Tools.
The app is hosted, managed and versioned by Nextmv..
Install requirements:
pip3 install -r requirements.txt
Run the command below to check that everything works as expected:
python3 main.py -input input.json -output output.json -duration 30
A file output.json
should have been created with the solution.
Push the app to Nextmv:
nextmv app push -a farmshare-ortools
Make a run:
nextmv app run -a farmshare-ortools -i input.json -w > output.json
Create a new instance with a new version of the app:
VERSION_ID=$(git rev-parse --short HEAD)
nextmv app version create \
-a farmshare-ortools \
-n $VERSION_ID \
-v $VERSION_ID
nextmv app instance create \
-a farmshare-ortools \
-v $VERSION_ID \
-i candidate-1 \
-n "Test candidate 1"