lessons
A 48-lesson course in LP and MIP modelling with HLPL, across 18 chapters: 0 — LP theory; 0b — MIP theory; I — Foundations; II — Reading the solver; III — Sets and sums; IV — Discrete decisions; V — Modelling tricks; VI — Knapsack; VII — Assignment; VIII — Transportation; IX — Resource allocation; X — Shortest path; XI — Max flow; XII — Set covering; XIIb — Graph theory; XIII — Facility location; XIV — Travelling salesman; XV — Capstone.
Entries
What is a linear program? — 0 — LP theory — A precise definition, three forms, one toy problem.
Geometry and the Fundamental Theorem — 0 — LP theory — Why LP optima sit at corners, with a proof you can step through.
Duality — building the dual — 0 — LP theory — Every LP has a twin. Here is how to build it.
Duality — weak and strong duality — 0 — LP theory — Two theorems that change how you think about LP.
From LP to MIP — 0b — MIP theory — One word — "integer" — changes everything.
The LP relaxation as a bound — 0b — MIP theory — Drop the integers, solve fast, get a bound for free.
The modelling toolkit — 0b — MIP theory — Big-M, indicators, logical "or" — the patterns that turn intent into MILP.
Branch-and-bound (how solvers actually do it) — 0b — MIP theory — A search tree, an LP at each node, and the bound that prunes it.
Log diagnostics — when the search misbehaves — 0b — MIP theory — Three patterns that go wrong, and the lever that fixes each one.
Hello, optimizer — I — Foundations — A first run, end-to-end.
Your first variable — I — Foundations — One decision, one number.
Two variables, weighted objective — I — Foundations — Constraints + objective in one go.
Reading the solution — II — Reading the solver — Variables and the objective value.
When there is no answer — II — Reading the solver — Infeasibility and the run_model status.
Sets, indices, and parameters — III — Sets and sums — Declare many variables at once.
A constraint over a set — III — Sets and sums — Σ in your constraints, not just the objective.
Binary variables — IV — Discrete decisions — Yes or no, on or off.
Integer variables — IV — Discrete decisions — Whole numbers only.
Either / or via big-M — V — Modelling tricks — Disjunctions in linear models.
Fixed cost + variable cost — V — Modelling tricks — Open a production line only if it pays.
Knapsack — variables and objective — VI — Knapsack — Start with the decisions.
Knapsack — add the capacity — VI — Knapsack — One constraint, everything changes.
Knapsack — indexed form — VI — Knapsack — Five items in five lines.
Assignment — workers pick jobs — VII — Assignment — One row constraint at a time.
Assignment — one-to-one — VII — Assignment — Both directions of the matching.
Assignment — extra workers — VII — Assignment — When the matching is uneven.
Shipping — one source — VIII — Transportation — Distribute a fixed supply.
Transportation — two sources — VIII — Transportation — Supply and demand both bite.
Transportation — when supply is tight — VIII — Transportation — What if total supply < total demand?
Multi-resource production — IX — Resource allocation — Two products, two resources.
Multi-period planning — IX — Resource allocation — Inventory carries forward.
Shortest path — edges and distances — X — Shortest path — Start with what you decide.
Shortest path — flow conservation — X — Shortest path — Force a path from source to sink.
Max flow — variables and capacities — XI — Max flow — Continuous flow on each edge.
Max flow — add conservation — XI — Max flow — Inflow = outflow at internal nodes.
Max flow — alternative formulation — XI — Max flow — Measure flow at the sink instead.
Set cover — minimum number of sets — XII — Set covering — Cover every element with as few sets as possible.
Set cover — minimum cost — XII — Set covering — Sets are not all equal.
Graphs, degree, and three questions — XIIb — Graph theory — Vertices, edges, the handshaking lemma, and the problems we will model.
Minimum vertex cover — XIIb — Graph theory — The fewest vertices that touch every edge.
Maximum independent set — XIIb — Graph theory — The most vertices with no edge between any two.
Maximum matching and König's theorem — XIIb — Graph theory — The most edges sharing no vertex — and why it equals the cover.
Facility location — open or not? — XIII — Facility location — Pay to open, save on transport.
Facility location — with capacities — XIII — Facility location — Each open facility has a limit.
TSP — variables, no constraints — XIV — Travelling salesman — Just the decisions.
TSP — degree constraints (assignment trap) — XIV — Travelling salesman — Force exactly one in and one out per city.
TSP — MTZ subtour elimination — XIV — Travelling salesman — Forbid the cheating subtours.
Capstone — a project portfolio — XV — Capstone — Two constraints, one binary objective.
Open MCP endpoint: POST https://vertex.elytica.com/mcp — no authentication.
Run models in the editor .