Operations Management

Briefly explain that these are foundational methods used to analyze, improve, and optimize operational systems.

1. Mathematical Optimization

Smart Scheduling for Repair Shops

Cut idle & overtime costs, speed up turnaround, and keep stations working at the right pace.

1) Introduction β€” The Cost of Inefficient Scheduling

Every idle minute at a station is paid capacity you don’t use. Every overtime minute is the same work at a higher price. Manual, β€œbest-guess” schedules often cause both.

  • Idle stations β†’ wasted labor & equipment capacity.
  • Overtime β†’ paying more for the same output.
  • Knock-on effects β†’ cars wait longer, customers get frustrated.
Goal: use smart scheduling to keep stations busy at the right paceβ€”minimizing idle + overtime while reducing car flow time.
Open-shop setting Daily plan Station eligibility

2) Scheduling Model β€” What the Optimizer Does

Task: assign and sequence repair procedures to minimize total idle + overtime costs (and optionally, car flow time).

Key constraints

  • Each repair is done only at an eligible station.
  • A station works on one task at a time.
  • A car can be at one station at a time.

Inputs needed

  • Repair durations per car–task.
  • Eligibility: which stations can do which tasks.
  • Shift length & max allowable overtime.
  • Cost per minute for idle and overtime.

This is an open-shop variant: task order isn’t fixed, fitting real workflows.

3) The Mathematical Model β€” A Simple View

Decision variables

\(x_{ij}=1\) if task \(i\) is assigned to station \(j\); else \(0\).
\(s_i\) = start time of task \(i\).
\(OT_j \ge 0\) = overtime; \(ID_j \ge 0\) = idle time.

Objective

\(\min \; \sum_{j} \big( c^{OT}_j \cdot OT_j \;+\; c^{ID}_j \cdot ID_j \big)\)

Key constraints

\(\sum_{j \in \mathcal{J}_i} x_{ij} = 1\) (eligibility & assignment)
No overlap on a station \(j\).
One station per car at a time.
\(ID_j + \sum_{i} p_i x_{ij} = W_j + OT_j\).
\(0 \le OT_j \le \text{MaxOT}_j,\; ID_j \ge 0,\; x_{ij} \in \{0,1\}\).

4) How We Solve It (Exact Approach)

Small–medium cases β†’ solve MILP directly for optimal schedules.

  • Few cars/tasks/stations.
  • Single or weighted objectives.
  • Acceptable CPU time.

5) Metaheuristics for Larger Shops

For big shops β†’ metaheuristics (e.g., NSGA-II) get near-optimal schedules fast.

Why

  • Scales to large size.
  • Fast, high-quality results.
  • Handles multiple objectives.

Objectives

  • Minimize idle + overtime.
  • Minimize flow time.
  • Balance both via Pareto front.

Try it & Learn More

Explore a demo or review code:

Open live demo GitHub Code

The Result of Default Parameter Value Schedule

2. Simulation

  • Simulation: Methods & Implementation

Inventory Simulation

SimPy-based continuous-review inventory with (r,Q) and (s,S) policies, multi-product support, and detailed cost tracking.

1) Why It Matters β€” The Cost of Poor Replenishment

Fixed rules that ignore variability cause both overstock and stockouts. In continuous-review systems these show up as unnecessary holding costs, lost sales/backorders, and too many small rush orders.

  • Overstock β†’ capital tied up & storage cost.
  • Stockouts β†’ lost sales or degraded service.
  • Unstable ordering β†’ higher setup & expediting cost.
Goal: choose reorder thresholds and policy parameters that reduce average cost while maintaining service.
Multi-product Continuous-review (r,Q) & (s,S) Stochastic demand & lead time

2) System Model β€” What We Simulate

Core assumptions

  • Demand: Poisson arrivals; each customer draws a discrete demand size.
  • Lead time: exponential per order.
  • Policy per product: (r,Q) or (s,S) (exactly one active).
  • Shortage handling: backorders or lost sales (per product).
  • Costs: holding, shortage, and ordering (setup + per unit).

What you configure

  • Review interval and horizon (periods).
  • Demand/lead distributions, Q or S, and cost rates.
  • Backlog vs. lost sales behavior.

Each period: receive due orders β†’ draw demand β†’ update stock & costs β†’ reorder if the inventory position crosses its threshold.

3) Simulation Mechanics β€” One Loop

Inventory position: \(IP_t = \text{on hand}_t + \text{outstanding}_t\).
Reorder: if \(IP_t \le r\), order \(Q\) (r,Q) or up to \(S\) (s,S).
Average cost: \(\bar C = \frac{1}{H}\sum_{t=1}^{H}(C^{hold}_t + C^{short}_t + C^{ord}_t)\).
  • Receive β†’ Demand β†’ Update β†’ Possibly reorder (per product).
  • Run for horizon \(H\); record time-series for charts (inventory, position, demand).

4) Quick Defaults (Example A & B)

