Skip to content

Produce context model ​

1. Overview ​

Produce owns cutting-plan usage variables and product-yield expressions. It compiles generated plans into a restricted master and updates the model as columns are inserted.

1. Dependent Contexts ​

Material supplies products, demand, and plan coefficients. Cutting-plan generation supplies initial and priced columns. Optional length-assignment and loss-objective pipelines depend on the produce aggregate. The application controls solving.

2. Concepts / Entities ​

1. Products and Plans ​

dp: Demand of product p.

apj: Contribution of one use of plan j to product p's demand. In Demo3's count-based configuration, it is the corresponding piece count.

2. Material Usage and Remaining Width ​

m(j): Material used by plan j; one use consumes one batch of that material.

rj: Remaining width of one plan, computed from plan data. It does not depend on total product output in the master.

3. Variables ​

1. Decision Variables ​

xj: Dimensionless usage count of plan j, for every j∈Jt. Column-generation LPs use xj∈R≥0; integer solving uses xj∈Z≥0.

Product yield qp is an intermediate value, not another unlinked production variable.

2. Auxiliary Variables ​

When integer-solve configuration includes yield-deviation terms for a demand, up,op∈R≥0 represent underproduction and overproduction in demand units, for every p∈P. The LP path does not register yield slack. Demo3 configures no such terms and uses hard demand coverage. This condition is not a separate API switch named slack.

4. Predicates ​

active(j,t): Plan j was inserted before the current solve.

feasible(j): Plan j satisfies material and processing rules.

contributes(j,p): Plan j contributes nonzero demand for product p.

slackEnabled(p): Integer-solve configuration includes yield-deviation terms for product p's demand; this is notation for a configuration condition.

5. Sets ​

P: Products; M: materials.

Jt: Available plan columns at restricted-master solve t; Jtm: those using material m.

Jt={j:active(j,t)∧feasible(j)}.

This is an iteration-dependent finite set, not all cutting plans enumerated in advance.

6. Intermediate Values ​

1. Product Yield ​

Description: Product output is each plan's demand contribution multiplied by its usage, summed per product.

qp=∑j∈Jtapjxj,∀p∈P.

2. Material Usage ​

Description: Each use of a plan belonging to material m consumes one batch. Usage is not reconstructed as a separate model from product output.

Um=∑j∈Jtmxj,∀m∈M.

3. Total Remaining Width ​

Description: Each plan's remaining width is a fixed column coefficient. Its total is weighted by plan usage.

R=∑j∈Jtrjxj.

qp,Um,R are derived quantities. Configuration determines whether a particular loss expression is registered or included in an objective.

7. Assertions ​

Every master column must be feasible, with demand contributions in units compatible with dp:

∀j∈Jt:feasible(j),∀p∈P, j∈Jt:apj≥0.

Fractional LP plan usage must not be interpreted as a final production plan. Integer results still require analysis against original demand and plan data.

8. Constraints ​

1. Product Demand Coverage [产品需求覆盖] ​

Description: The ordinary demand configuration requires output to meet demand separately for each product.

s.t.∑j∈Jtapjxj≥dp,∀p∈P.

Summing all product outputs and comparing that single sum with each product's demand is not equivalent.

2. Yield Slack Form [产出松弛形式] ​

Description: When under/overproduction is enabled, the corresponding balance form is:

qp−op+up=dp,up,op≥0,∀p∈P.

The selected pipelines determine whether shortage is allowed, bounded, or penalized. This equation alone does not enforce the original hard demand.

3. Optional Resource and Length Rules ​

For finite available batches Bm, the material pipeline registers:

s.t.Um≤Bm,∀m∈M with finite available batches Bm.

Demo3 sets no finite material-batch limit and has an empty machine list. It therefore registers material-usage expressions but produces no material-batch upper bounds or machine constraints. Dynamic-length and other resource rules also require corresponding data and configuration, not an undefined machine-hour capacity substitute.

9. Objective Function (if applicable) ​

Description: The base plan-usage objective minimizes usage count:

minZ=∑j∈Jtxj.

Demo3 supplies no extra solve configuration and uses this default objective, without additional yield-deviation, waste, or length objectives. Optional loss pipelines may configure remaining-width, material-cost, or overproduction objectives. Do not add all terms unconditionally or mix width and monetary cost without a defined unit conversion.

10. Algorithm References ​

AlgorithmReferenced InDescription
Restricted-master LPSections 3, 8, 9Computes the current column-pool solution and dual prices
Plan pricingMaterial and generation servicesSearches feasible plans with negative reduced cost
Column insertionSections 5, 6Adds usage variables and updates yield, resource, and objective coefficients
Integer solving and analysisSections 3, 7Converts column usage into executable cutting plans

Kotlin produce-context source; Kotlin/Rust example entry points.

11. Ubiquitous Language ​

TermSymbolDefinition
Plan usagexjNumber of uses of a plan
Product yieldqpTotal demand contribution from plans
Material usageUmPlan-weighted material consumption
Total remaining widthRPlan remaining widths weighted by usage
Under/overproductionup,opDeviations in the optional demand-balance form
Current column poolJtCutting plans available to this master solve

12. Design Decisions ​

DecisionAlternativeRationale
Declare usage by planDeclare unlinked product and plan quantitiesColumn coefficients preserve yield consistency
Separate LP and integer phasesSolve an integer master before every pricing callLP duals drive column generation
Identify optional slack and objectivesEnable every penalty and resource rule by defaultKeeps the model consistent with configuration

13. Change Log ​

VersionChangeReason
1.1Aligned bilingual yield equations, domains, and remaining-width definitionsRemoved mixed product and plan variables