Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: class DimensionCumulOptimizerCore
Note: This documentation is automatically generated.
Utility class used in Local/GlobalDimensionCumulOptimizer to set the linear
solver constraints and solve the problem.
Method |
dimension | Return type: const RoutingDimension* |
DimensionCumulOptimizerCore | Arguments: const RoutingDimension* dimension,
bool use_precedence_propagator |
Optimize | Return type: DimensionSchedulingStatus Arguments:
const std::function<int64_t(int64_t)>& next_accessor,
RoutingLinearSolverWrapper* solver, std::vector<int64_t>* cumul_values,
std::vector<int64_t>* break_values,
std::vector<std::vector<int>>* resource_indices_per_group, int64_t* cost,
int64_t* transit_cost, bool clear_lp = true |
OptimizeAndPack | Return type: DimensionSchedulingStatus Arguments:
const std::function<int64_t(int64_t)>& next_accessor,
RoutingLinearSolverWrapper* solver, std::vector<int64_t>* cumul_values,
std::vector<int64_t>* break_values,
std::vector<std::vector<int>>* resource_indices_per_group |
OptimizeAndPackSingleRoute | Return type: DimensionSchedulingStatus Arguments:
int vehicle, const std::function<int64_t(int64_t)>& next_accessor,
const RoutingModel::ResourceGroup::Resource* resource,
RoutingLinearSolverWrapper* solver, std::vector<int64_t>* cumul_values,
std::vector<int64_t>* break_values |
OptimizeSingleRoute | Return type: DimensionSchedulingStatus Arguments:
int vehicle, const std::function<int64_t(int64_t)>& next_accessor,
RoutingLinearSolverWrapper* solver, std::vector<int64_t>* cumul_values,
std::vector<int64_t>* break_values, int64_t* cost, int64_t* transit_cost,
bool clear_lp = true In the OptimizeSingleRoute() and Optimize() methods, if both "cumul_values"
and "cost" parameters are null, we don't optimize the cost and stop at the
first feasible solution in the linear solver (since in this case only
feasibility is of interest).
|
OptimizeSingleRouteWithResources | Return type: std::vector<DimensionSchedulingStatus> Arguments:
int vehicle, const std::function<int64_t(int64_t)>& next_accessor,
const std::function<int64_t(int64_t, int64_t)>& transit_accessor,
const std::vector<RoutingModel::ResourceGroup::Resource>& resources,
const std::vector<int>& resource_indices, bool optimize_vehicle_costs,
RoutingLinearSolverWrapper* solver,
std::vector<int64_t>* costs_without_transits,
std::vector<std::vector<int64_t>>* cumul_values,
std::vector<std::vector<int64_t>>* break_values, bool clear_lp = true |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-06 UTC.
[null,null,["Last updated 2024-08-06 UTC."],[[["\u003cp\u003e\u003ccode\u003eDimensionCumulOptimizerCore\u003c/code\u003e is a utility class used for setting constraints and solving optimization problems related to routing dimensions within the OR-Tools library.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods for optimizing the cumulative values and breaks of a dimension, for single routes or the entire problem.\u003c/p\u003e\n"],["\u003cp\u003eOptimization can be performed with or without considering resource constraints and costs, allowing for flexibility in problem solving.\u003c/p\u003e\n"],["\u003cp\u003eThe class offers functions like \u003ccode\u003eOptimize\u003c/code\u003e, \u003ccode\u003eOptimizeAndPack\u003c/code\u003e, and variations for single routes and resources, to address different optimization scenarios.\u003c/p\u003e\n"],["\u003cp\u003eMethods like \u003ccode\u003eOptimizeSingleRoute\u003c/code\u003e and \u003ccode\u003eOptimize\u003c/code\u003e allow for focusing on feasibility if cost parameters are not provided.\u003c/p\u003e\n"]]],["The `DimensionCumulOptimizerCore` class, used within `Local/GlobalDimensionCumulOptimizer`, manages linear solver constraints. Key methods include `Optimize`, `OptimizeAndPack`, and their single-route variants. These functions set and solve constraints for a given dimension, using a solver and accessing route and resource information. They handle cumul and break value vectors, cost calculations, and resource indexing. The methods can also stop at the first feasible solution if cost is not being optimized. The class also has a `dimension` method.\n"],null,["# DimensionCumulOptimizerCore\n\nC++ Reference: class DimensionCumulOptimizerCore\n================================================\n\n\nNote: This documentation is automatically generated.\nUtility class used in Local/GlobalDimensionCumulOptimizer to set the linear solver constraints and solve the problem.\n\n| Method ||\n|-------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [`dimension`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/routing_lp_scheduling.h#L650) | Return type: `const RoutingDimension* ` \u003cbr /\u003e |\n| [`DimensionCumulOptimizerCore`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/routing_lp_scheduling.h#L608) | \u003cbr /\u003e Arguments: `const RoutingDimension* dimension, bool use_precedence_propagator` \u003cbr /\u003e |\n| [`Optimize`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/routing_lp_scheduling.h#L631) | Return type: `DimensionSchedulingStatus ` Arguments: ` const std::function\u003cint64_t(int64_t)\u003e& next_accessor, RoutingLinearSolverWrapper* solver, std::vector\u003cint64_t\u003e* cumul_values, std::vector\u003cint64_t\u003e* break_values, std::vector\u003cstd::vector\u003cint\u003e\u003e* resource_indices_per_group, int64_t* cost, int64_t* transit_cost, bool clear_lp = true` \u003cbr /\u003e |\n| [`OptimizeAndPack`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/routing_lp_scheduling.h#L638) | Return type: `DimensionSchedulingStatus ` Arguments: ` const std::function\u003cint64_t(int64_t)\u003e& next_accessor, RoutingLinearSolverWrapper* solver, std::vector\u003cint64_t\u003e* cumul_values, std::vector\u003cint64_t\u003e* break_values, std::vector\u003cstd::vector\u003cint\u003e\u003e* resource_indices_per_group` \u003cbr /\u003e |\n| [`OptimizeAndPackSingleRoute`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/routing_lp_scheduling.h#L644) | Return type: `DimensionSchedulingStatus ` Arguments: ` int vehicle, const std::function\u003cint64_t(int64_t)\u003e& next_accessor, const RoutingModel::ResourceGroup::Resource* resource, RoutingLinearSolverWrapper* solver, std::vector\u003cint64_t\u003e* cumul_values, std::vector\u003cint64_t\u003e* break_values` \u003cbr /\u003e |\n| [`OptimizeSingleRoute`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/routing_lp_scheduling.h#L615) | Return type: `DimensionSchedulingStatus ` Arguments: ` int vehicle, const std::function\u003cint64_t(int64_t)\u003e& next_accessor, RoutingLinearSolverWrapper* solver, std::vector\u003cint64_t\u003e* cumul_values, std::vector\u003cint64_t\u003e* break_values, int64_t* cost, int64_t* transit_cost, bool clear_lp = true` In the OptimizeSingleRoute() and Optimize() methods, if both \"cumul_values\" and \"cost\" parameters are null, we don't optimize the cost and stop at the first feasible solution in the linear solver (since in this case only feasibility is of interest). |\n| [`OptimizeSingleRouteWithResources`](https://github.com/google/or-tools/blob/v9.4/ortools/constraint_solver/routing_lp_scheduling.h#L621) | Return type: `std::vector\u003cDimensionSchedulingStatus\u003e ` Arguments: ` int vehicle, const std::function\u003cint64_t(int64_t)\u003e& next_accessor, const std::function\u003cint64_t(int64_t, int64_t)\u003e& transit_accessor, const std::vector\u003cRoutingModel::ResourceGroup::Resource\u003e& resources, const std::vector\u003cint\u003e& resource_indices, bool optimize_vehicle_costs, RoutingLinearSolverWrapper* solver, std::vector\u003cint64_t\u003e* costs_without_transits, std::vector\u003cstd::vector\u003cint64_t\u003e\u003e* cumul_values, std::vector\u003cstd::vector\u003cint64_t\u003e\u003e* break_values, bool clear_lp = true` \u003cbr /\u003e |"]]