Gurobi

Gurobi

Using Gurobi with Nextmv

Gurobi logo

Gurobi is a commercial solver that can be used to solve large-scale linear (LP) and mixed integer problems (MIP), as well as non-linear problems. Users can quickly identify precise, globally optimal solutions to complex nonlinear problems—from domains such as chemical engineering, electricity flow, and price optimization.

Get started

A community app is a great place to get started with the Gurobi integration. The Gurobi community apps ship with a gurobi.lic.template file that you can modify to include your Gurobi license.

Remove the .template extension and fill in the information with your actual license.

WLSACCESSID=secret-123
WLSSECRET=secret-123
LICENSEID=123
Copy

And then include the gurobi.lic file in the app.yaml manifest under files (see the last three lines):

# This manifest holds the information the app needs to run on the Nextmv Cloud.
type: python
runtime: ghcr.io/nextmv-io/runtime/python:3.11
python:
  # All listed packages will get bundled with the app.
  pip-requirements: requirements.txt

# List all files/directories that should be included in the app. Globbing
# (e.g.: configs/*.json) is supported.
files:
  - main.py
  # If you have a Gurobi license, uncomment the following line and make sure to
  # store your license information in that file.
  # - gurobi.lic
Copy

License

The Gurobi-Nextmv integration works with the WLS (Web License Server) licensing model. This means that you need to have a valid WLS Gurobi license to use this solver on the Nextmv Platform. Nextmv does not provide Gurobi licenses.

Languages & runtimes

Supported languages and available runtimes for Gurobi apps are listed in the table below. These properties must be defined in the app manifest for your app to run remotely.

Language Runtime
Pythonghcr.io/nextmv-io/runtime/python

Community apps

The community apps listed in the table below are set up to run with Gurobi.

Community app Description
python-gurobi-knapsackSolve a knapsack problem with Gurobi.

Clone a community app locally using Nextmv CLI:

nextmv community clone -a python-gurobi-knapsack
Copy

Page last updated

Go to on-page nav menu