Gams

GAMS

Reference for using GAMS with Nextmv

GAMS

GAMS is a high level modeling system for mathematical programming and optimization. It consists of a language compiler and a range of associated solvers.

The GAMS modeling language allows modelers to quickly translate real world optimization problems into computer code. The gams language compiler then translates this code into a format the solvers can understand and solve. This architecture provides great flexibility, by making it possible to change the solvers used without changing the model formulation.

Get started

A community app is a great place to get started with the GAMS integration. You can work with any solver that your GAMS license supports. When running locally, be sure you’ve installed the required solver. (Read the GAMS installation notes for more information.)

When running remotely on Nextmv Platform:

  • If you are using a solver that is distributed via a Python package, use the requirements.txt file in your project to install the solver and bundle the dependency upon app push (e.g., for Gurobi use the gurobipy Python package, and the gurobi_direct provider with the SolverFactory). Read more in the app manifest section.
  • If you are using CBC, GLPK, or SCIP, a standalone installation is required., Use the ghcr.io/nextmv-io/runtime/pyomo runtime as this runtime comes with those solvers pre-installed.
  • If you want to use a different solver with GAMS on Nextmv Platform contact Nextmv support.

Make sure to specify the python runtime in your app’s app.yaml manifest:

# 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

Read more about using Python with Nextmv.

License

The GAMS-Nextmv integration works with a Bring Your Own License (BYOL) licensing model. The marketplace apps run using the GAMS demo license via GAMSPy. For use cases beyond the scope of a demo license, you will need a valid GAMS license to use this technology on the Nextmv Platform.

Languages & runtimes

Supported languages and available runtimes for GAMS 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:3.11
Pythonghcr.io/nextmv-io/runtime/python:3.11

Community apps

The community apps listed in the table below use GAMS.

Community app Description
python-gamspy-traveling-salesmanSolve a traveling salesman problem with GAMS
python-gams-cutstockSolve a cutstock problem with GAMS

Clone a community app locally using Nextmv CLI:

nextmv community clone -a python-gamspy-traveling-salesman
Copy

Marketplace apps

The GAMSpy Traveling Salesman and GAMS Cutstock apps in Nextmv Marketplace use Pyomo.

Sign up for a free Nextmv Cloud account to test out the GAMSPy Traveling Salesman and GAMS Cutstock apps.

Page last updated

Go to on-page nav menu