Catalog / Optimisation & Planning / OPT-002

Production scheduling & advanced planning (APS)

Compute feasible, cost-optimal production schedules under capacity, material, setup and energy constraints, and re-plan quickly when orders, machines or prices change.

Most plants still schedule in spreadsheets or with infinite-capacity ERP runs, then fight fires on the shop floor. Advanced planning and scheduling (APS) combines constraint solvers, heuristics and ML-based forecasts of durations and demand to produce a feasible plan that minimises lateness, changeovers and (optionally) energy cost, and re-plans within minutes when something breaks. LLMs add a natural-language layer for what-if questions and explanations, but the optimisation core remains a solver.

Problem & value

  • Today: planners juggle orders, machine calendars, tooling, material shortages and setup times in Excel or in ERP modules (MRP) that assume unlimited capacity. Plans are outdated within hours; expediting and overtime cover the gap. Quoting reliable delivery dates is guesswork.
  • AI value: finite-capacity plans in minutes instead of hours, better on-time delivery, fewer changeovers, explicit scenarios ("what if machine 4 is down two days?"), and learned (not nominal) processing times.
  • Benefits: vendors and research report improvements in on-time delivery, throughput and lead time, but figures vary widely by plant and baseline; measure your own baseline before trusting any quoted percentage.
  • Energy angle: in Germany the Kopernikus project SynErgie studied making industrial production flexible to the availability of (volatile) renewable power and prices [3].

Variants

  • Job shop / make-to-order (SMB): many routings, frequent changes; lightweight APS add-on to ERP.
  • Flow/process industry: campaign planning, sequence-dependent cleaning times (food, chemicals, pharma).
  • Discrete series manufacturing: assembly lines, mixed-model sequencing, supplier call-offs.
  • Rolling re-scheduling (reactive): event-driven re-plan on breakdown, rush order, material delay.
  • Energy-aware / energy-flexible production (load shifting): APS with extra objectives and constraints: time-varying electricity price, peak-load (Leistungspreis) limits, grid-flexibility requests, and energy-intensive steps (furnaces, compressors, electrolysis, cooling) shifted to cheap or renewable-rich hours without breaking delivery dates. Needs energy metering per machine and a price/forecast feed (see PRED-007, PRED-008). Pure energy monitoring for ISO 50001/EnEfG is analytics, not optimisation. Link to site-level assets: OPT-011 (battery dispatch/flexibility) and OPT-007 (building energy/HVAC).
  • Strategic/tactical planning: S&OP, master planning across plants -> OPT-008.

How it works

ERP orders + forecast (PRED-001) + MES/machine states + energy prices (PRED-008)
  -> data model: resources, calendars, routings, setups, material
  -> demand/duration estimation (ML on historical MES times)
  -> optimisation (constraint programming / MIP / heuristics, optional RL dispatching)
  -> scenario evaluation (simulation, what-if, LLM copilot)
  -> planner review & release (human-in-the-loop)
  -> MES/ERP write-back -> execution feedback -> re-plan on events
  • Solver core: constraint programming (CP) and mixed-integer programming model job-shop/flexible-job-shop problems with sequence-dependent setups, precedence and no-overlap constraints; metaheuristics scale to large instances; dispatching rules give a fast fallback.
  • ML role: predicts realistic cycle times, scrap and downtime risk (PRED-006), and demand; learned dispatch policies (reinforcement learning, graph neural networks) are an active research area but rarely replace solvers in production.
  • LLM role: translates planner questions into scenario parameters or solver models and explains plans (see OPT-018); the LLM must never be the scheduler itself.
  • Human-in-the-loop: planners approve and may lock jobs ("frozen horizon"); overrides are logged and fed back.

Data preparation

An APS needs reliable master and shop-floor data: routings, bills of material, setup matrices, machine calendars, material availability and order data. These live in the ERP, in MES or machine data systems, and often in Excel sheets of the planner and paper shop-floor documents.

