Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
routing.cc File Reference
#include "ortools/constraint_solver/routing.h"
#include <limits.h>
#include <algorithm>
#include <atomic>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <functional>
#include <iterator>
#include <limits>
#include <map>
#include <memory>
#include <numeric>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#include "absl/algorithm/container.h"
#include "absl/container/flat_hash_map.h"
#include "absl/container/flat_hash_set.h"
#include "absl/flags/flag.h"
#include "absl/functional/bind_front.h"
#include "absl/hash/hash.h"
#include "absl/log/check.h"
#include "absl/log/die_if_null.h"
#include "absl/memory/memory.h"
#include "absl/status/statusor.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_format.h"
#include "absl/strings/string_view.h"
#include "absl/time/time.h"
#include "absl/types/span.h"
#include "ortools/base/dump_vars.h"
#include "ortools/base/int_type.h"
#include "ortools/base/logging.h"
#include "ortools/base/map_util.h"
#include "ortools/base/mathutil.h"
#include "ortools/base/protoutil.h"
#include "ortools/base/stl_util.h"
#include "ortools/base/strong_vector.h"
#include "ortools/base/types.h"
#include "ortools/constraint_solver/constraint_solver.h"
#include "ortools/constraint_solver/constraint_solveri.h"
#include "ortools/constraint_solver/routing_constraints.h"
#include "ortools/constraint_solver/routing_decision_builders.h"
#include "ortools/constraint_solver/routing_enums.pb.h"
#include "ortools/constraint_solver/routing_filters.h"
#include "ortools/constraint_solver/routing_ils.h"
#include "ortools/constraint_solver/routing_ils.pb.h"
#include "ortools/constraint_solver/routing_index_manager.h"
#include "ortools/constraint_solver/routing_insertion_lns.h"
#include "ortools/constraint_solver/routing_lp_scheduling.h"
#include "ortools/constraint_solver/routing_neighborhoods.h"
#include "ortools/constraint_solver/routing_parameters.h"
#include "ortools/constraint_solver/routing_parameters.pb.h"
#include "ortools/constraint_solver/routing_search.h"
#include "ortools/constraint_solver/routing_types.h"
#include "ortools/constraint_solver/routing_utils.h"
#include "ortools/constraint_solver/solver_parameters.pb.h"
#include "ortools/graph/connected_components.h"
#include "ortools/graph/ebert_graph.h"
#include "ortools/graph/linear_assignment.h"
#include "ortools/util/bitset.h"
#include "ortools/util/optional_boolean.pb.h"
#include "ortools/util/piecewise_linear_function.h"
#include "ortools/util/range_query_function.h"
#include "ortools/util/saturated_arithmetic.h"
#include "ortools/util/sorted_interval_list.h"
#include "ortools/util/stats.h"

Go to the source code of this file.

Classes

class  operations_research::RoutingModelInspector
 

Namespaces

namespace  operations_research
 In SWIG mode, we don't want anything besides these top-level includes.
 

Macros

#define CP_ROUTING_PUSH_OPERATOR(operator_type, operator_method)
 

Functions

std::unique_ptr< BinCapacitiesoperations_research::MakeBinCapacities (const std::vector< RoutingDimension * > &dimensions, const PathsMetadata &paths_metadata)
 
void operations_research::FillPathEvaluation (const std::vector< int64_t > &path, const RoutingModel::TransitCallback2 &evaluator, std::vector< int64_t > *values)
 

Variables

static const int operations_research::kUnassigned = -1
 --— Routing model --—
 

Macro Definition Documentation

◆ CP_ROUTING_PUSH_OPERATOR

#define CP_ROUTING_PUSH_OPERATOR ( operator_type,
operator_method )
Value:
if (operators_to_consider.contains(operator_type) && \
search_parameters.local_search_operators().use_##operator_method() == \
BOOL_TRUE) { \
operators.push_back(local_search_operators_[operator_type]); \
}

Definition at line 4474 of file routing.cc.

Variable Documentation

◆ assignable_to_vehicle

std::vector<bool> assignable_to_vehicle

Assignability of vehicles.

Definition at line 1027 of file routing.cc.

◆ cost_class_index

RoutingModel::CostClassIndex cost_class_index

The cost class of the vehicle.

Definition at line 1336 of file routing.cc.

◆ dimension_attributes

util_intops::StrongVector<DimensionIndex, ResourceGroup::Attributes> dimension_attributes

The attributes for each dimension.

Definition at line 1025 of file routing.cc.

◆ dimension_capacities

util_intops::StrongVector<DimensionIndex, int64_t> dimension_capacities

Definition at line 1355 of file routing.cc.

◆ dimension_end_cumuls_max

util_intops::StrongVector<DimensionIndex, int64_t> dimension_end_cumuls_max

Definition at line 1354 of file routing.cc.

◆ dimension_end_cumuls_min

util_intops::StrongVector<DimensionIndex, int64_t> dimension_end_cumuls_min

Definition at line 1353 of file routing.cc.

◆ dimension_evaluator_classes

util_intops::StrongVector<DimensionIndex, int64_t> dimension_evaluator_classes

dimension_evaluators[d]->Run(from, to) is the transit value of arc from->to for a dimension d.

Definition at line 1358 of file routing.cc.

◆ dimension_start_cumuls_max

util_intops::StrongVector<DimensionIndex, int64_t> dimension_start_cumuls_max

Definition at line 1352 of file routing.cc.

◆ dimension_start_cumuls_min

util_intops::StrongVector<DimensionIndex, int64_t> dimension_start_cumuls_min

Bounds of cumul variables at start and end vehicle nodes. dimension_{start,end}_cumuls_{min,max}[d] is the bound for dimension d.

Definition at line 1351 of file routing.cc.

◆ end_equivalence_class

int end_equivalence_class

Definition at line 1348 of file routing.cc.

◆ fixed_cost

int64_t fixed_cost

Contrarily to CostClass, here we need strict equivalence.

Definition at line 1338 of file routing.cc.

◆ group_allowed_resources_hash

std::vector<int64_t> group_allowed_resources_hash

Hash of allowed resources for each resource group, or -1 if a given resource group isn't required by the vehicle.

Definition at line 1363 of file routing.cc.

◆ start_equivalence_class

int start_equivalence_class

Vehicle start and end equivalence classes. Currently if two vehicles have different start/end nodes which are "physically" located at the same place, these two vehicles will be considered as non-equivalent unless the two indices are in the same class.

Todo
(user): Find equivalent start/end nodes wrt dimensions and callbacks.

Definition at line 1347 of file routing.cc.

◆ used_when_empty

bool used_when_empty

Whether or not the vehicle is used when empty.

Definition at line 1340 of file routing.cc.

◆ visitable_nodes_hash

uint64_t visitable_nodes_hash

Hash of the visitability of (non-start/end) nodes.

Definition at line 1360 of file routing.cc.