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
2. Material Usage and Remaining Width
3. Variables
1. Decision Variables
Product yield
2. Auxiliary Variables
When integer-solve configuration includes yield-deviation terms for a demand, slack.
4. Predicates
5. Sets
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.
2. Material Usage
Description: Each use of a plan belonging to material
3. Total Remaining Width
Description: Each plan's remaining width is a fixed column coefficient. Its total is weighted by plan usage.
7. Assertions
Every master column must be feasible, with demand contributions in units compatible with
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.
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:
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
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:
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
| Algorithm | Referenced In | Description |
|---|---|---|
| Restricted-master LP | Sections 3, 8, 9 | Computes the current column-pool solution and dual prices |
| Plan pricing | Material and generation services | Searches feasible plans with negative reduced cost |
| Column insertion | Sections 5, 6 | Adds usage variables and updates yield, resource, and objective coefficients |
| Integer solving and analysis | Sections 3, 7 | Converts column usage into executable cutting plans |
Kotlin produce-context source; Kotlin/Rust example entry points.
11. Ubiquitous Language
| Term | Symbol | Definition |
|---|---|---|
| Plan usage | Number of uses of a plan | |
| Product yield | Total demand contribution from plans | |
| Material usage | Plan-weighted material consumption | |
| Total remaining width | Plan remaining widths weighted by usage | |
| Under/overproduction | Deviations in the optional demand-balance form | |
| Current column pool | Cutting plans available to this master solve |
12. Design Decisions
| Decision | Alternative | Rationale |
|---|---|---|
| Declare usage by plan | Declare unlinked product and plan quantities | Column coefficients preserve yield consistency |
| Separate LP and integer phases | Solve an integer master before every pricing call | LP duals drive column generation |
| Identify optional slack and objectives | Enable every penalty and resource rule by default | Keeps the model consistent with configuration |
13. Change Log
| Version | Change | Reason |
|---|---|---|
| 1.1 | Aligned bilingual yield equations, domains, and remaining-width definitions | Removed mixed product and plan variables |