Functional Weave
Code in Rust

manufacturing.capacity@1.0.0

README.md

2,037 bytes · view raw

# manufacturing.capacity

Capacity requirements for a period, work centre by work centre:

    capacity = available time x efficiency x utilisation
    load     = the standard minutes of every routed operation in the period
    load %   = load / capacity

With 2,400 minutes scheduled (a week of 8-hour days), 95% efficiency and 85%
utilisation, a work centre can deliver 1,938 standard minutes; 2,000 minutes of
routed work is 103.20% of that, overloaded by 62 minutes.

**Utilisation and efficiency.** Utilisation is the share of scheduled time the
centre actually works (after breakdowns, waiting and absence), so it cannot
exceed 100%. Efficiency is standard minutes earned per minute worked, and can
exceed 100% when the standards are loose. Both are basis points.

**Overload is decided on the exact capacity.** Capacity is an exact fraction
(`math.rational`) and a centre is overloaded when its load is more than that
fraction. `capacityMinutes` reports it rounded down, which agrees with the flag
because loads are whole minutes: 480 minutes of load against 479.52 minutes of
capacity is overloaded, and a tool that rounded capacity to the nearest minute
(480) would call it exactly full. `spareMinutes` is capacity minus load, so it
is negative exactly when `overloaded` is true.

**Zero capacity.** A centre with no capacity in the period (down for
maintenance, utilisation 0) has no load percentage: `loadBasisPoints` is null,
and any load on it is an overload.

**Rules.** Every load must name a work centre in the list, and each centre
appears once; loads for the same centre are added. Times are whole minutes, not
negative. Results follow the order of `workCentres`, including centres with no
load. The period is whatever the caller's available times and loads cover: a
day, a week, a month.

Source: the capacity requirements planning calculation as defined in the APICS
(ASCM) Dictionary, entries "capacity", "efficiency", "utilization" and "rated
capacity" (rated capacity = available time x utilization x efficiency).