Skip to content
Open
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-two executed teaching notebooks and an accompanying Python package,
Twenty-five 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
7 changes: 4 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ portable means petitioning Part 2b of the standard, which is Jones's call and no

```
src/orteach/ the package
notebooks/NN_subject/ 01_lp_formulation ... 14_probability_and_stats
notebooks/NN_subject/ 01_lp_formulation ... 15_design_of_experiments
data/raw/ tests/
```

Expand Down Expand Up @@ -136,8 +136,9 @@ They belong with the repository. Moved twice so far: to `C:\dev\` on 2026-09-05,

## Status, measured 2026-09-05

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.
Twenty-five notebooks (seventeen as of 2026-09-05) across fifteen subjects (`02` added 2026-10-27, `15`
design of experiments 2026-11-18/19), twenty-three package modules, thirty-odd tables in `data/raw/`, 251 tests,
and `tools/check_notebooks.py`. README.md has the table.

**What to run before believing anything:** `python -m pytest tests/ -q`,
`python tools/check_notebooks.py` and `python tools/check_seeds.py`. All three must be clean before
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,12 @@ ahead of LP formulation, which is backwards.
05_integer_and_branch_bound 12_energy_systems_pypsa
06_nonlinear_and_convex 13_supply_chain
07_stochastic_and_newsvendor 14_probability_and_stats
15_design_of_experiments
```

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

Twenty-two teaching notebooks in thirteen subjects, each with its package module, its tables and
Twenty-five teaching notebooks in fifteen 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`.

Expand All @@ -145,6 +146,7 @@ agreement assertion, and passes `tools/check_notebooks.py`.
| 12 | `dispatch_to_pypsa` (own kernel — see its README) | `energy` |
| 13 | `sourcing_and_resilience` | `sourcing` |
| 14 | `distributions_and_clt`, `inference_and_regression` | `distributions`, `inference` |
| 15 | `planning_an_experiment`, `factorial_designs`, `space_filling_designs` | `doe` |

`orteach.tolerance` is the one home of every tolerance and of the solver settings that make the
agreement assertion honest.
Expand Down
37 changes: 37 additions & 0 deletions data/raw/doe_reactor_runs.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
run,run_order,kind,A,B,C,D,E,yield
1,4,factorial,-1,-1,-1,-1,-1,48.64
2,21,factorial,1,-1,-1,-1,-1,57.75
3,27,factorial,-1,1,-1,-1,-1,54.59
4,34,factorial,1,1,-1,-1,-1,73.4
5,9,factorial,-1,-1,1,-1,-1,47.25
6,23,factorial,1,-1,1,-1,-1,53.64
7,30,factorial,-1,1,1,-1,-1,49.3
8,35,factorial,1,1,1,-1,-1,66.33
9,24,factorial,-1,-1,-1,1,-1,53.88
10,12,factorial,1,-1,-1,1,-1,55.29
11,8,factorial,-1,1,-1,1,-1,53.8
12,25,factorial,1,1,-1,1,-1,71.47
13,18,factorial,-1,-1,1,1,-1,47.49
14,29,factorial,1,-1,1,1,-1,51.84
15,15,factorial,-1,1,1,1,-1,47.99
16,11,factorial,1,1,1,1,-1,68.72
17,17,factorial,-1,-1,-1,-1,1,50.02
18,26,factorial,1,-1,-1,-1,1,57.04
19,13,factorial,-1,1,-1,-1,1,55.32
20,33,factorial,1,1,-1,-1,1,73.86
21,36,factorial,-1,-1,1,-1,1,49.61
22,16,factorial,1,-1,1,-1,1,50.59
23,32,factorial,-1,1,1,-1,1,48.14
24,20,factorial,1,1,1,-1,1,64.9
25,22,factorial,-1,-1,-1,1,1,54.1
26,5,factorial,1,-1,-1,1,1,59.36
27,28,factorial,-1,1,-1,1,1,55.79
28,14,factorial,1,1,-1,1,1,72.35
29,1,factorial,-1,-1,1,1,1,45.41
30,7,factorial,1,-1,1,1,1,57.95
31,31,factorial,-1,1,1,1,1,50.23
32,3,factorial,1,1,1,1,1,64.16
33,2,center,0,0,0,0,0,60.72
34,10,center,0,0,0,0,0,61.72
35,19,center,0,0,0,0,0,59.66
36,6,center,0,0,0,0,0,59.3
30 changes: 30 additions & 0 deletions notebooks/15_design_of_experiments/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# 15 — Design of experiments

Three notebooks on one synthetic instance, a five-factor reactor (`doe_reactor_runs.csv`, generated
by `orteach.doe` from a printed seed and a stated true model). Package: `orteach.doe`.

**Read them in this order, and stop when you have what you need.**

1. `planning_an_experiment.ipynb` — **the basics, for anyone planning a study.** Six steps in the
order you take them: the noise and the effect worth detecting; how many runs and how many
replicates, and why; the reduction ladder (two levels plus center points, then replicate only the
center, then a fraction) with the power each rung keeps; randomizing and blocking; what the runs
you already have can estimate; and which runs to add (D-optimal augmentation, fold-over, axial
points). Each step carries one piece of theory: the chi-square interval for sigma, the power
formula and its noncentral-t check, hidden replication, several responses as one matrix equation
on the same runs, drift as a fake effect, rank, the
omitted-variable bias that makes a regression on undesigned runs show correlation rather than
cause, and the D-criterion.
2. `factorial_designs.ipynb` — **the deep dive behind steps 2, 3 and 6.** Effects and interactions
by hand, the half-normal plot and Lenth's margins, the half and quarter fractions with their alias
algebra, and the center-point curvature test.
3. `space_filling_designs.ipynb` — **only for computer experiments**, where a simulation replaces the
lab and the goal is a surrogate. Latin hypercubes, maximin, and why the run count does not grow
with the number of factors. Skip it for a physical experiment.

The three share the reactor so that a number in one can be found in another: the 36-run design that
planning recommends is the table `factorial_designs` analyses, and the eight-run quarter fraction
that misreads stirring there is the one planning's fold-over repairs.

Not here yet: response surface designs and steepest ascent (the central composite design that step
6 names), and a degradation-study notebook.
Loading
Loading