Ampl

AMPL

Reference for using AMPL with Nextmv

AMPL

AMPL is a commercial solver interface. It is the most powerful and intuitive tool for developing complex optimization solutions in business & scientific applications. AMPL connects to most commercial and open-source solvers and allows you to switch easily between them.

AMPL is a mathematical programming language for solving optimization problems that integrates three main components. All three languages use the same concepts and syntax for streamlined application-building.

Get started

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

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

If you don’t have an AMPL license, the apps come with a special activation that allows you to access an offline AMPL community edition license with a 15 minute time-limit. It unlocks AMPL without size-limits with open-source solvers, and with commercial solvers up to the demo limits each of them has.

If you do have a license, make sure to modify the app.yaml manifest to specify that an ampl_license_uuid file must be included (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 an AMPL license, uncomment the following line and make sure to
  # store your license information in that file.
  # - ampl_license_uuid
Copy

License

The AMPL-Nextmv integration works with a BYOL (Bring Your Own License) licensing model. This means that you need to have a valid AMPL license to use this technology on the Nextmv Platform. Nextmv does not provide AMPL licenses.

Languages & runtimes

Supported languages and available runtimes for AMPL 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 use AMPL.

Community app Description
python-ampl-facilitylocationSolve a VRP with nextroute
python-ampl-knapsackSolve a VRP with nextroute
python-ampl-priceoptimizationSolve a VRP with nextroute

Clone a community app locally using Nextmv CLI:

nextmv community clone -a python-ampl-priceoptimization
Copy

Marketplace apps

The AMPL Price Optimization and AMPL Facility Location apps in Nextmv Marketplace use AMPL.

Sign up for a free Nextmv Cloud account to test out the AMPL Price Optimization and AMPL Facility Location apps.

Page last updated

Go to on-page nav menu