Typical gaps are outdated routings and cycle times, missing setup times, unmaintained machine calendars, inconsistent BOM versions and real constraints known only to the foreman.

Preparation steps: - Extract ERP and MES data (PREP-005) and compare planned against actual times from 3-6 months of confirmations. - Correct master data: routings, set-up matrices, calendars, lead times; assign owners (PREP-004). - Move Excel planning logic into tidy tables (PREP-011) and replace paper confirmations with digital capture (PREP-008). - Document planner rules and priorities explicitly (PREP-016).

Rough share of effort: 40-60 percent, usually the main cost driver and often the reason APS projects fail. Run GUIDE-003 before choosing a tool.

Implementation paths

Which path for whom

  • SMB: Path A. APS modules in ERP/MES suites or specialist tools are mature at SMB prices; the effort lies in master data, not in the solver.
  • Enterprise: Path B. Scheduling is a strategic lever with plant-specific constraints, so a solver integrated with ERP/MES on own cloud fits better than a standard module.
  • Developer: Path C. OR-Tools CP-SAT or Timefold run on HW1 and allow custom constraint models.
  • Enterprise suites: SAP Integrated Business Planning and SAP S/4HANA PP/DS (EU), Siemens Opcenter Scheduling / Preactor (EU-based vendor), Dassault Systemes DELMIA Quintiq (EU), Oracle, Kinaxis.
  • Mid-market/SMB APS & MES: PSIsoftware / PSI Metals (EU), ORSOFT (EU), Fastec / FELIOS (EU), Asprova, Plex/Rockwell (US), Microsoft Dynamics 365 Supply Chain Management planning optimization.
  • Choose A when: an ERP/MES exists, rules are standard, and you need vendor support and MES write-back. Check: finite-capacity solver quality, setup-matrix support, scenario handling, EU hosting, ERP connector.

Path B — Build on cloud APIs

  • Managed solvers: Gurobi, FICO Xpress, Hexaly (EU, France), Google OR-Tools CP-SAT (free) running in your cloud tenant (EU region). Data layer via ERP APIs/OPC UA/MQTT; orchestration with Airflow or n8n.
  • LLM copilot via an EU-hosted frontier API (e.g. Mistral, or Claude/Gemini/GPT in EU regions) with tool calls into a validated scheduling service.
  • Choose B when: you have unusual constraints no product models well and some data/OR engineering talent.

Path C — Self-host (open source)

  • Solvers: Google OR-Tools (CP-SAT) [1], HiGHS, SCIP, Timefold Solver (open-source planning engine, Belgium, EU) [2], OptaPlanner lineage, Pyomo/PuLP modelling, JobShopLib for research.
  • Data/simulation: PostgreSQL, SimPy or AnyLogic-style discrete-event simulation, Grafana for Gantt/KPI views.
  • Hardware: HW1 (CPU server) suffices for the solver; small local LLM (HW2) only for the copilot layer.
  • Effort: 3-9 months incl. data model, integration and planner acceptance.

Path D — Custom training

Worthwhile for learned duration/yield models using several months of MES history, or for RL dispatching policies trained in a simulator of your plant. Needs clean timestamped order-operation data; start with gradient boosting before deep learning. Keep a solver or rule-based fallback.

State of the art (2026)

  • CP-SAT-class solvers are the practical workhorse for scheduling: strong on no-overlap, setup and precedence constraints, with parallel search and anytime solutions [1]. Specialised engines (Timefold, Hexaly) compete on large, multi-constraint instances [2].
  • Hybrid ML + optimisation: learned processing times and predicted-disruption buffers feed the solver ("predict then optimise"); RL/GNN dispatching helps for very fast reactive decisions but benchmarks are mostly academic.
  • LLM-to-solver copilots (OPT-018) lower the barrier for what-if analysis; reliability depends on validated model templates, not free-form generated models.
  • Digital twins and discrete-event simulation are used to stress-test schedules before release.
  • Energy-flexible production moved from research to pilots and early products as dynamic tariffs and grid-fee incentives spread; adoption is limited by process constraints and metering [3].
  • Limits: garbage master data (wrong routings, setup times) is the main failure cause; nervous re-planning destabilises the shop floor (use frozen horizons); NP-hard instances need time limits and gap reporting; optimal on paper is not feasible if tooling, operators or material are not modelled.

