Skip to content

Latest commit

 

History

History
48 lines (32 loc) · 855 Bytes

README.md

File metadata and controls

48 lines (32 loc) · 855 Bytes

Nextmv Python CPLEX Knapsack

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

  1. Install packages.

    • With pip

      pip install .
    • With uv

      uv sync
  2. Run the app.

    • With python

      cat input.json | python main.py
    • With uv

      cat input.json | uv run main.py

      Or with custom options:

      cat input.json | uv run main.py -duration 30

Next steps

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