C++ Reference: class LocalDimensionCumulOptimizer

This documentation is automatically generated.

Class used to compute optimal values for dimension cumuls of routes, minimizing cumul soft lower and upper bound costs, and vehicle span costs of a route. In its methods, next_accessor is a callback returning the next node of a given node on a route.
Method
ComputePackedRouteCumuls

Return type: bool

Arguments: int vehicle, const std::function<int64(int64)>& next_accessor, std::vector<int64>* packed_cumuls

Similar to ComputeRouteCumuls, but also tries to pack the cumul values on the route, such that the cost remains the same, the cumul of route end is minimized, and then the cumul of the start of the route is maximized.

ComputeRouteCumulCost

Return type: bool

Arguments: int vehicle, const std::function<int64(int64)>& next_accessor, int64* optimal_cost

If feasible, computes the optimal cost of the route performed by a vehicle, minimizing cumul soft lower and upper bound costs and vehicle span costs, and stores it in "optimal_cost" (if not null). Returns true iff the route respects all constraints.

ComputeRouteCumulCostWithoutFixedTransits

Return type: bool

Arguments: int vehicle, const std::function<int64(int64)>& next_accessor, int64* optimal_cost_without_transits

Same as ComputeRouteCumulCost, but the cost computed does not contain the part of the vehicle span cost due to fixed transits.

ComputeRouteCumuls

Return type: bool

Arguments: int vehicle, const std::function<int64(int64)>& next_accessor, std::vector<int64>* optimal_cumuls

If feasible, computes the optimal cumul values of the route performed by a vehicle, minimizing cumul soft lower and upper bound costs and vehicle span costs, stores them in "optimal_cumuls" (if not null), and returns true. Returns false if the route is not feasible.

dimension

Return type: const RoutingDimension*

LocalDimensionCumulOptimizer

Return type: explicit

Arguments: const RoutingDimension* dimension