Review & horizon

  • Review interval: 1 period
  • Horizon: 60 periods

Demand & lead

  • Arrivals: Poisson
  • Demand size: discrete (per product)
  • Lead time: exponential

Per-product static parameters

  • Product A β€” policy (s,S): S=50, Ξ»=10, sizes=(0.5,1,1.5), probsβ‰ˆ(β…“,β…“,β…“), LΜ„=3, costs: hold=1, short=5, setup=32, unit=3, backlog=on.
  • Product B β€” policy (r,Q): Q=15, Ξ»=8, sizes=(1,2,3), probs=(0.2,0.5,0.3), LΜ„=2, costs: hold=1, short=5, setup=32, unit=3, backlog=off.

Adjust reorder points and policy parameters in the UI; charts update using the recorded history.

5) What You See β€” Inputs & Outputs

Inputs

  • Per-product policy: choose (s,S) or (r,Q).
  • Reorder point \(r\), Up-To \(S\) or Quantity \(Q\).
  • Demand & lead distributions; cost rates; backlog option.

Outputs

  • Summary per product: avg cost, holding/shortage/ordering cost, fill rate.
  • Time-series charts: inventory, position, demand.
  • Final state: on-hand and outstanding.

6) References

Try it & Learn More

Explore the Result:

Open live sample
Built with SimPy β€” a process-based discrete-event simulator for Python.

Inventory Simulation Results

GA over reorder points β€’ Best cost, stop reason, per-product metrics

3. Simulation-Optimization

  • Sim-Opt: Methods & Implementation

Inventory Simulation ⇄ Optimization

Balance holding, shortage, and ordering costs under stochastic demand & lead times. Find robust reorder points.

1) Why It Matters β€” The Cost of Poor Replenishment

Fixed rules that ignore variability cause both overstock and stockouts. In continuous-review systems these show up as unnecessary holding costs, lost sales/backorders, and too many small rush orders.

  • Overstock β†’ capital tied up & storage cost.
  • Stockouts β†’ lost sales or service degradation.
  • Unstable ordering β†’ higher setup & expediting cost.
Goal: choose reorder points \(r_i\) (with given policies) to minimize average cost per period while maintaining strong service.
Multi-product (up to 5) Continuous-review (r,Q) & (s,S) Stochastic

2) System Model β€” What We Simulate

Core assumptions

  • Demand: Poisson arrivals Γ— discrete demand size per customer.
  • Lead time: exponential per order.
  • Policy: per-product (r,Q) or (s,S) with fixed Q or S.
  • Shortage handling: backorders or lost sales (fixed per product).
  • Costs: holding, shortage, and ordering (setup + per unit).

What you control

  • Decision variables: reorder points \(r_i\) for selected products.
  • Evaluation settings: horizon (periods) and number of replicates.
  • Everything else (prices, demand/lead distributions, Q/S) is static and reasonable by design.

We review every period (e.g., daily); deliveries arrive at sampled lead times; demand hits stock; costs accrue each step.

3) Simulation Mechanics β€” One Loop

Inventory position: \(IP_t = \text{on hand}_t + \text{outstanding}_t\).
Reorder rule: if \(IP_t \le r_i\), place order of size \(Q_i\) (r,Q) or up to \(S_i\) (s,S).
Average cost: \(\;\bar C = \frac{1}{H}\sum_{t=1}^{H}(C^{hold}_t + C^{short}_t + C^{ord}_t)\).
  • Per period: receive due orders β†’ draw demand β†’ update stock & costs β†’ possibly reorder.
  • Run for horizon \(H\); repeat over replicates and average to reduce Monte-Carlo noise.

4) Optimization β€” Genetic Algorithm (GA)

Chromosome: \(x = (r_1,\dots,r_m)\) over selected products. Objective: minimize summed average cost across products.

GA steps

  • Initialization within smart bounds per product.
  • Tournament selection, uniform crossover, per-gene mutation.
  • Elitism + random immigrants; optional adaptive mutation.

Stopping & robustness

  • Time limit ~20s or Ξ΅-convergence (patience window).
  • Each fitness = average over replicates for stability.
  • No fixed RNG seed by default β†’ genuine stochastic variability.

5) What You See β€” Inputs & Outputs

Inputs

  • Products to include (subset of five).
  • Replicates (1–20) and Horizon (10–1000).
  • GA sliders: Population size, Mutation rate, Crossover rate.

Outputs

  • Best reorder points \(r_i^*\) with per-product cost breakdown & fill rate.
  • History per generation: best/mean cost for charting.
  • Counts: evaluations, simulation runs (evals Γ— replicates), stop reason.

After optimization, you can run a simulation with the best solution to inspect detailed per-product outcomes.

6) References

Try it & Learn More

Explore the Result:

Open live sample
Built with SimPy for simulation and a genetic algorithm for optimization.

Inventory Simulation–Optimization Results

GA over reorder points β€’ Best cost, stop reason, per-product metrics