If feasible, computes the optimal cost of the entire model with regards to
the optimizer_core_'s dimension costs, minimizing cumul soft lower/upper
bound costs and vehicle/global span costs, and stores it in "optimal_cost"
(if not null).
Returns true iff all the constraints can be respected.
If feasible, computes the optimal values for cumul, break and resource
variables, minimizing cumul soft lower/upper bound costs and vehicle/global
span costs, stores them in "optimal_cumuls" (if not null), "optimal_breaks"
and "optimal_resource_indices_per_group", and returns true.
Returns false if the routes are not feasible.
Similar to ComputeCumuls, but also tries to pack the cumul values on all
routes, such that the cost remains the same, the cumuls of route ends are
minimized, and then the cumuls of the starts of the routes are maximized.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-06 UTC."],[[["\u003cp\u003e\u003ccode\u003eGlobalDimensionCumulOptimizer\u003c/code\u003e helps minimize costs related to cumulative values, soft lower/upper bounds, and vehicle/global spans for a given Routing Dimension.\u003c/p\u003e\n"],["\u003cp\u003eIt offers methods to compute optimal cumulative values, breaks, and resource indices, or only the optimal cost without considering fixed transit times.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eComputePackedCumuls\u003c/code\u003e further optimizes the arrangement of cumulative values on routes while maintaining the same cost.\u003c/p\u003e\n"],["\u003cp\u003eIt utilizes a specified scheduling solver type for computations.\u003c/p\u003e\n"],["\u003cp\u003eAccess to the underlying Routing Dimension is provided through the \u003ccode\u003edimension\u003c/code\u003e method.\u003c/p\u003e\n"]]],["The `GlobalDimensionCumulOptimizer` class computes optimal values for cumul, break, and resource variables. It has methods to compute the optimal cost without transits (`ComputeCumulCostWithoutFixedTransits`), optimal values for cumul and breaks (`ComputeCumuls`), and packed cumul values across routes (`ComputePackedCumuls`). These computations minimize cumul soft lower/upper bound costs and vehicle/global span costs. It takes a `RoutingDimension` and a solver type to function, providing the `dimension` itself as well.\n"],null,["# GlobalDimensionCumulOptimizer\n\nC++ Reference: class GlobalDimensionCumulOptimizer\n==================================================\n\n\nNote: This documentation is automatically generated.\n\n| Method ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [`ComputeCumulCostWithoutFixedTransits`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/routing_lp_scheduling.h#L815) | Return type: `DimensionSchedulingStatus ` Arguments: ` const std::function\u003cint64_t(int64_t)\u003e& next_accessor, int64_t* optimal_cost_without_transits` If feasible, computes the optimal cost of the entire model with regards to the optimizer_core_'s dimension costs, minimizing cumul soft lower/upper bound costs and vehicle/global span costs, and stores it in \"optimal_cost\" (if not null). Returns true iff all the constraints can be respected. |\n| [`ComputeCumuls`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/routing_lp_scheduling.h#L823) | Return type: `DimensionSchedulingStatus ` Arguments: ` const std::function\u003cint64_t(int64_t)\u003e& next_accessor, std::vector\u003cint64_t\u003e* optimal_cumuls, std::vector\u003cint64_t\u003e* optimal_breaks, std::vector\u003cstd::vector\u003cint\u003e\u003e* optimal_resource_indices_per_group` If feasible, computes the optimal values for cumul, break and resource variables, minimizing cumul soft lower/upper bound costs and vehicle/global span costs, stores them in \"optimal_cumuls\" (if not null), \"optimal_breaks\" and \"optimal_resource_indices_per_group\", and returns true. Returns false if the routes are not feasible. |\n| [`ComputePackedCumuls`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/routing_lp_scheduling.h#L832) | Return type: `DimensionSchedulingStatus ` Arguments: ` const std::function\u003cint64_t(int64_t)\u003e& next_accessor, std::vector\u003cint64_t\u003e* packed_cumuls, std::vector\u003cint64_t\u003e* packed_breaks, std::vector\u003cstd::vector\u003cint\u003e\u003e* resource_indices_per_group` Similar to ComputeCumuls, but also tries to pack the cumul values on all routes, such that the cost remains the same, the cumuls of route ends are minimized, and then the cumuls of the starts of the routes are maximized. |\n| [`dimension`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/routing_lp_scheduling.h#L837) | Return type: `const RoutingDimension* ` \u003cbr /\u003e |\n| [`GlobalDimensionCumulOptimizer`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/routing_lp_scheduling.h#L807) | \u003cbr /\u003e Arguments: ` const RoutingDimension* dimension, RoutingSearchParameters::SchedulingSolver solver_type` \u003cbr /\u003e |"]]