Class LoadBalanceImpl<Balanced_>
java.lang.Object
ai.timefold.solver.core.impl.score.stream.collector.LoadBalanceImpl<Balanced_>
- All Implemented Interfaces:
LoadBalance<Balanced_>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionloads()Returns the items being balanced, along with their total load.registerBalanced(Balanced_ balanced, long metricValue, long initialMetricValue) @NonNull BigDecimalThe unfairness measure describes how fairly the load is distributed over the items; the higher the number, the higher the imbalance.voidunregisterBalanced(Balanced_ balanced, long metricValue)
-
Constructor Details
-
LoadBalanceImpl
public LoadBalanceImpl()
-
-
Method Details
-
registerBalanced
-
unregisterBalanced
-
loads
Description copied from interface:LoadBalanceReturns the items being balanced, along with their total load. The iteration order of the map is undefined. For use in justifications, create a defensive copy of the map; the map itself is mutable and will be mutated by the constraint collector.- Specified by:
loadsin interfaceLoadBalance<Balanced_>
-
unfairness
Description copied from interface:LoadBalanceThe unfairness measure describes how fairly the load is distributed over the items; the higher the number, the higher the imbalance. When zero, the load is perfectly balanced.Unfairness is a dimensionless number which is solution-specific. Comparing unfairness between solutions of different input problems is not helpful. Only compare unfairness measures of solutions which have the same set of balanced items as input.
- Specified by:
unfairnessin interfaceLoadBalance<Balanced_>- Returns:
- never negative, six decimal places
-