Overview

Solvers, solver interfaces & data integrations

The Nextmv Platform integrates with multiple solvers, solver interfaces (modeling), and data providers (both in-house and third-party). This allows you to use the best solution for the problem at hand.

Solvers and solver interfaces are configured to execute in Nextmv Cloud via runtimes. Data integrations can be specified with run configuration. Current supported integrations are listed in the tables below (with more planned).

Solvers

Provider DescriptionUse with Type
NextrouteFast and flexible vehicle routing problem (VRP) solver.Go (Nextmv SDK)Source-available (not open-source)
GurobiSolver for large-scale linear and mixed integer problems.PythonCommercial
HexalySolver for global optimization.PythonCommercial
SeekerHeuristic solver that specializes in stochastic optimization.PythonCommercial
FICO XpressSolver for large-scale linear and mixed integer problems.Go (Nextmv SDK), PythonCommercial
HiGHSSolver for linear and mixed integer problems.Go (Nextmv SDK), PythonOpen-source
OR-ToolsSolver interface for vehicle routing, flows, and more. Included open-source solvers: CLP, GLOP, PDLP, SCIP.Python, JavaOpen-source
VroomVehicle routing solver.PythonOpen-source

Solver interfaces

Provider DescriptionUse with Type
AMPLSolver interface that integrates with most solvers.PythonCommercial with open-source offering
PyomoOpen-source solver interface for linear and mixed integer programming. Included open-source solvers in remote environment: CBC, GLPK.PythonOpen-source
PyOptInterfaceOpen-source solver interface for linear and mixed integer programming.PythonOpen-source

The Pyomo and OR-Tools integrations support the specific solvers noted in the table and in the details for those integrations. If you would like to use a different solver (of any type, open source or commercial) with Pyomo or OR-Tools, or a different solver or solver interface that is not on the Nextmv Platform please contact Nextmv support.

Compatibility

All of the solvers we support are compatible with the following features of the Nextmv Platform:

When working locally with the Nextmv Platform make sure all necessary assets are up to date by running the following command:

nextmv sdk install
Copy

Languages

Considerations for each supported language are outlined in the following sections.

Go (Nextmv SDK)

Use a different solver with the SolverProvider argument given to the NewSolver function:


// Create a solver.
solver := highs.NewSolver(model)

// Solve the model and get the solution.
solution, err := solver.Solve(options.Solve)
Copy

Use the correct app.yaml manifest that specifies how to execute the app in the Cloud:

# This manifest holds the information the app needs to run on the Nextmv Cloud.
type: go
runtime: ghcr.io/nextmv-io/runtime/default:latest

# Directives to build a Go binary from the app.
build:
  command: go build -o main .
  environment:
    GOOS: linux
    GOARCH: arm64
    CGO_ENABLED: 1
    CC: "zig cc -target aarch64-linux-musl"

# List all files/directories that should be included in the app. Globbing
# (e.g.: configs/*.json) is supported.
files:
  - main
Copy
  • 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.

When working with the Nextmv SDK there are options for controlling each solver specifically. Information about these options are included on the details page for each solver.

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 Nextmv 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.

# 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
# List all files/directories that should be included in the app. Globbing
# (e.g.: configs/*.json) is supported.
files:
  - main.py
python:
  # Packages the app depends on need to be listed in a requirements.txt file
  # that is referenced here. All listed packages will get bundled with the app.
  pip-requirements: requirements.txt
Copy
  • 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 the main.py needs to be included.

Java

Make sure that you build a main.jar, as the runtime only supports executing a single .jar file. Run the following command:

mvn package
Copy

Use the correct app.yaml manifest that specifies how top execute the app in the Cloud.

# This manifest holds the information the app needs to run on the Nextmv Cloud.
type: java
runtime: ghcr.io/nextmv-io/runtime/java:latest

# Directives to compile a binary from the app.
pre-push: mvn package

# List all files/directories that should be included in the app. Globbing
# (e.g.: configs/*.json) is supported.
files:
  - main.jar
Copy
  • 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, only main.jar is supported.

Page last updated

Go to on-page nav menu