Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cff-version: 1.2.0
message: "If you use this teaching material, or the models in it, please cite it as below."
title: "Teaching notebooks for IE 3315, IE 5301 and REE 4301"
abstract: >-
Twenty executed teaching notebooks and an accompanying Python package,
Twenty-two executed teaching notebooks and an accompanying Python package,
organised by subject across three courses in industrial engineering and energy
systems modelling. Each notebook builds its model by hand and then asserts
agreement with the packaged implementation, so the two cannot drift apart
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ They belong with the repository. Moved twice so far: to `C:\dev\` on 2026-09-05,

## Status, measured 2026-09-05

Twenty notebooks (seventeen as of 2026-09-05) across twelve subjects (`02` empty on purpose), sixteen package modules, thirty-
Twenty-two notebooks (seventeen as of 2026-09-05) across thirteen subjects (`02` added 2026-10-27), sixteen package modules, thirty-
odd tables in `data/raw/`, 170 tests, and `tools/check_notebooks.py`. README.md has the table.

**What to run before believing anything:** `python -m pytest tests/ -q`,
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,14 @@ ahead of LP formulation, which is backwards.

## What is here, measured 2026-09-05

Twenty teaching notebooks in twelve subjects, each with its package module, its tables and its
tests. `02_simplex_and_bases` is empty on purpose. Every notebook ships executed, ends in the
Twenty-two teaching notebooks in thirteen subjects, each with its package module, its tables and
its tests. Every notebook ships executed, ends in the
agreement assertion, and passes `tools/check_notebooks.py`.

| folder | notebooks | package |
|---|---|---|
| 01 | `diet`, `goal_programming` | `diet`, `goal_programming` |
| 02 | `simplex_by_hand`, `interior_point` | `simplex` |
| 03 | `primal_and_dual` | `duality` |
| 04 | `transportation`, `assignment` | `transportation`, `assignment` |
| 05 | `facility_location` | `facility_location` |
Expand Down
4 changes: 4 additions & 0 deletions data/raw/lp_simplex_40_50.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
row,x1,x2,sense,rhs
objective,40,50,max,
c1,1,2,<=,40
c2,4,3,<=,120
5 changes: 5 additions & 0 deletions data/raw/lp_wyndor.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
row,x1,x2,sense,rhs
objective,3,5,max,
plant1,1,0,<=,4
plant2,0,2,<=,12
plant3,3,2,<=,18
17 changes: 17 additions & 0 deletions notebooks/02_simplex_and_bases/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# 02 — Simplex and bases

Both notebooks solve IE 3315's tableau example (deck 05): maximise 40x1 + 50x2 subject to
x1 + 2x2 <= 40 and 4x1 + 3x2 <= 120, table `lp_simplex_40_50.csv`. Package: `orteach.simplex`.

`simplex_by_hand.ipynb` — every basis (six, four of them feasible corners), then the tableau
pivoted by hand from (0, 0) through (0, 20) to (24, 8), as the slides do it. Row 0's final
entries under the slacks are the duals, which the notebook asks the reader to notice.

`interior_point.ipynb` — a log-barrier method on the same LP: one equality-constrained Newton step
written out, the line search, centering, then the central path as t grows. It replaces
`barrierShort.ipynb` (IE 5301 folder), which ran on a random instance redrawn every run, so no
number in it could be quoted; here the instance is fixed and the path can be drawn against the
simplex's corners.

The slides' exercise, Wyndor (max 3x1 + 5x2, three plants), is `lp_wyndor.csv`; the tests pin its
simplex path, (0, 0) to (0, 6) to (2, 6).
Loading
Loading