14 #ifndef OR_TOOLS_CONSTRAINT_SOLVER_ROUTING_INDEX_MANAGER_H_
15 #define OR_TOOLS_CONSTRAINT_SOLVER_ROUTING_INDEX_MANAGER_H_
59 const std::vector<NodeIndex>& starts,
60 const std::vector<NodeIndex>& ends);
63 const std::vector<std::pair<NodeIndex, NodeIndex> >& starts_ends);
82 return node_to_index_[node];
85 std::vector<int64>
NodesToIndices(
const std::vector<NodeIndex>& nodes)
const;
91 return index_to_node_[
index];
95 const std::vector<int64>& indices)
const;
102 return node_to_index_;
108 const std::vector<std::pair<NodeIndex, NodeIndex> >& starts_ends);
110 std::vector<NodeIndex> index_to_node_;
112 std::vector<int64> vehicle_to_start_;
113 std::vector<int64> vehicle_to_end_;
116 int num_unique_depots_;
#define DCHECK_GE(val1, val2)
#define DCHECK_LT(val1, val2)
Manager for any NodeIndex <-> variable index conversion.
static const int64 kUnassigned
std::vector< NodeIndex > GetIndexToNodeMap() const
int64 GetEndIndex(int vehicle) const
absl::StrongVector< NodeIndex, int64 > GetNodeToIndexMap() const
int num_unique_depots() const
complete.
RoutingIndexManager(int num_nodes, int num_vehicles, const std::vector< std::pair< NodeIndex, NodeIndex > > &starts_ends)
int64 NodeToIndex(NodeIndex node) const
RoutingIndexManager(int num_nodes, int num_vehicles, NodeIndex depot)
Creates a NodeIndex to variable index mapping for a problem containing 'num_nodes',...
NodeIndex IndexToNode(int64 index) const
std::vector< int64 > NodesToIndices(const std::vector< NodeIndex > &nodes) const
RoutingNodeIndex NodeIndex
std::vector< NodeIndex > IndicesToNodes(const std::vector< int64 > &indices) const
int64 GetStartIndex(int vehicle) const
The vehicle routing library lets one model and solve generic vehicle routing problems ranging from th...