CPSolver.Examples.BinPacking (Fixpoint v0.16.3)

Bin Packing Problem Example

Given:

  • n: items, each with weights w[i]
  • b: max. bin capacity

The goal is to assign each item to a bin such that: Sum of item weights in each bin <= capacity and the number of bins used is minimized.

Link to this section Summary

Link to this section Functions

Link to this function

check_solution(result, item_weights, capacity)

Link to this function

minimization_model(item_weights, max_bin_capacity, upper_bound \\ nil)

Link to this function

model(item_weights, max_bin_capacity, upper_bound, type \\ :minimize)

Link to this function

solution_to_bin_content(solution, item_weights, capacity, objective)