Projects / Manufacturing intelligence
Case study · Manufacturing · Digital twin

Factory Manufacturing Intelligence System

An AI-driven digital twin for an aerospace and electronics production facility. Each day it tells leadership which assemblies to kit, who should build them, and when every customer order is likely to ship, with stated confidence.

The problem

An MES records what happened, and an ERP plans what should happen. Neither says what will happen given today's work in process, staffing and deep multi-level BOMs, so delivery commitments came down to judgment and hope.

What I built

A 20+ module Python system that reads live MES data, simulates the factory thousands of ways, optimizes the next three shifts, and presents the results in a 14-dashboard executive suite.

The result

A daily review with diagnosis, specific remedies and their quantified effects, plus probabilistic delivery dates. It was built by one architect directing AI, where this would normally take a multi-year team effort.

20+integrated Python modules
14executive dashboards
P10/50/90delivery-date confidence
~180assemblies per BOM, up to 35 levels deep
4production scenarios run in parallel
Architecture

From raw MES transactions to tomorrow's decisions

Six layers, refreshed every day from production data.

Data ingestionLive MES database, status-transition durations
→
BOM parsingFull-path ancestry, BOM graph (DAG)
→
MIP optimizationKit release & technician assignment over 3 shifts
→
Planned simulationFactory state machine, 24-hour multi-shift
→
Ensemble Monte Carlo4 scenarios, calibrated touch times
→
DashboardsDelivery dates, risks, shift plans
Outputs

What factory leadership sees every morning

DashboardWhat it answers
Projected Delivery DatesWhen will the next 10 units of each product line ship? (P10/P50/P90, per scenario)
Customer ETAsWhich customer orders are at risk of being late, and under which scenarios?
Shift AssignmentWhich technician works on which assembly today, matched by skill?
Joint 3-Shift PlanWhat should we kit and release over the next three days?
Ensemble Forecast & RiskHow wide is the spread between baseline, realistic, ideal and NCR-reduced outcomes?
Digital Twin Deep DiveWhere are the bottlenecks? (sub-assembly completion heatmaps)
Delivery DistributionsWhich exact BOM lineage feeds each predicted ship unit?
Verification & DiagnosticsCan we trust today's forecast? (WIP confirmation, prediction accuracy)

Screens from the running system

All data is simulated. Each run generates a new factory history; these screens show simulated day 2027-04-08. Click any screen to see it full size.

Ship date forecast with P10, P50 and P90 days to ship for four scenarios
Ship date forecast: P10/P50/P90 days to ship under four scenarios, with the delay currently caused by quality issues.
Table of today's kit release plan by part with released, demand, capacity and shortfall
Kit release plan: what the optimizer releases today, by part, and where demand exceeds capacity.
Bar chart breaking a bottlenecked part into technician, workstation, stock, NCR and ECO causes
Bottleneck root cause: one view of which constraint actually limits a part.
Line chart of whole-shift technician efficiency over ten simulated days, standard versus actual hours
Efficiency trend: whole-shift efficiency over the last ten simulated days.
Grid of colored tiles showing the status of every unit in each assembly of the bill of materials
BOM and WIP status: every unit in every assembly, colored by stage.
Technical depth

For the engineers in the room

Simulation & optimization
  • Monte Carlo discrete-event simulation over 60-day horizons, giving delivery probability distributions per order
  • Mixed Integer Programming (PuLP) for daily kit release across three shifts, balancing two product lines against shared workstation capacity and technician skills
  • A factory state machine of over 1,700 lines tracking every assembly through each quality-gate stage, loaded with real WIP
  • A four-scenario ensemble with each scenario isolated, so results cannot leak between runs
Learning & calibration
  • EWMA touch-time calibration from live MES observations, with step-change detection (resets the anchor when z > 2.5σ)
  • Bayesian credibility blending to keep the system stable while data is sparse
  • GAN-style adaptive models (completion time, resource loading, NCR patterns) that switch on only once enough data has built up
  • A daily feedback loop comparing predictions with actuals (MAPE, bias, RMSE) that sets the weight of each model
Where domain experience mattered
  • Spotted forecast values that came from cache misuse rather than real Monte Carlo results, and traced the full chain of causes back to the root
  • Saw that the BOM traversal was counting sub-assembly completions as shipped root assemblies
  • Found that the parent-order field was empty in the MES and redesigned traceability around the BOM structure instead
  • Pushed the AI away from patching symptoms toward structural fixes, and checked each change against targeted debug output before production runs
Applying it to your factory

Built to integrate

The system is designed to sit on top of the enterprise tools you already have. To estimate the labor cost reduction for your own operation, see the ROI calculator.

  • ERP: optimizer output is structured to be pushed straight into work orders
  • MES: SQLite ingestion is already in place; REST or OPC-UA connectors are a direct extension
  • PLM/PDM: BOM parsing from Excel can be swapped for API calls
  • QMS: live NCR rates plug into the existing scenario parameters
  • Customer portal: ETA output is ready for delivery-commitment reporting
Technology

Stack

PythonStreamlitFastAPIJinja2PlotlyPuLP (MIP)NumPySciPyPandasPyTorchscikit-learnNetworkXSQLiteOpenPyXLAnthropic Claude

Product names, customer data and facility details are withheld. Screenshots of dashboards with sample data are available on request.

Want delivery dates you can defend?

I can adapt this approach to your production data, BOMs and enterprise systems.

Start a conversation

← Back to all projects