Supply — Manufacturing Yield Cascade
A production yield cascade for one week of assembly. Typed FlowScript for supply chains. Keywords: supply chain, logistics, network, supplier.
Make it your own.
// A production yield cascade for one week of assembly. The shift split
// has to sum back to the units started, every scrap reason has to account
// for its drop, and the released total is derived from the two streams
// that feed it rather than typed in by hand.
supply_chain assembly {
title: "Pump assembly — week 19 yield"
product: "Circulator pump, 40 mm inline"
currency: "USD"
}
sc_node machining {
name: "Machining cell"
role: "factory"
location: "Plant 2, Monterrey"
capacity: 9000
}
sc_node line {
name: "Assembly line"
role: "factory"
location: "Plant 2, Monterrey"
capacity: 8600
}
sc_node test_rig {
name: "End-of-line test"
role: "factory"
location: "Plant 2, Monterrey"
capacity: 8600
}
sc_node fg_store {
name: "Finished-goods store"
role: "warehouse"
location: "Laredo, TX"
capacity: 20000
}
sc_link machined_to_line {
from: machining
to: line
lead_time_days: 1
cost_per_unit: 0.90
mode: "truck"
}
sc_link line_to_test {
from: line
to: test_rig
lead_time_days: 1
cost_per_unit: 0.15
}
sc_link test_to_store {
from: test_rig
to: fg_store
lead_time_days: 3
cost_per_unit: 2.40
mode: "rail"
}
cohort units_started {
n: 8400 source "MES batch report, week 19"
}
// The two shifts are drawn from the same start, so they must sum to it.
arm day_shift {
n: 4880
from: units_started
label: "Day shift"
}
arm night_shift {
n: 3520
from: units_started
label: "Night shift"
}
cohort units_assembled {
n: 8106
from: units_started
excluded: {
missing_component: 171
operator_scrap: 123
}
}
// Nothing is lost between assembly and test, and saying so explicitly is
// what makes the next subtraction checkable.
cohort units_tested {
n: 8106
from: units_assembled
}
cohort first_pass {
n: 7692
from: units_tested
excluded: {
leak_test_fail: 268
electrical_fail: 146
}
}
cohort sent_to_rework {
n: 414 source "MES rework queue, week 19"
}
cohort rework_recovered {
n: 361
from: sent_to_rework
excluded: {
unrecoverable_casting: 38
scrapped_after_second_fail: 15
}
}
// Two streams merge, so this total is derived rather than typed: 7692
// first-pass units plus 361 recovered from rework.
cohort released {
n: = first_pass.n + rework_recovered.n
}
cohort shipped {
n: 7994
from: released
excluded: {
held_for_qa_audit: 44
packaging_damage: 15
}
}
kpi first_pass_yield {
title: "First-pass yield"
baseline: = pct(first_pass.n, units_started.n)
target: 95
unit: "%"
}
kpi rework_recovery {
title: "Units recovered from the rework loop"
baseline: = pct(rework_recovered.n, sent_to_rework.n)
target: 90
unit: "%"
}
view yield: consort(units_started)
view chain: supply_map