Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <routing_lp_scheduling.h>
Public Member Functions | |
LocalDimensionCumulOptimizer (const RoutingDimension *dimension, RoutingSearchParameters::SchedulingSolver solver_type) | |
LocalDimensionCumulOptimizer. | |
DimensionSchedulingStatus | ComputeRouteCumulCost (int vehicle, const std::function< int64_t(int64_t)> &next_accessor, int64_t *optimal_cost) |
DimensionSchedulingStatus | ComputeRouteCumulCostWithoutFixedTransits (int vehicle, const std::function< int64_t(int64_t)> &next_accessor, int64_t *optimal_cost_without_transits) |
std::vector< DimensionSchedulingStatus > | ComputeRouteCumulCostsForResourcesWithoutFixedTransits (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, std::vector< int64_t > *optimal_costs_without_transits, std::vector< std::vector< int64_t > > *optimal_cumuls, std::vector< std::vector< int64_t > > *optimal_breaks) |
DimensionSchedulingStatus | ComputeRouteCumuls (int vehicle, const std::function< int64_t(int64_t)> &next_accessor, const RoutingModel::RouteDimensionTravelInfo &dimension_travel_info, const RoutingModel::ResourceGroup::Resource *resource, std::vector< int64_t > *optimal_cumuls, std::vector< int64_t > *optimal_breaks) |
DimensionSchedulingStatus | ComputeRouteCumulsAndCostWithoutFixedTransits (int vehicle, const std::function< int64_t(int64_t)> &next_accessor, const RoutingModel::RouteDimensionTravelInfo &dimension_travel_info, std::vector< int64_t > *optimal_cumuls, std::vector< int64_t > *optimal_breaks, int64_t *optimal_cost_without_transits) |
DimensionSchedulingStatus | ComputeRouteSolutionCostWithoutFixedTransits (int vehicle, const std::function< int64_t(int64_t)> &next_accessor, const RoutingModel::RouteDimensionTravelInfo &dimension_travel_info, const std::vector< int64_t > &solution_cumul_values, const std::vector< int64_t > &solution_break_values, int64_t *solution_cost, int64_t *cost_offset=nullptr, bool reuse_previous_model_if_possible=false, bool clear_lp=true, absl::Duration *solve_duration=nullptr) |
DimensionSchedulingStatus | ComputePackedRouteCumuls (int vehicle, const std::function< int64_t(int64_t)> &next_accessor, const RoutingModel::RouteDimensionTravelInfo &dimension_travel_info, const RoutingModel::ResourceGroup::Resource *resource, std::vector< int64_t > *packed_cumuls, std::vector< int64_t > *packed_breaks) |
const RoutingDimension * | dimension () const |
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.
Definition at line 825 of file routing_lp_scheduling.h.
operations_research::LocalDimensionCumulOptimizer::LocalDimensionCumulOptimizer | ( | const RoutingDimension * | dimension, |
RoutingSearchParameters::SchedulingSolver | solver_type ) |
Using one solver per vehicle in the hope that if routes don't change this will be faster.
Definition at line 184 of file routing_lp_scheduling.cc.
DimensionSchedulingStatus operations_research::LocalDimensionCumulOptimizer::ComputePackedRouteCumuls | ( | int | vehicle, |
const std::function< int64_t(int64_t)> & | next_accessor, | ||
const RoutingModel::RouteDimensionTravelInfo & | dimension_travel_info, | ||
const RoutingModel::ResourceGroup::Resource * | resource, | ||
std::vector< int64_t > * | packed_cumuls, | ||
std::vector< int64_t > * | packed_breaks ) |
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. If 'resource' is non-null, the packed route must also respect its start/end time window.
Definition at line 303 of file routing_lp_scheduling.cc.
DimensionSchedulingStatus operations_research::LocalDimensionCumulOptimizer::ComputeRouteCumulCost | ( | int | vehicle, |
const std::function< int64_t(int64_t)> & | next_accessor, | ||
int64_t * | 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.
Definition at line 214 of file routing_lp_scheduling.cc.
std::vector< DimensionSchedulingStatus > operations_research::LocalDimensionCumulOptimizer::ComputeRouteCumulCostsForResourcesWithoutFixedTransits | ( | 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, | ||
std::vector< int64_t > * | optimal_costs_without_transits, | ||
std::vector< std::vector< int64_t > > * | optimal_cumuls, | ||
std::vector< std::vector< int64_t > > * | optimal_breaks ) |
Definition at line 247 of file routing_lp_scheduling.cc.
DimensionSchedulingStatus operations_research::LocalDimensionCumulOptimizer::ComputeRouteCumulCostWithoutFixedTransits | ( | int | vehicle, |
const std::function< int64_t(int64_t)> & | next_accessor, | ||
int64_t * | 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.
Definition at line 235 of file routing_lp_scheduling.cc.
DimensionSchedulingStatus operations_research::LocalDimensionCumulOptimizer::ComputeRouteCumuls | ( | int | vehicle, |
const std::function< int64_t(int64_t)> & | next_accessor, | ||
const RoutingModel::RouteDimensionTravelInfo & | dimension_travel_info, | ||
const RoutingModel::ResourceGroup::Resource * | resource, | ||
std::vector< int64_t > * | optimal_cumuls, | ||
std::vector< int64_t > * | optimal_breaks ) |
If feasible, computes the optimal values for cumul and break variables of the route performed by a vehicle, minimizing cumul soft lower, upper bound costs and vehicle span costs, stores them in "optimal_cumuls" (if not null), and optimal_breaks, and returns true. Returns false if the route is not feasible.
Definition at line 262 of file routing_lp_scheduling.cc.
DimensionSchedulingStatus operations_research::LocalDimensionCumulOptimizer::ComputeRouteCumulsAndCostWithoutFixedTransits | ( | int | vehicle, |
const std::function< int64_t(int64_t)> & | next_accessor, | ||
const RoutingModel::RouteDimensionTravelInfo & | dimension_travel_info, | ||
std::vector< int64_t > * | optimal_cumuls, | ||
std::vector< int64_t > * | optimal_breaks, | ||
int64_t * | optimal_cost_without_transits ) |
Simple combination of ComputeRouteCumulCostWithoutFixedTransits() and ComputeRouteCumuls().
Definition at line 275 of file routing_lp_scheduling.cc.
DimensionSchedulingStatus operations_research::LocalDimensionCumulOptimizer::ComputeRouteSolutionCostWithoutFixedTransits | ( | int | vehicle, |
const std::function< int64_t(int64_t)> & | next_accessor, | ||
const RoutingModel::RouteDimensionTravelInfo & | dimension_travel_info, | ||
const std::vector< int64_t > & | solution_cumul_values, | ||
const std::vector< int64_t > & | solution_break_values, | ||
int64_t * | solution_cost, | ||
int64_t * | cost_offset = nullptr, | ||
bool | reuse_previous_model_if_possible = false, | ||
bool | clear_lp = true, | ||
absl::Duration * | solve_duration = nullptr ) |
If feasible, computes the cost of a given route performed by a vehicle defined by its cumuls and breaks.
Definition at line 287 of file routing_lp_scheduling.cc.
|
inline |
Definition at line 898 of file routing_lp_scheduling.h.