Skip to content

1D Packing (BPP1D): Scope and Learning Path ​

Pack existing long items into length-limited containers, such as loading cut-to-length profiles. Each container type has length, weight capacity, cost and available stock; adjacent items may require spacing. BPP1D chooses packing compositions and produces physical placements you can inspect.

Essential Objects ​

Business conceptAPIRoleKey fields
ItemItemInputStable id, length, weight, exact amount
Container typeBinTypeInputLength, weight capacity, cost, optional inventory
ProblemPackingProblemInputItems, container types, spacing, objective
CompositionPackingPatternIntermediateContainer type ID and item counts, before coordinate expansion
Solve resultBpp1dSolutionOutputStatus/report, candidate completeness, column count, packing
Physical packingPackingResultOutputplans, free/tail intervals, material totals
IndicatorsPackingKpiOutputContainer count, item count, consumed capacity length, tail length, utilization, cost

Spacing applies only between adjacent items in the same container. There is no extra leading or trailing gap: packing n items introduces n−1 gaps.

Units and Stock

Length and weight retain physical units. Kotlin converts compatible units through its adapter; the Rust lesson normalizes inputs to meters/kilograms. inventory = null (Kotlin) / None (Rust) means unlimited; 0 / Some(0) means unavailable.

Find Business Fields in the Result ​

What to readKotlinRust
Candidate enumeration completesolution.candidateCompletesolution.candidate_complete
Used containerssolution.packing.plansplans after solution.packing.as_ref()
Container and typeplan.bin.id, plan.bin.typeplan.bin_id, plan.bin_type_id; look up context.problem().bin_types
Item intervalplacement.itemId, start, start + lengthplacement.item_id, start, length
Tail/free intervalspacking.remnants for tails; derive gaps from adjacent placementspacking.free_intervals, including internal gaps and tails
Core KPIspacking.kpi(Meter)context.kpi(&packing)

Language-Specific Results

Kotlin exposes packing directly on success; Rust uses an Option, so inspect report when no feasible solution was returned. Both KPI fields remnantLength / remnant_length count tails only, excluding spacing. The generator's complete becomes the solution's candidate-completeness field; it does not by itself prove integer optimality.

Which Entry Point? ​

EntryUse it forHow to evaluate it
Bpp1dMilpInitial integration, small instances, or generated pools that fit a direct integer masterEstablish correctness and runtime baselines; inspect completeness and column count
Bpp1dColumnGenerationInspecting LP pricing or comparing staged column activationCompare runtime, column count and reports with the same data, generation budgets and backend

Both entries currently generate a bounded finite candidate pool first. Column generation prices within that pool, and the final integer model uses the union of generated and initial columns. It does not bypass enumeration, so there is no universal item-count threshold for switching. Benchmark representative inputs.

Kotlin injects ColumnGenerationSolver and a numeric adapter into the constructor; Rust injects a solver callback into solve. See the second lesson's switching and budget example.

Scope Boundaries ​

  • This models loading existing items. For material processing, production and over/underproduction, compare CSP1D.
  • Candidate/node budgets can truncate enumeration; read candidate completeness with the report.
  • LP pricing termination and finite-pool optimality have different proof scopes from global integer optimality.
  • Tail repacking must revalidate the full plan, including global business rules.

Learning Path ​

  1. Complete Setup.
  2. Follow your first 1D packing through input, solving, placements and exact counts.
  3. Add stock, cost and custom rules in the second lesson.
  4. For custom models, consult the modeling workflow.

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

API References ​

Back to scenario selection

Continue Practicing ​

Next: Your First 1D Packing: Items, Gaps and Stock. Then explore container types, stock and cost and the business integration checks.