Skip to content

2D Packing · BPP2D: Scope and Learning Path ​

Place existing rectangular parts on sheets, validate rotation, spacing, bounds and overlap, then inspect material consumption and remnants. A layout needs demand coverage, sheet-type selection and final validation, not just coordinates.

Minimum Vocabulary ​

ConceptAPIRoleKey Fields
ItemActualItemInputShape, weight and rotation permission
Sheet typeSheetTypeInputDimensions, load capacity and type identity
Layout candidateLayerIntermediatePlacements carrying a sheet type
Generation requestBpp2dLayerGenerationRequestInputItems, sheet types, spacing and candidate limits
Application serviceColumnGenerationApplicationServiceEntry / validationGeneration, assignment, packing and KPI/render output
Packing result and metricsPackingResult / packing snapshotOutputSheets, placements, free rectangles, area and termination diagnostics

Rectangles support optional 90-degree rotation. Circles and mixed shapes come later. Interior intersection is overlap; touching is not. Distinguish actual area from bounding area.

Entry Points ​

Kotlin and Rust Entry Points

Both languages expose ColumnGenerationApplicationService, but Kotlin solver injection differs from Rust's restricted-master and final-integer executors. A Rust run without solvers is not a completed integer optimization.

Understand candidate layers and final geometry validation before connecting restricted-master solves, pricing and final MILP. Do not duplicate the framework's geometry rules in your application workflow.

The application entry already orchestrates column generation; there is no equivalent Bpp2dMilp switch. Start with one sheet type and bounded candidates, then expand types and budgets. See the entry and budget example.

Boundaries ​

  • Geometric feasibility is not guillotine manufacturability. See CSP2D for production demand, cut trees and coil consumption.
  • Circle utilization uses actual circle area, not its bounding rectangle.
  • Area consumption, sheet count and type cost are different objectives. A weighted sum is not automatically strict lexicographic optimization.
  • Candidate generation or mock execution alone is neither a native solver run nor a full-problem optimality proof.

Learning Path ​

  1. Complete environment setup.
  2. Follow your first 2D layout using rectangles and one sheet type.
  3. Change rotation and spacing, then add multiple types and costs. Inject new generators instead of copying the solving loop.
  4. Decide whether a new rule constrains one candidate or the combination of selected candidates.

For LP, MILP, pricing and other algorithm terms, see the terminology guide.

Reference ​

Back to scenario selection

Continue Practicing ​

Next: Your First 2D Layout. Then explore Sheet Types, Rotation and Spacing. Before adapting the scenario to your application, complete the business integration checks.