# SAMPLE DATA. FICTIONAL COMPANY. NOT REAL.
# Mesquite Ridge Metal Works, Plant 1, Bay 1 (CNC machine shop): the shop file for the twin.
# It lists the machines, the people and their shifts, the steps each part goes through
# (the routings), the cycle times and setup times, and what each part sells for.
# Built from the twin-flow Ridgeline sample shop, with Mesquite Ridge part numbers.
# Times are in seconds. A rate is pieces per second: 0.0003704 is one piece every 45 minutes.
# `load` is the setup time for each job (fixtures, tools, first-piece check).

defaults:
  cycle_time_cv: 0.15        # real cycle times wander about 15% from the standard

stocks: []                   # raw bar, block and plate are always on the rack

part_types:
  - {name: steel_bar, uom: piece, attributes: {}}
  - {name: aluminum_block, uom: piece, attributes: {}}
  - {name: steel_plate, uom: piece, attributes: {}}
  - {name: MR-1015_cut, uom: piece, attributes: {}}
  - {name: MR-1015_turned, uom: piece, attributes: {}}
  - {name: MR-1015, uom: piece, attributes: {}}        # drive shaft, 2 in., 4140
  - {name: MR-1020_cut, uom: piece, attributes: {}}
  - {name: MR-1020_milled, uom: piece, attributes: {}}
  - {name: MR-1020_deburred, uom: piece, attributes: {}}
  - {name: MR-1020, uom: piece, attributes: {}}         # hydraulic manifold block, 6061
  - {name: RL-215_cut, uom: piece, attributes: {}}
  - {name: RL-215_milled, uom: piece, attributes: {}}
  - {name: RL-215, uom: piece, attributes: {}}         # RidgeLine housing cover, machined
  - {name: scrap, uom: piece, attributes: {}}

machines:                    # one of each; steps that name the same machine share it
  - {name: band_saw}
  - {name: lathe}            # 2-axis lathe
  - {name: mill_manifold}       # mill for manifold blocks: the machine everyone waits for
  - {name: mill_covers}     # older mill for housing covers
  - {name: deburr_bench}
  - {name: cmm}              # inspection

labor:
  pools:
    - name: machinists       # run the saw, the lathe and the mill
      headcount: 2           # <- people on each shift. Try 3.
      skills: [saw, lathe, mill]
      calendar:
        timezone: America/Chicago
        origin: "2026-11-16T06:00:00-06:00"   # Monday 6 am: time zero of the order book
        weekly:
          - {days: [mon, tue, wed, thu, fri], start: "06:00", end: "22:00"}   # two 8-hour shifts
        exceptions:
          - {date: "2026-11-26", closed: true}   # Thanksgiving
          - {date: "2026-11-27", closed: true}   # day after Thanksgiving
    - name: inspectors       # deburr and inspect
      headcount: 1
      skills: [deburr, inspect]
      calendar:
        timezone: America/Chicago
        origin: "2026-11-16T06:00:00-06:00"
        weekly:
          - {days: [mon, tue, wed, thu, fri], start: "06:00", end: "22:00"}
        exceptions:
          - {date: "2026-11-26", closed: true}
          - {date: "2026-11-27", closed: true}

