Skip to content

Add golden-batch and mid-course-correction figures for the batch chapter - #83

Open
kgdunn wants to merge 1 commit into
mainfrom
claude/batch-mid-course-correction-hdnkzp
Open

Add golden-batch and mid-course-correction figures for the batch chapter#83
kgdunn wants to merge 1 commit into
mainfrom
claude/batch-mid-course-correction-hdnkzp

Conversation

@kgdunn

@kgdunn kgdunn commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Nine PNGs and their two generator scripts, in the house matplotlib dialect (Okabe-Ito palette, DPI 300, save() helper, output directory from argv), for the new batch process monitoring and control chapter.

Companion PRs: the chapter that embeds these figures is kgdunn/pid-book#272; the modelling and control code they exercise is kgdunn/process-improve#516 (v1.69.0, the control extra). Merge order: process-improve first (the scripts install process-improve[control]>=1.68), then this PR, then the book PR (its PDF step stays red until these files are on main).

batch/golden-batch-figures.py (4 PNGs)

  • golden-batch-nylon-spread.png: the bundled nylon batches; setpoint replication at sub-percent spread while the response spread is roughly 14 times wider.
  • golden-batch-replay-spread.png: 40 simulator batches replaying the identical golden schedule; final titers 6.29 to 9.19 g/L (9.6% CV) around a 8.01 g/L reference.
  • golden-batch-z-scores.png: the initial-conditions score plot with the A/B/C feed classes as overlapping ranges along the first component.
  • golden-batch-variance-decomposition.png: the three variance buckets (initial conditions, within-batch disturbances, replication noise).

batch/midcourse-correction-figures.py (5 PNGs)

Every quantitative claim is executed on the simulator (corrected schedules re-simulated under the same disturbance seed), replicating evaluate_control_policies(y_target=8.0, random_state=0):

  • mcc-monitoring-funnel.png: one poor batch's predicted final titer at every decision point with the 95% prediction band.
  • mcc-correction-at-k.png: that batch's temperature and pH schedules before and after the day-4 correction (3.66 to 5.79 g/L executed).
  • mcc-policy-comparison.png: 40 batches under four executed policies: replay 7.51 +/- 1.20, mid-course 7.71 +/- 0.78 (4 corrected, none harmed), oracle-from-k 7.83 +/- 0.63, adapted feedforward 7.82 +/- 1.01 g/L.
  • mcc-decision-point-window.png: mean executed gain versus decision-point placement; the useful window is days 4 to 5.
  • mcc-exploration-dial.png: predicted versus executed titer of the corrected batches as the T2 penalty is relaxed, caps off.

All of these numbers were re-measured after process-improve#516 absorbed the repo-wide audit in #500, and are unchanged.

Regeneration commands are in each module docstring; the MCC set takes roughly 20 minutes because the policy comparison is re-executed, not read from a cache.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NZAyiPT8xURSdi24yFKCra


Generated by Claude Code

Nine PNGs and their two generator scripts for the new batch process
monitoring and control chapter in the book. Every quantitative claim in
the mid-course-correction set is executed on the calibrated bioreactor
simulator (corrected schedules re-simulated under the same disturbance
seed), replicating the documented headline of
evaluate_control_policies(y_target=8.0, random_state=0) in
process-improve 1.68.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZAyiPT8xURSdi24yFKCra
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants