Skip to content

Gurobi

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.

Tip

Learn how to get started using community apps with our tutorial: Explore new model - CLI.

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.

gurobi.lic.template
WLSACCESSID=secret-123
WLSSECRET=secret-123
LICENSEID=123

And then include the gurobi.lic file in the app.yaml manifest under files:

app.yaml
# 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: pyproject.toml # Can be a 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

configuration:
  # Specify the format the app reads and writes.
  content:
    format: json # Read JSON from stdin and write JSON to stdout.
  # Define the options (parameters) of the app.
  options:
    strict: false
    items:
      - name: duration
        option_type: int
        default: 30
        description: Max runtime duration (in seconds).
        required: false
        additional_attributes:
          min: 1
          max: 300
          step: 10
        ui:
          control_type: slider
          display_name: Duration

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.