Module org.cicirello.chips_n_salsa
Class BinPackingSolution
java.lang.Object
org.cicirello.search.problems.binpack.BinPackingSolution
This class represents a solution to a
BinPacking
problem instance. Although you cannot
construct instances of it directly (it doesn't have a public constructor), you can use the
methods of this class to inspect the solution such as number of bins, and contents of the bins.-
Method Summary
-
Method Details
-
cost
public final int cost()Gets the cost of this solution (i.e., number of bins used).- Returns:
- solution.size();
-
getBin
Gets one of the bins in this solution.- Parameters:
i
- The id of the bin.- Returns:
- The i-th bin in the solution.
-