mp#
A Party Scheduling Problem with FICO Xpress#
Description: A scheduling problem for visitor-host assignments. Feasibility version (no objective function). Demonstrates high-level modeling in AMPL MP, AMPL Python API, and tuning in FICO Xpress
Author: Gleb Belov (12 notebooks) <gleb@ampl.com>
CP-style scheduling model with the numberof operator, solved by a MIP solver#
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.
Author: Gleb Belov (12 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.
Diagnose infeasibility#
Description: This notebook demonstrates how to deal with infeasible models.
Formula 1 Scheduling and Routing Optimization#
Description: A notebook that tackles the Formula 1 Calendar as a routing and a scheduling problem, minimizing total distance between races whilst also assigning a spot in the calendar respecting scheduling constraints using MP
Labs scheduling#
Description: Model for laboratories scheduling. Some labs are needed to handle requests from researchers, and departments have to assign labs and locations to the requests.
Magic sequences#
Description: Solving magic sequences through reinforced formulations and constrained programming. Some comparison between models and solvers is done, and we look into the “Another solution” problem for these sequences.
Tags: constraint-programming, educational, mp, sequences, arithmetic, reinforced-formulations, highs, gecode, cbc, mip
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 (12 notebooks) <gleb@ampl.com>
Paintshop Color Change Scheduling with FICO Xpress#
Description: A scheduling problem demonstrating high-level modeling and manual solver tuning in FICO Xpress
Author: Gleb Belov (12 notebooks) <gleb@ampl.com>
Portfolio Optimization: Factor Model#
Description: Mean-Variance Portfolio Optimization model where the risk estimator is not given explicitly but is instead represented by a factor model, as is common in US equity models [1]. The original notebook is [3].
Tags: finance, portfolio-optimization, mean-variance, factor-model, ampl-conditonal-instantiation, mp, cardinality-constraint
Author: Gleb Belov (12 notebooks) <gleb@ampl.com>
Retrieve Solution pool with AMPL and Gurobi#
Description: This notebook describes how to retrieve multiple solutions from the solver’s solution pool. Optimization problems usually have several optimal solutions, one is returned by the solver but the others are discarded. These alternative solutions can also be retrieved by AMPL.
Solution check: discontinuous objective function#
Description: Pathological examples to illustrate MP solution checker and settings
Author: Gleb Belov (12 notebooks) <gleb@ampl.com>
Unit Commitment MINLP with Knitro#
Description: Solving a nonlinear Unit Commitment problem with Knitro using MP features for logic and multi-objective optimization. The goal of this notebook is to show a straightforward and clear way of using nonlinear solvers for complex models with logical expressions and also hierarchical multi-objective optimization.
Tags: mp, knitro, mp2nl, nonlinear, quadratic, minlp, unit-commitment, electric-power-industry, energy, multi-objective, gurobi, xpress, mp2nl
Using multiple objectives in your model#
Description: We show how to use multiple objectives with Amplpy using a nonlinear Unit Commitment problem. We won’t be using native or emulated features from the solver interface, but emulating manually a lexicographic multiobjective problem.
Tags: warm-start, mp, multi-objective, gurobi, xpress, knitro, mp2nl, electric-power-industry, unit-commitment
Vehicle Routing Problem with Fair Profits and Time Windows (VRP-FPTW)#
Warehouse location and transport#
Description: Model for warehouse allocation. Farms (suppliers) send feedstock to warehouses, and later on, those warehouses send it to a production plant. The problem involves modeling a storage facility location problem with a transportation component to the final plant.
Warm start solvers with snapshot#
Description: We show how to warm start a solver with a previous solution. A nonlinear Unit Commitment problem is being used as example. We will use the “snapshot” feature for this matter.