locations:
  # Drive shaft MR-1015: saw -> lathe -> inspect
  - {name: saw_shaft, consumes: [{thing: steel_bar, qty: 1, uom: piece}], emits: [{thing: MR-1015_cut, qty: 1, uom: piece}],
     setup_key: saw_bar, time_model: {kind: rate_based, rate: 0.0166667, load: 600},
     machine: band_saw, labor_skill: saw, shift_crossing: pause}
  - {name: lathe_shaft, consumes: [{thing: MR-1015_cut, qty: 1, uom: piece}], emits: [{thing: MR-1015_turned, qty: 1, uom: piece}],
     setup_key: lathe, time_model: {kind: rate_based, rate: 0.0041667, load: 1800},
     machine: lathe, labor_skill: lathe, dispatch: edd, shift_crossing: pause}
  - {name: inspect_shaft, consumes: [{thing: MR-1015_turned, qty: 1, uom: piece}], emits: [{thing: MR-1015, uom: piece}],
     scrap: {rate: 0.01, thing: scrap, uom: piece},
     setup_key: cmm_shaft, time_model: {kind: rate_based, rate: 0.0166667},
     machine: cmm, labor_skill: inspect, shift_crossing: pause}

  # Manifold block MR-1020: saw -> mill -> deburr -> inspect
  - {name: saw_block, consumes: [{thing: aluminum_block, qty: 1, uom: piece}], emits: [{thing: MR-1020_cut, qty: 1, uom: piece}],
     setup_key: saw_alum, time_model: {kind: rate_based, rate: 0.0111111, load: 600},
     machine: band_saw, labor_skill: saw, shift_crossing: pause}
  - {name: mill_block, consumes: [{thing: MR-1020_cut, qty: 1, uom: piece}], emits: [{thing: MR-1020_milled, qty: 1, uom: piece}],
     setup_key: mill_manifold, time_model: {kind: rate_based, rate: 0.0003704, load: 2700},
     machine: mill_manifold, labor_skill: mill, dispatch: edd, shift_crossing: pause}
  - {name: deburr_block, consumes: [{thing: MR-1020_milled, qty: 1, uom: piece}], emits: [{thing: MR-1020_deburred, qty: 1, uom: piece}],
     setup_key: deburr_bench, time_model: {kind: rate_based, rate: 0.0033333},
     machine: deburr_bench, labor_skill: deburr, shift_crossing: pause}
  - {name: inspect_block, consumes: [{thing: MR-1020_deburred, qty: 1, uom: piece}], emits: [{thing: MR-1020, uom: piece}],
     scrap: {rate: 0.02, thing: scrap, uom: piece},
     setup_key: cmm_block, time_model: {kind: rate_based, rate: 0.0055556},
     machine: cmm, labor_skill: inspect, shift_crossing: pause}

  # Housing cover RL-215: saw -> mill -> inspect
  - {name: saw_cover, consumes: [{thing: steel_plate, qty: 1, uom: piece}], emits: [{thing: RL-215_cut, qty: 1, uom: piece}],
     setup_key: saw_plate, time_model: {kind: rate_based, rate: 0.0166667, load: 600},
     machine: band_saw, labor_skill: saw, shift_crossing: pause}
  - {name: mill_cover, consumes: [{thing: RL-215_cut, qty: 1, uom: piece}], emits: [{thing: RL-215_milled, qty: 1, uom: piece}],
     setup_key: mill_covers, time_model: {kind: rate_based, rate: 0.0013889, load: 2700},
     machine: mill_covers, labor_skill: mill, dispatch: edd, shift_crossing: pause}
  - {name: inspect_cover, consumes: [{thing: RL-215_milled, qty: 1, uom: piece}], emits: [{thing: RL-215, uom: piece}],
     scrap: {rate: 0.01, thing: scrap, uom: piece},
     setup_key: cmm_cover, time_model: {kind: rate_based, rate: 0.0166667},
     machine: cmm, labor_skill: inspect, shift_crossing: pause}

routing:                     # the order of steps for each part
  - {part: MR-1015, steps: [saw_shaft, lathe_shaft, inspect_shaft]}
  - {part: MR-1020, steps: [saw_block, mill_block, deburr_block, inspect_block]}
  - {part: RL-215, steps: [saw_cover, mill_cover, inspect_cover]}

processes: []
bom: []

economics:                   # money, so the state map can show where dollars go
  things:
    MR-1015: {price: 64, unit_cost: 23, late_cost_per_day: 150}
    MR-1020: {price: 385, unit_cost: 150, late_cost_per_day: 600}
    RL-215: {price: 88, unit_cost: 31, late_cost_per_day: 250}
  setup: {cost: 90}