Shared resources & combinations

Effort, cost & KPIs

  • Path A: 2-6 months for implementation and master-data clean-up; licence per site/planner/module.
  • Path B/C: 3-9 months; cost is dominated by data modelling and integration, not compute.
  • KPIs: on-time-in-full delivery, schedule adherence, lead time, WIP, changeover time, machine utilisation, planner time per plan, re-plan time, energy cost per unit and peak load (energy variant).

People & change

Involve management (sponsor, targets), the production and planning leads (process owners), planners and foremen as daily users, IT for ERP/MES integration, data owners for master data, and the works council.

Works council: depends. The schedule itself is not employee monitoring, but if machine or MES data can be linked to individual operators or shifts, or the schedule dictates working times, §87(1) no. 6 (and §87(1) no. 2/3 on working time) BetrVG apply; §90(1) no. 3 requires early information about AI-planned work processes. Clarify in a works agreement (GUIDE-004). Public-sector plants: staff council.

Data protection: mostly non-personal machine and order data; involve the DPO only if operator IDs or shift data are processed, then check AVV and DPIA (GUIDE-005).

AI literacy: train planners on what the solver assumes and how to read what-if scenarios, supporting AI literacy as Art. 4 AI Act requires (GUIDE-006).

Pilot on one line or work centre, run in parallel to manual planning, and track adherence. Typical concerns: planners fear loss of expertise, foremen distrust schedules. Address them by letting planners fix constraints and override sequences; the system proposes, humans decide (GUIDE-008, GUIDE-009).

Risks, regulation & compliance

  • EU AI Act: typically minimal risk (planning of machines and orders). Becomes relevant if scheduling individual workers (assignment, monitoring, performance evaluation) -> Annex III employment/worker management may apply (see OPT-003). Art. 4 AI literacy applies. Check Machinery Regulation (EU) 2023/1230 if AI directly controls safety functions; scheduling normally does not.
  • GDPR / works council: operator-level schedules and performance data are personal data; German works council co-determination (Section 87 BetrVG) applies to systems capable of monitoring staff.
  • Operational risks: stale data, infeasible plans, over-reliance; mitigate with plan validation, frozen horizons, manual override, and fallback to dispatching rules.
  • Energy variant: respect process safety and product quality limits; coordinate with grid-operator agreements and EnEfG/ISO 50001 duties.

Getting started

  1. Pick one bottleneck area (a line or work centre) and gather 6-12 months of order/operation timestamps.
  2. Clean routings, setup matrix and calendars; compare nominal vs. actual durations.
  3. Prototype with OR-Tools CP-SAT or a vendor trial; compare against the planner's real schedule on historical weeks.
  4. Run in shadow mode for 4-8 weeks, then release with frozen horizon and override logging.
  5. Add the energy objective (price/peak) only after the base plan is trusted.

Sources

  1. Google OR-Tools — Scheduling (job shop, CP-SAT) — https://developers.google.com/optimization/scheduling
  2. Timefold — open-source planning solver — https://github.com/TimefoldAI/timefold-solver
  3. Kopernikus-Projekt SynErgie — https://www.kopernikus-projekte.de/projekte/synergie
  4. SAP — Production Planning and Detailed Scheduling (PP/DS) — https://help.sap.com/docs/SAP_S4HANA_ON-PREMISE/ppds
  5. Siemens — Opcenter Scheduling — https://plm.sw.siemens.com/en-US/opcenter/
  6. Hexaly — optimizer for scheduling — https://www.hexaly.com/
  7. Regulation (EU) 2024/1689 (AI Act) — https://eur-lex.europa.eu/eli/reg/2024/1689/oj