# amplpy¶

## AMPL - solve multiple models in parallel¶

Description: Solve multiple AMPL models in parallel in Python with amplpy and the multiprocessing modules.

Author: Nicolau Santos (3 notebooks) <nfbvs@ampl.com>

## AMPL Bin Packing Problem with GCG¶

Description: Dantzig-Wolfe decomposition for Bin Packing Problem with GCG

## AMPL Capacitated p-Median Problem with GCG¶

Description: Dantzig-Wolfe decomposition for Capacitated p-Median Problem with GCG

## AMPL Christmas Model created by ChatGPT¶

Description: Christmas model generated by ChatGPT

## AMPL Development Tutorial 1/6 – Capacitated Facility Location Problem¶

Description: This notebook marks the beginning of a six-part series.

## AMPL Development Tutorial 2/6 – Stochastic Capacitated Facility Location Problem¶

Description: This notebook continues our six-part series as the second installment.

## AMPL Development Tutorial 3/6 – Benders Decomposition via AMPL scripting¶

Description: In this third installment of our six-part series, we continue our exploration by addressing the complexities introduced by the stochastic programming formulation presented in part two.

## AMPL Development Tutorial 4/6 – Benders Decomposition via PYTHON scripting¶

Description: In this fourth installment of our six-part series, we advance our exploration by demonstrating how to adapt our AMPL script for use with AMPL’s Python API.

## AMPL Development Tutorial 5/6 – Parallelizing Subproblem Solves in Benders Decomposition¶

Notebooks > AMPL Development Tutorial 5/6 – Parallelizing Subproblem Solves in Benders Decomposition

Description: In the fifth installment of our six-part series, we delve deeper by showing how to evolve our Benders decomposition Python script from a serial execution to one that solves subproblems in parallel.

## AMPL Development Tutorial 6/6 – Implementing Benders Decomposition with *ampls*¶

Description: This concluding notebook in our six-part series delves into enhancing the efficiency of our decomposition algorithm by utilizing

**AMPL Solver Libraries**(*ampls*).## AMPL Model Colaboratory Template¶

Description: Basic notebook template for the AMPL Colab repository

## Aircrew trainee scheduling with seniority constraints¶

Description: Aircrew trainee scheduling with simpler seniority modeling

Tags: trainee-scheduling, aircrew-scheduling, employee-scheduling, seniority-constraints, seniority-ranking, amplpy

Author: Gleb Belov (7 notebooks) <gleb@ampl.com>

## Containers scheduling¶

Description: Scheduling model for harbor operations. It is a problem with dependences between containers, which should be dispatch the fastest possible. We are using the MP solver interfaces to model a complex system using techniques from Constraint Programming, such as indicator constraints, and logical or and forall operators. After the model is written, a couple instances are presented and Highs/Gurobi MIP solvers are used to tackle the problem.

## Debugging Model Infeasibility¶

Description: This notebook offers a concise guide on troubleshooting model infeasibility using AMPL’s presolve feature and other language capabilities.

## Diet model with Google Sheets¶

Description: Diet model using Google Sheets

## Dynamic routing example¶

Description: Example of interactive optimization with GUI using AMPL and Google Maps

## Efficient Frontier with Google Sheets¶

Description: Efficient Frontier example using Google Sheets

## Employee Scheduling Optimization¶

Description: Employee scheduling model from the Analytical Decision Modeling course at the Arizona State University.

## Financial Portfolio Optimization with amplpy¶

Description: Financial Portfolio Optimization with amplpy and amplpyfinance

## Google Hashcode 2022¶

Description: Google Hashcode 2022 Practice Problem

## Hospitals-Residents MIP¶

Description: hospitals-residents problem with ties problem solved with ampl and highs

## Hydrothermal Scheduling Problem with Conic Programming¶

Description: Hydrothermal Scheduling Problem using Second-Order Cones

Tags: amplpy, conic, second-order-cone, quadratic-cone, nonlinear-programming, scheduling, engineering, power-generation, geothermal-energy, hydropower

Author: Gleb Belov (7 notebooks) <gleb@ampl.com>

## Introduction to Linear and Integer Programming¶

Description: Basic introduction to linear programming and AMPL via a lemonade stand example

## Introduction to Mathematical Optimization¶

Description: Basic introduction to optimization and AMPL via unconstrained optimization

## Jupyter Notebook Integration¶

Description: Jupyter Notebook Integration with amplpy

## Largest small polygon¶

Description: lecture about models for the Largest Small Polygon Problem

## Logistic Regression with amplpy¶

Description: Logistic regression with amplpy using exponential cones

## N-Queens¶

Description: How can N queens be placed on an NxN chessboard so that no two of them attack each other?

Author: Gleb Belov (7 notebooks) <gleb@ampl.com>

## NFL Team Rating¶

Description: NFL Team Rating problem from the Analytical Decision Modeling course at the Arizona State University.

## Network Linear Programs¶

Description: Basic introduction to network linear programms and AMPL via max flow and shortest path problems

## Optimization Methods in Finance: Chapter 3¶

Description: Optimization Methods in Finance: Bond Dedication Problem.

## Optimize your Christmas Tree to Global Optimality¶

Description: Optimize the placement of ornaments on a christmas tree.

## P-Median problem¶

Description: this notebook states the p-median problem with a simple example, and a MIP formulation in amplpy. The problem is parametrized with a class, so it is easier to sample and replicate experiments. A graphical solution is plotted.

## Pattern Enumeration¶

Description: Pattern enumeration example with amplpy

## Pattern Generation¶

Description: Pattern generation example with amplpy

## Production Model¶

Description: Basic introduction to AMPL’s indexed entities and the Pygwalker Python package via a lemonade stand example

## Quick Start using Pandas dataframes¶

Description: Quick Start using Pandas dataframes to load and retrieve data

## Quick Start using lists and dictionaries¶

Description: Quick Start using lists and dictionaries to load and retrieve data

## Roll Cutting - Revision 1 & 2¶

Description: Pattern tradeoff example with amplpy

## Simple sudoku solver using logical constraints (with GUI)¶

Description: Simple sudoku model with two formulations: as a Constraint Programming problem using the

*alldiff*operator and as a MIP. Note that the CP formulation is more natural but it needs a solver supporting logical constraints or a MIP solver with automatic reformulation support (see [here](https://amplmp.readthedocs.io/) for more information).## Solving simple stochastic optimization problems with AMPL¶

Description: Examples of the Sample Average Approximation method and risk measures in AMPL

Author: Nicolau Santos (3 notebooks) <nfbvs@ampl.com>

## Sudoku Generator¶

Description: Generate Sudoku boards with unique solution via iterative method and mip formulation.

## Unit Commitment for Electrical Power Generation¶

Description: This notebook illustrates the power generation problem using AMPL. The original version featured the Gurobi solver. By default, this notebook uses the HiGHS and CBC solvers.

## amplpy setup & Quick Start¶

Description: amplpy setup and quick start