You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Swapnil Shah (Jira)" <ji...@apache.org> on 2026/07/22 06:25:00 UTC

[jira] [Created] (OFBIZ-13462) MRP - Constrained Capacity Mode

Swapnil Shah created OFBIZ-13462:
------------------------------------

             Summary: MRP - Constrained Capacity Mode
                 Key: OFBIZ-13462
                 URL: https://issues.apache.org/jira/browse/OFBIZ-13462
             Project: OFBiz
          Issue Type: New Feature
            Reporter: Swapnil Shah


OFBiz MRP engine currently plans with an infinite-capacity assumption. When it back-schedules a proposed production run from its required-by date, it only checks the machine's working calendar — which weekdays the machine is open and for how many hours. It never checks how much of that time is already taken, either by existing production runs on the shop floor or by other orders proposed within the same MRP run.

As a result, every proposed order sees every machine as completely free. Two runs each needing 6 hours on a machine with an 8-hour day are both planned onto the same day — 12 hours of work into an 8-hour window — with no warning. The plan looks feasible on paper but is impossible to execute, and planners must find and resolve these overloads manually.

MRP should offer an optional mode to trigger a *_Constrained Capacity_* run with finite-capacity planning i.e., treat each machine's daily capacity the way MRP already treats material — as a limited resource that each planned order consumes — so that later orders only get what remains, demand is prioritized by date (the same principle used for material netting), and orders that cannot fit are visibly delayed or reduced (flagged Late/Short on the Requirement) rather than silently overbooked. 

Not to mention, the *default ({_}Unconstrained Capacity{_})* run would remain untouched, so existing users see zero change unless they opt in for Constrained run or make it default (check "Configuring Default MRP Run Mode" section below).

The ‘{*}Constrained Capacity{*}’ mode is *Optional* and disabled by default, MRP defaults to ‘Unconstrained Capacity Plan’ mode which behaves exactly as today.

 

*High Level Feature Expectation*

{*}_Terminology_{*}{_}:{_} 
 * _a "proposed production run" is a planned manufacturing order that the MRP run creates;_ 
 * _a "committed production run" is an existing approved or running production run on the shop floor; the "originating demand" is what triggered a proposal — typically a customer sales order, or a stock level falling below its configured minimum._

How the MRP run works when the new *Constrained Capacity* mode is switched on:
 * Capacity committed to open and running production runs is accounted for by schedule priority: a committed run whose estimated start date is earlier than (or equal to) a proposed run's start date holds its booked capacity first; a proposed run whose start date is earlier than a committed run's estimated start date claims the capacity its dates require, even if its work overruns into the committed run's window — such overlaps are permitted, reported as capacity conflicts, and left to the planner to resolve manually.
 * Competing demand among proposed orders for the same machine is served in requirement-date priority — the same principle used for materials.
 * Orders are scheduled backward from their due date; if capacity forces the start into the past, the order is scheduled forward instead and marked {*}Late{*}.
 * If an order cannot be completed even within the allowed delay window, its quantity is reduced to what capacity allows and it is marked *Short* (down to zero, with the unmet demand reported).
 * The knock-on effects are handled automatically. A reduced supply triggers re-sizing of the following orders for the same product, so nothing falls through the cracks. In multilevel bills of material, a delayed component automatically pushes its parent's schedule out — the final plan never shows an assembly starting before its parts are ready. The flags travel with the requirements and onto the production runs created from them.
 * {*}Late/Short indicators{*}, the original required date, and any unmet quantity are stored on the resulting requirements, carried through to production runs on conversion, and every affected order names the bottleneck machine so planners know where to act.
 * Later, post-MRP run, produce a _Capacity Conflict report_ listing every permitted overlap between proposed and committed work, for planner resolution.

*Scenario Planning: Two plans side by side - Constrained and Unconstrained modes*

Each MRP run can be executed in one of two modes — Constrained Capacity (finite capacity run, this feature) or Unconstrained Capacity (infinite capacity run- today's behaviour) — and everything a run produces is stamped with its mode. A new run replaces only its own mode's results: its MRP events and its unapproved requirements. The other mode's plan survives untouched. This lets planners keep both pictures at once — what demand truly wants (unconstrained) next to what capacity can deliver (constrained) — and read the gap between them as the measurable cost of the capacity constraint.

*Configuring Default MRP Run Mode*

Each facility designates one mode as its {*}_Default MRP Run Mode_{*}. Requirements from that mode are normal proposals and can be approved as today. Requirements from the other mode are created in a *_Simulated_* status that cannot be approved — the approve action doesn't apply/exist for them, so nobody can accidentally act on the reference plan and double-order. Anything already approved is a commitment: it is never deleted, never demoted, and is counted as real supply by both modes.

*_Upgrade_* — deliberately switching which mode is Default MRP Run Mode. If the simulation proves to be the better plan, a planner with the right permission *_Upgrades_* it: one explicit, logged action that swaps the two plans' statuses.
 * The simulation's proposals become the approvable set;
 * The old plan's unapproved proposals are demoted to Simulated (kept for comparison — and making the upgrade reversible); The requirement status changes are logged.
 * Approved commitments are untouched.
 * A single simulated requirement can also be upgraded individually when only one piece of the simulation is wanted.
 * Recommended practice: Upgrade, and then immediately re-run MRP in the newly active mode, so the live plan is regenerated fresh against everything that changed since the simulation was computed.

*Few Important Rules to be honored* 
 * Machine groups pool their members' hours. A group of two 8-hour machines offers 16 hours a day; work a supervisor assigns to one member reduces the group's pool. But a single run's task can only use one machine's worth of hours per day.
 * Calendars are timetables, not shared pools. Two machines using the same calendar each get its full hours independently.
 * Time and capacity are separate. A routing step's duration comes from its configured time estimates, exactly as today. Machine capacity is consumed only by steps that have a machine assigned; steps without one take their estimated time on the default calendar but load no machine.
 * Granularity is the day. The plan guarantees no machine is loaded beyond its daily hours (outside reported conflict windows); the exact order of runs _within_ a day remains the planner's decision.



To be added - Design Details & Supported Use Cases

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)