C++ Reference: routing_index_manager
This documentation is automatically generated.
Manager for any NodeIndex <-> variable index conversion. The routing solver uses variable indices internally and through its API. These variable indices are tricky to manage directly because one Node can correspond to a multitude of variables, depending on the number of times they appear in the model, and if they're used as start and/or end points. This class aims to simplify variable index usage, allowing users to use NodeIndex instead.
Usage: auto starts_ends = ...; /// These are NodeIndex. RoutingIndexManager manager(10, 4, starts_ends); // 10 nodes, 4 vehicles. RoutingModel model(manager);
Then, use 'manager.NodeToIndex(node)' whenever model requires a variable index.