This how-to guide assumes you already completed the get started with MIP tutorial.
These are the supported solvers and solver interfaces for Mixed Integer Programming (MIP):
Provider | Description | Use with |
---|---|---|
Gurobi | Commercial solver. | Python |
FICO Xpress | Commercial solver. | Go (Nextmv SDK), Python |
HiGHS | Open-source solver. | Go (Nextmv SDK) |
OR-Tools | Open-source solver interface for various solvers. Included open-source solvers: CLP , GLOP , PDLP , SCIP . | Java, Python |
Pyomo | Open-source interface for various solvers. Included open-source solvers in Cloud: CBC , GLPK . | Python |
In case of Pyomo
and OR-Tools
we do support the specified solvers in the table above. If you want to use one of the commercial solvers that are supported by OR-Tools
, please contact our support.
All of the solvers we support are compatible with the following features of the Nextmv Platform:
- Running locally on your machine.
- Deploying to Nextmv Cloud.
- Running remotely on Nextmv Cloud.
- Testing and experimentation in Nextmv Cloud.
When working locally with the Nextmv Platform make sure all necessary assets are up to date by running the following command:
Please read the considerations for each supported language.
Go (Nextmv SDK)
Use a different solver with the SolverProvider
argument given to the NewSolver
function.
Use the correct app.yaml
manifest that specifies how to execute the app in the Cloud.
type
(do not modify this value): specifies that the app uses the Nextmv SDK.features
: a list of features that the app uses. At a minimum,sdk
must be set. Additionally, the solver-specific feature should be added.
As shown in the getting started tutorial, when working with the Nextmv SDK there are options for controlling each solver specifically. Detailed information about these options can be found under each solver section in the current page.
Visit the options reference for more detail on using solver control parameters.
Java
Make sure that you build a main.jar
, as the runtime only supports executing a single .jar
file. Run the following command:
Use the correct app.yaml
manifest that specifies how top execute the app in the Cloud.
type
(do not modify this value): specifies that the app uses Java instead of the Nextmv SDK.runtime
: specifies the docker runtime where the app is run. Please make sure that the runtime is one provided by Nextmv.files
: a list of all the files that should be included in the app. Currently, onlymain.jar
is supported.
Python
Python runtimes have no access to network calls. This means that importing other packages or performing HTTP requests are actions not yet available. If you would like more Python packages to be supported in the runtime, please contact support.
Make sure that the requirements described in the requirements.txt
file are installed when running locally.
Use the correct app.yaml
manifest that specifies how to execute the app in the Cloud.
type
(do not modify this value): specifies that the app uses Python instead of the Nextmv SDK.runtime
: specifies the docker runtime where the app is run. Please make sure that the runtime is one provided by Nextmv.files
: a list of all the files that should be included in the app. Globbing is supported, so you may specify individual files or whole directories. In a simple case, just themain.py
needs to be included.
Gurobi
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.
Learn more about the Gurobi integration on the supported solvers page.
FICO Xpress
Current supported version: v9.2.0
Xpress does not support darwin-arm64
(Apple Silicon) yet. If you are using an Apple Silicon machine, you can make local changes to the app and run remotely.
FICO Xpress is a commercial solver. Use it to solve for large-scale linear (LP) and mixed integer problems (MIP), as well as non-linear problems: NLP, MINLP, QP, QCQP, SOCP, MIQP, MIQCQP, MISOCP, MINLP, and CP.
- Use with Go (Nextmv SDK) and Python.
- Running locally with the Nextmv CLI and SDK is supported out of the box using the community license.
- Deploying, running and experimenting on an app in Nextmv Cloud requires that you are in the allow list. Please contact support.
FICO Xpress - Go (Nextmv SDK)
Use the correct app.yaml
manifest that specifies the xpress
feature.
FICO Xpress supports the use of these flags:
-solve.control.int
: parameters withint
values.-solve.control.float
: parameters withdouble
values.-solve.control.string
parameters withstring
values.
Please visit FICO Xpress' documentation for a full list of all the solver control parameters. Each parameter must be prefixed with XPRS_
.
Take the THREADS
parameter as an example:
The Type
indicates the data type of the parameter. In this case, it is an integer
. To set this parameter, use the -solve.control.int
flag as -solve.control.int "XPRS_THREADS=3"
.
Here is an example where out-of-the-box SDK options are set, alongside different Xpress-specific options. The Nextmv CLI is used. Notice that some options set multiple solver parameters.
Given that verbosity is set to high
, the console will show the solver's log (exposing that the options were set):
The output also shows the options that were used:
FICO Xpress - Python
Make sure that your app uses an app.yaml
manifest that specifies the xpress
runtime.
HiGHS
Current supported version: v1.3.0
HiGHS is an open-source solver. It is a high performance serial and parallel software for solving large-scale sparse linear programming (LP), mixed-integer programming (MIP) and quadratic programming (QP) models.
- Use with Go (Nextmv SDK).
- Does not require additional licensing or setup, for running locally or in Cloud.
HiGHS - Go (Nextmv SDK)
Use the correct app.yaml
manifest that specifies the highs
feature.
HiGHS supports the use of these flags:
-solve.control.int
: parameters withinteger
values.-solve.control.float
: parameters withdouble
values.-solve.control.string
parameters withstring
values.-solve.control.bool
: parameters withboolean
values.
Please visit HiGHS's documentation for a full list of all the solver control parameters.
Take the simplex_update_limit
parameter as an example:
The Type
indicates the data type of the parameter. In this case, it is an integer
. To set this parameter, use the -solve.control.int
flag as -solve.control.int "simplex_update_limit=10000"
.
Here is an example where out-of-the-box SDK options are set, alongside different HiGHS-specific options. The Nextmv CLI is used. Notice that some options set multiple solver parameters.
Given that verbosity is set to high
, the console will show the solver's log (exposing that the options were set):
The output also shows the options that were used:
OR-Tools
Current supported version: v9.6.2534
OR-Tools is an open-source solver interface. It is a software suite for optimization, tuned for tackling the world’s toughest problems in vehicle routing, flows, integer and linear programming, and constraint programming.
- Use with Python.
- OR-Tools bundles several solvers, so you do not need additional installations when running locally or in Cloud. Some of the solvers included are:
- Does not require additional licensing or setup, for running locally or in the Cloud.
Make sure that your app uses an app.yaml
manifest that specifies the ortools
runtime.
Pyomo
Current supported version: v6.6.2
Pyomo is an open-source solver interface. It is a Python-based, open-source optimization modeling language with a diverse set of optimization capabilities.
Use with Python.
Pyomo does not bundle any solvers, so you must install a solver separately when running locally. Read the installation notes for more information.
The
pyomo
runtime in Nextmv Cloud comes with the following solvers pre-installed:Please contact support if you would like to use a different solver in Nextmv Cloud.
Does not require additional licensing or setup (besides the solver), for running locally or in the Cloud.
Make sure that your app uses an app.yaml
manifest that specifies the pyomo
runtime.