Case Study · Manufacturing
MMK: line balancing and order–raw material matching in flat steel production
An optimization system that matches open orders to the right raw material while respecting production line capacity and every stage of the bill of materials. Built across three phases.
- 4,000+
- Open sales orders
- ~9
- Raw material candidates per order
- 5
- Production line types
- 3 / 4
- Phases completed
Across a three-month planning horizon
Hundreds of thousands of matching combinations
Each BOM stage runs on its own line
Problem
MMK produces flat steel. Turning an order into a finished product is not a single step: the material passes in sequence through pickling, cold rolling, galvanizing and coating. Each stage has its own line, its own speed and its own capacity; every order passes through a subset of these lines in a fixed sequence set by its bill of materials.
| Line | Process | Role |
|---|---|---|
| CPL | Pickling | Surface cleaning ahead of cold rolling |
| CRM | Cold rolling | Thickness reduction; one of the most capacity-critical lines |
| HDGL | Hot-dip galvanizing | Coating; the main step of the galvanized BOM |
| CCL | Colour coating | Final processing step of the coated BOM |
| SSC | Slitting / cutting | Cutting to customer dimensions |
Two connected problems follow from this.
The first is line balancing. A stage in an order’s bill of materials cannot run before the preceding one completes, and once an order is started every stage must finish within the same planning period. Line capacity is bounded in time: line speed multiplied by production quantity cannot exceed the hours that line can run in that period. Congestion at one stage propagates through the whole chain.
The second is order–raw material matching. Which raw material an order is produced from is not fixed; alternatives exist in thickness, grade and width. Raw material can come from three sources: a physical piece in the warehouse (PieceID), a supply order already in transit, or a purchase not yet placed. On average nine candidates exist per order, each with a different producer, price and lead time.
A three-month planning exercise produces hundreds of thousands of possibilities. The existing system was rule-based and tied to predefined priorities, so there was no guarantee the matching it found was the best one. The two sub-problems cannot be solved independently: the raw material choice determines which lines are used and how heavily; line capacity determines which orders make it into the plan.
Model
The system solves in two stages. First, the orders MMK has already planned (and fixed) are placed on the lines according to its rules and constraints, and capacities are updated. Then the open orders are optimized with CPLEX under the updated capacities. This structure preserves the planner’s manual decisions; optimization runs only in the free decision space — a choice that was critical for acceptance.
The objective function is lexicographic: profit is maximized first, then the number of distinct raw materials used is minimized. The practical meaning of the second objective is this — given two plans of equal profit, the one that solves with fewer distinct raw material items wins. That is a preference that directly improves how workable the plan is on the floor: fewer set-ups, a simpler material flow. Because profit and raw material variety are in different units and the priority order is clear, no weight calibration is needed.
Profit is not the only option. Alternative primary objectives are defined per scenario — tonnage maximization and on-time-in-full (OTIF) maximization — and the user picks the objective when creating a scenario.
Decision variables cover which order matches which raw material (binary), how much raw material is consumed and supplied in each period, how much is produced at each BOM level, and how heavily each line is loaded.
System
Data comes from SAP and passes through a layered schema structure: raw data lands in a staging layer, is transformed into the main schema, and is copied into a working layer with a scenario ID when a scenario is created. The user can change data in that layer without touching the master data.
The scenario structure sits at the centre of the system. Different users can work with different objective functions and configurations; production quantities, profitability and line occupancy can be compared across scenarios. One scenario can aim to fulfil every order while another maximizes profit, and the results placed side by side.
A pre-processing layer runs before the model. One of its jobs stands out: it fills in missing line speed data from the integration using a stepwise algorithm. Missing speed data would have made the capacity constraints meaningless.
Every step of a run is written to the database with a timestamp, so the stage a scenario is at and how long it took are traceable.
Design choices
- Capacity in time, not tonnes. The same line runs at different speeds on different products; defining capacity in hours captures the effect of the product mix correctly.
- The same-period completion constraint keeps the model size in check. Letting stages spread across periods would introduce intermediate inventory variables; at planning level, single-period completion is both realistic and solvable.
- The candidate set is narrowed in pre-processing. Filtering by thickness, grade and width compatibility brings the set down to ~9 candidates per order, and removing fixed orders from the model keeps a problem with hundreds of thousands of binary variables at a size CPLEX can solve.
Outcome
The system was designed as four phases, three of which were delivered:
| Phase | Scope | Status |
|---|---|---|
| 1 | Strategical (monthly) — budget and production planning, raw material procurement planning, scenario comparison | Completed |
| 2 | Tactical (daily / ad hoc) — production allocation, open order–raw material matching | Completed |
| 3 | Operational (daily) — matching brought down to the operational level | Completed |
| 4 | Detailed scheduling and sequencing | Out of scope |
The planning team now runs the monthly budgeting exercise through scenarios: questions like “what if we raise capacity on this line” or “what if we stop buying from this supplier” can be answered with numbers. Open order–raw material matching moved from rule-based priorities to optimization; the matching is now guaranteed to be optimal.
The project was delivered as an IBM partner. The team was also trained in IBM CPLEX and optimization (Lumtify Academy, 2021).
How the model was built
| Objective | Direction | Tension |
|---|---|---|
| Profit | ↑ | First priority in the lexicographic order |
| Number of distinct raw materials used | ↓ | With profit equal, the plan using fewer raw material items wins |
Constraints
- BOM sequence — a stage cannot run before the preceding one completes
- All BOM steps of an order must finish within the same period
- Line capacity — line speed × production quantity cannot exceed available time
- User-defined additional line capacity limits
- Supplier capacities
- Each stocked piece (PieceID) can be used only once
- Production cannot exceed the order's remaining quantity
- In-transit material can only be consumed after its expected arrival period