# Coordinating work and measuring mixtures

These are deterministic synthetic teaching calculations. No equipment was tested and no operational accuracy, food safety or sensory result is claimed.

Run `python reproduce.py` with numpy and matplotlib to rebuild all CSV, figures and metadata. Values are chosen examples; minutes are hypothetical processing durations.

## Scheduling method

Identical jobs visit three stages in order. Each stage has one exclusive resource. Jobs may wait in unlimited buffers and keep their order. A started operation runs to completion. All jobs are available at time zero. Start(j,s) = max(finish(j,s-1), finish(j-1,s)); absent predecessors finish at zero. Finish equals start plus stage duration.

The baseline durations are 2, 3 and 1 minutes. For N>0 identical jobs, makespan = sum(durations) + (N-1) max(durations). N=0 takes zero time. Five jobs finish at 18 minutes, versus 30 for completing each job before starting the next. The first completion takes six minutes; later completions occur every three minutes. Inspection is a scheduled operation, not a modeled acceptance decision.

Files: job-counts.csv has 21 job counts from 0 through 20; five-job-operations.csv has 15 operations; duration-grid.csv has 125 combinations of three durations from 1 through 5 minutes, each for five jobs. No cleaning, setup, transport, failures, rejected batches, resource sharing between stages or finite buffers are modeled.

## Mixing method

Nominal masses are 30 g A and 70 g B. Actual masses are 30(1+eA) and 70(1+eB), with each fractional dose error from -0.10 to +0.10 in steps of 0.01. A mass fraction is actual_A / (actual_A + actual_B). Composition error is 100(fraction_A - 0.30), in percentage points, not percent relative error. mixing.csv contains all 441 combinations.

Equal fractional errors leave composition unchanged, but change total mass. Opposing extremes give fractions 27/104 = 0.2596153846 and 33/96 = 0.34375. Mass-fraction accounting does not model smell, preference, chemistry, evaporation or compatibility. This domain contains only positive masses. An extended interface must reject negative masses and report the fraction undefined when total mass is zero.

## Verification

The generator checks 2,625 schedule cases (21 job counts times 125 duration combinations) against the independent closed-form makespan, and checks every operation for duration, precedence and exclusive resource use. Mixture checks cover mass-fraction closure, equal-error invariance, exact rational corners and monotonicity. validation.json records results. CSV rows total 602.

The workflow figure combines a five-job Gantt diagram with completion time versus job count. The mixture map shows composition error on a regular deterministic grid. Neither is a statistical confidence interval or measured performance plot.

## Sources and scope

[NIST production-system simulation reference](https://nvlpubs.nist.gov/nistpubs/Legacy/IR/nistir6154.pdf) supports resource/state/event modeling. The timetable and parameter choices here are original teaching examples.

[Primary dosing-system patent](https://patents.google.com/patent/US5111855A/en) provides an engineering example of recipe-driven dosing; a patent is not independent performance validation. Mass fractions here follow their definition and do not reproduce a formulation.
