Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 882 Bytes

File metadata and controls

32 lines (23 loc) · 882 Bytes

Nextmv Python AMPL Knapsack

Example for running a Python application on the Nextmv Platform using the AMPL package. We solve a knapsack Mixed Integer Programming problem.

If you have an AMPL license, remove the .template extension from the ampl_license_uuid.template file and replace the contents with your actual license key. Modify the app.yaml file to include the ampl_license_uuid in the files list.

  1. Install packages.

    pip3 install -r requirements.txt
  2. Run the app.

    python3 main.py -input input.json -output output.json \
      -duration 30 -provider highs

Next steps

  • Open main.py and modify the model.
  • Visit our docs and blog. Need more assistance? Contact us!