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.
Tip
Learn how to get started using community apps with our tutorial: Explore new model - CLI.
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:
# 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 an AMPL license, uncomment the following line and make sure to
# store your license information in that file.
# - ampl_license_uuid
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: 1
ui:
control_type: slider
display_name: Duration
- name: provider
option_type: string
default: highs
description: Solver provider.
required: false
ui:
control_type: input
display_name: Provider
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.
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.