VehicleRouting¶
- class VehicleRouting(graph, num_vehicles=2, depot=0)[source]¶
Bases:
GraphOptimizationApplication
Optimization application for the “vehicle routing problem” [1] based on a
NetworkX
graph.References
[1]: “Vehicle routing problem”, https://en.wikipedia.org/wiki/Vehicle_routing_problem
- Parameters:
Attributes
Getter of depot
Getter of num_vehicles
Methods
create_random_instance
(n[, low, high, seed, ...])Create a random instance of the vehicle routing problem.
interpret
(result)Interpret a result as a list of the routes for each vehicle
Convert a vehicle routing problem instance into a
QuadraticProgram