Modules#
Modules available#
AMPL and all Solvers are now available as Python Packages. List of modules available:
Open-source:
highs
,cbc
,coin
(includes: CBC, Couenne, Ipopt, Bonmin),open
(includes all open-source solvers)NEOS Server:
gokestrel
(kestrel client)Commercial solvers:
baron
,conopt
,copt
,cplex
,gurobi
,knitro
,lgo
,lindoglobal
,loqo
,minos
,mosek
,octeract
,snopt
,xpress
AMPL Plugins:
amplgsl
(amplgsl docs),plugins
(amplplugins docs)
Note
On Google Colab there is a default AMPL Community Edition license that gives you unlimited access to AMPL with open-source solvers (e.g., HiGHS, CBC, Couenne, Ipopt, Bonmin) or with commercial solvers from the NEOS Server as described in Kestrel documentation.
In the list modules
you need to include
"gokestrel"
to use the kestrel driver;
"highs"
for the HiGHS solver;
"coin"
for the COIN-OR solvers.
To use other commercial solvers, your license needs to include the commercial solver (e.g., an AMPL CE commercial solver trial).
# Install dependencies
%pip install -q amplpy
# Google Colab & Kaggle integration
from amplpy import AMPL, ampl_notebook
ampl = ampl_notebook(
modules=["gurobi", "coin", "highs", "gokestrel"], # modules to install
license_uuid="default", # license to use
) # instantiate AMPL object and register magics
Learn more: [AMPL and Solvers modules] [Solver docs]
Notebooks grouped by modules#
- cbc (13 notebooks)
- AMPL Bin Packing Problem with GCG
- AMPL Christmas Model created by ChatGPT
- Balanced Task Assignment with Inverse Cost Scaling
- Optimization of Reinforced Concrete Production and Shipment: A Conveyor-Based Manufacturing and Curing Model
- Optimization of an TV advertising campaign based on TRP, GRP indicators
- Optimization of an advertising campaign for launching a new product on the market
- Optimizing Procurement and Sales Strategies for a Retail Chain with Supplier Payment Schemes
- Optimizing the number of staff in a chain of stores
- Pricing Optimization (Price Elasticity of Demand)
- Profit Maximization for Developers: Optimizing Pricing, Marketing, and Investment Strategies
- Project management: Minimize project costs by balancing task costs, risks, and late penalties.
- Smart Pipeline Diagnostics
- Unit Commitment for Electrical Power Generation
- coin (25 notebooks)
- Book Example: Economic equilibria
- Book Example: Transshipment problem
- Book Example: diet
- Book Example: prod
- Book Example: steel
- Book Example: transp
- CP-style scheduling model with the numberof operator, solved by a MIP solver
- Capacity expansion of power generation
- Diet model with Google Sheets
- Google Hashcode 2022
- Hydrothermal Scheduling Problem with Conic Programming
- Logistic Regression with amplpy
- Multicommodity transportation problem
- Nonlinear transportation model
- Optimal Power Flow with AMPL and Python - Bus Injection Model (BIM)
- Optimal Power Flow with AMPL and Python - Bus Injection Model (BIM) with controllable-phase shifting transformers and tap-changing transformers
- Optimal Power Flow with AMPL and Python - DC Power Flow
- Optimal Power Flow with AMPL and Python - conventional Power Flow
- Optimal Power Flow with AMPL and Python - data management
- Optimization Methods in Finance: Chapter 3
- Power System Optimization with Amplpower package
- Production model
- Steel industry problem
- Transportation problem
- Travelling Salesman Problem with subtour elimination
- copt (1 notebook)
- cplex (5 notebooks)
- gcg (2 notebooks)
- gurobi (36 notebooks)
- AMPL Bin Packing Problem with GCG
- AMPL Christmas Model created by ChatGPT
- AMPL Development Tutorial 6/6 – Implementing Benders Decomposition with ampls
- Aircrew trainee scheduling with seniority constraints
- Balanced Task Assignment with Inverse Cost Scaling
- Book Example: Economic equilibria
- Containers scheduling
- Employee Scheduling Optimization
- Enhanced Sector ETF Portfolio Optimization with Multiple Strategies in Python with AMPL
- Financial Portfolio Optimization with amplpy
- Introduction to Linear and Integer Programming
- Introduction to Mathematical Optimization
- Jupyter Notebook Integration
- NFL Team Rating
- Network Linear Programs
- Network design with redundancy
- Nonlinear transportation problem example
- Optimization of Reinforced Concrete Production and Shipment: A Conveyor-Based Manufacturing and Curing Model
- Optimize your Christmas Tree to Global Optimality
- Optimized Portfolio Optimization using EIA Data in Python with AMPL
- Optimizing Procurement and Sales Strategies for a Retail Chain with Supplier Payment Schemes
- Optimizing the number of staff in a chain of stores
- Pattern Enumeration
- Pattern Generation
- Porfolio Optimization with Multiple Risk Strategies in Python with AMPL
- Power System Optimization with Amplpower package
- Pricing Optimization (Price Elasticity of Demand)
- Production Model: lemonade stand example
- Project management: Minimize project costs by balancing task costs, risks, and late penalties.
- Retrieve Solution pool with AMPL and Gurobi
- Robust Linear Programming with Ellipsoidal Uncertainty
- Roll Cutting - Revision 1 & 2
- Scheduling Multipurpose Batch Processes using State-Task Networks in Python
- Smart Pipeline Diagnostics
- Unit Commitment Problem with AMPL and Python - Power Grid Lib
- amplpy setup & Quick Start
- highs (41 notebooks)
- AMPL - solve multiple models in parallel
- AMPL - spreadsheet handling with amplxl
- AMPL Bin Packing Problem with GCG
- AMPL Christmas Model created by ChatGPT
- AMPL Model Colaboratory Template
- Aircrew trainee scheduling with seniority constraints
- Balanced Task Assignment with Inverse Cost Scaling
- CP-style scheduling model with the numberof operator, solved by a MIP solver
- Containers scheduling
- Diet and Other Input Models: Minimizing Costs
- Dual-Donor Organ Exchange problem
- Dynamic routing example
- Employee Scheduling Optimization
- Hospitals-Residents MIP
- Labs scheduling
- N-Queens
- Network design with redundancy
- Oil refinery production optimization
- Oil refinery production optimization (+PowerBI)
- Oil refinery production optimization (ampl-only version)
- Optimization of Reinforced Concrete Production and Shipment: A Conveyor-Based Manufacturing and Curing Model
- Optimizing Procurement and Sales Strategies for a Retail Chain with Supplier Payment Schemes
- Optimizing the number of staff in a chain of stores
- Plot feasible region
- Power System Optimization with Amplpower package
- Pricing Optimization (Price Elasticity of Demand)
- Profit Maximization for Developers: Optimizing Pricing, Marketing, and Investment Strategies
- Project management: Minimize project costs by balancing task costs, risks, and late penalties.
- Quick Start using Pandas dataframes
- Quick Start using lists and dictionaries
- Scheduling Multipurpose Batch Processes using State-Task Networks in Python
- Simple sudoku solver using logical constraints (with GUI)
- Smart Pipeline Diagnostics
- Solution check: discontinuous objective function
- Solving a nonogram puzzle
- Solving simple stochastic optimization problems with AMPL
- Sudoku Generator
- Unit Commitment Problem with AMPL and Python - Power Grid Lib
- Unit Commitment for Electrical Power Generation
- VPSolver: Cutting & Packing Problems
- Warehouse location and transport
- knitro (2 notebooks)
- mosek (3 notebooks)
- open (14 notebooks)
- AMPL Development Tutorial 1/6 – Capacitated Facility Location Problem
- AMPL Development Tutorial 2/6 – Stochastic Capacitated Facility Location Problem
- AMPL Development Tutorial 3/6 – Benders Decomposition via AMPL scripting
- AMPL Development Tutorial 4/6 – Benders Decomposition via PYTHON scripting
- AMPL Development Tutorial 5/6 – Parallelizing Subproblem Solves in Benders Decomposition
- Debugging Model Infeasibility
- Introduction to Linear and Integer Programming
- Introduction to Mathematical Optimization
- Largest small polygon
- Magic sequences
- Network Linear Programs
- P-Median problem
- Production Model: lemonade stand example
- Supply chain network
- plugins (1 notebook)
- scip (1 notebook)
- xpress (1 notebook)