highs (23 notebooks)

AMPL - solve multiple models in parallel

multiproc.ipynb Open In Colab Kaggle Gradient Open In SageMaker Studio Lab
Description: Solve multiple AMPL models in parallel in Python with amplpy and the multiprocessing modules.

AMPL - spreadsheet handling with amplxl

amplxl.ipynb Open In Colab Kaggle Gradient Open In SageMaker Studio Lab
Description: Basic example of reading/writing data into/from a .xlsx spreadsheet with amplxl

AMPL Bin Packing Problem with GCG

bpp.ipynb Open In Colab Kaggle Gradient Open In SageMaker Studio Lab
Description: Dantzig-Wolfe decomposition for Bin Packing Problem with GCG

AMPL Christmas Model created by ChatGPT

AMPL Model Colaboratory Template

colab.ipynb Open In Colab Kaggle Gradient Open In SageMaker Studio Lab
Description: Basic notebook template for the AMPL Colab repository

CP-style scheduling model with the numberof operator, solved by a MIP solver

sched_numberof.ipynb Open In Colab Kaggle Gradient Open In SageMaker Studio Lab
Description: Scheduling model with the Constraint Programming numberof operator, solved with a MIP solver. New MIP solver drivers based on the [MP library](https://amplmp.readthedocs.io/) enable CP-style modeling.

Containers scheduling

containers_scheduling.ipynb Open In Colab Kaggle Gradient Open In SageMaker Studio Lab
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.

Dual-Donor Organ Exchange problem

Dual-Donor_Organ_Exchange.ipynb Open In Colab Kaggle Gradient Open In SageMaker Studio Lab
Description: Most transplants from living donors require only one donor for each procedure. There are, however, exceptions, including dual-graft liver transplantation, bilateral living-donor lobar lung transplantation, and simultaneous liver-kidney transplantation. For each of these procedures, grafts from two compatible living donors are transplanted. As such, these procedures are more involved from an organizational perspective than those with only one donor. Unfortunately, one or both of the donors can often be biologically incompatible with the intended recipient, precluding the transplantation.

Dynamic routing example

Dynamic_routing_example.ipynb Open In Colab Kaggle Gradient Open In SageMaker Studio Lab
Description: Example of interactive optimization with GUI using AMPL and Google Maps
Tags: amplpy, gui

Employee Scheduling Optimization

Employee_Scheduling.ipynb Open In Colab Kaggle Gradient Open In SageMaker Studio Lab
Description: Employee scheduling model from the Analytical Decision Modeling course at the Arizona State University.

Hospitals-Residents MIP

hospitals_residents.ipynb Open In Colab Kaggle Gradient Open In SageMaker Studio Lab
Description: hospitals-residents problem with ties problem solved with ampl and highs

N-Queens

nqueens.ipynb Open In Colab Kaggle Gradient Open In SageMaker Studio Lab
Description: How can N queens be placed on an NxN chessboard so that no two of them attack each other?

Network design with redundancy

electric_grid_with_redundancy.ipynb Open In Colab Kaggle Gradient Open In SageMaker Studio Lab
Description: Design of an electricity transportation network provides enough redundancy, so that a break of one component does not prevent any user from receiving electricity. The approach also works for similar distribution networks and can potentially be used in the design of military logistic networks.

Plot feasible region

plot_feasible_region.ipynb Open In Colab Kaggle Gradient Open In SageMaker Studio Lab
Description: Plot the feasible region and optimal solution for a simple two variable model using AMPL’s Python API.
Tags: lecture, lp, simple

Quick Start using Pandas dataframes

pandasdiet.ipynb Open In Colab Kaggle Gradient Open In SageMaker Studio Lab
Description: Quick Start using Pandas dataframes to load and retrieve data

Quick Start using lists and dictionaries

nativediet.ipynb Open In Colab Kaggle Gradient Open In SageMaker Studio Lab
Description: Quick Start using lists and dictionaries to load and retrieve data

Simple sudoku solver using logical constraints (with GUI)

sudoku.ipynb Open In Colab Kaggle Gradient Open In SageMaker Studio Lab
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).

Solution check: discontinuous objective function

sol-check.ipynb Open In Colab Kaggle Gradient Open In SageMaker Studio Lab
Description: Pathological examples to illustrate MP solution checker and settings

Solving a nonogram puzzle

nonogram.ipynb Open In Colab Kaggle Gradient Open In SageMaker Studio Lab
Description: Model for solving nonogram puzzles autogenerated using nonogram.mod, nonogram.dat and nonogram.run.
Tags: ampl-only, mip

Solving simple stochastic optimization problems with AMPL

newsvendor.ipynb Open In Colab Kaggle Gradient Open In SageMaker Studio Lab
Description: Examples of the Sample Average Approximation method and risk measures in AMPL

Sudoku Generator

sudoku_gen.ipynb Open In Colab Kaggle Gradient Open In SageMaker Studio Lab
Description: Generate Sudoku boards with unique solution via iterative method and mip formulation.

Unit Commitment for Electrical Power Generation

unit_commitment.ipynb Open In Colab Kaggle Gradient Open In SageMaker Studio Lab
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.

VPSolver: Cutting & Packing Problems

vpsolver.ipynb Open In Colab Kaggle Gradient Open In SageMaker Studio Lab
Description: Solving cutting & packing problems using arc-flow formulations