Skip to content

Framework Example 3: One-Dimensional Cutting Stock — Overview ​

中文

1. Overview ​

This example uses the one-dimensional cutting-stock (CSP1D) framework to separate product/material data, the cutting-plan master, and pricing. The overview explains column generation; the material and produce pages define the data contract and master model separately.

2. Contexts and Dependencies ​

ContextResponsibilityDependency
MaterialProducts, demand, materials, and cutting-plan dataInput configuration
ProducePlan-usage variables, yield/resource expressions, and master pipelinesMaterial, generated plans
Cutting-plan generationInitial plans and improving-column searchMaterial, master duals
Length assignment and wasting minimizationOptional length rules and loss-related objectivesMaterial, produce, configuration

The application assembles contexts and controls column generation. Algorithm roles must not be treated as a second independent production-variable family.

3. Concepts, Sets, and Predicates ​

P is the product set, M the material set, and Jt the cutting plans available at master solve t. Product demand is dp and plan yield contribution is apj. Predicates distinguish feasible plans, inserted columns, and products with optional length rules.

4. Variables and Intermediate Values ​

xj is the usage count of plan j, not the production quantity of product p. Product yield is qp=∑j∈Jtapjxj. Each plan's remaining width is a plan coefficient; total remaining width is its usage-weighted sum. Global product output must not be substituted into every plan's waste calculation.

5. Assertions, Constraints, and Objectives ​

Demand is imposed per product as qp≥dp. Configured slack and resource limits follow their owning pipelines; optional rules are not automatically active in the small example. Master variables are continuous during column-generation LP solves and nonnegative integers during integer solving.

6. Algorithms and Lifecycle ​

Generate initial plans, solve the restricted master, extract dual prices, search for negative-reduced-cost plans, deduplicate and insert columns, and solve again. Termination must distinguish complete pricing with no improving columns from an early return caused by time or iteration limits.

7. Register → Construct → Solve → Analyze ​

Registration creates the produce aggregate and its pipelines. Construction compiles available plans into master columns. Solving alternates the master and pricing. Analysis converts plan usage into product yields and material usage.

8. Source Entry Points ​

9. Kotlin/Rust Comparison and Design Decisions ​

Both language entry points call their CSP1D frameworks rather than reimplement every context inside the Demo directory. Mathematical notation consistently indexes variables by plan j, so language-level naming differences do not imply different models.

10. Context Model Pages ​

11. Change Log ​

VersionChangeReason
1.1Aligned bilingual overviews, notation, and source entry pointsKeep the overview consistent with its context models