modeling-tips#

Big-M constants come from declared bounds#

declared_bounds_bigm.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: How MP sizes the big-M constants of logical constraints from declared variable bounds, why naming an expression and declaring its bound tightens the LP relaxation, and how to check this with the root bound and the exported solver model

MP2NL: logical and complementarity constraints with any NL solver#

mp2nl_logic_and_complementarity.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: Using the MP2NL meta-driver from amplpy: which options go where, what the subsolver receives, why the subsolver must handle the problem class MP produces, how to choose a complementarity reformulation, and how to check the returned solution

Perspective reformulation of a convex cost on a semicontinuous variable#

perspective_unit_commitment.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: Unit commitment with a convex piecewise-linear fuel cost: the perspective reformulation, its linear form for piecewise-linear costs, its form for MP’s semicontinuous declarations, and checking its value with the root bound before benchmarking

Robust Linear Programming with Ellipsoidal Uncertainty#

tip6_robust_linear_programming.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: AMPL Modeling Tips #6: Robust Linear Programming

The model as an evaluator: fix the decisions, solve the rest#

model_as_evaluator.ipynb Open In Colab Open In Deepnote Open In Kaggle Open In Gradient Open In SageMaker Studio Lab
Description: A local-search heuristic around an AMPL model: fixing the discrete decisions and solving the continuous rest with an NLP solver, checking every solve, ranking infeasible candidates with an elastic model, and comparing against the status-quo baseline