Solve vehicle routing problems with capacity constraints and time windows. Use Python for root relaxations, the CLI for feasible routes and integer search, or Rust to build your own solver.
frompybaldesimportCustomer,Instance# Depot first, then customers with unit demand.instance=Instance("first-route",capacity=2,customers=[Customer(0,0),Customer(1,0,demand=1),Customer(0,1,demand=1),])result=instance.solve_root(problem_type="cvrp",capacity_cuts=True,)print(result.status,result.lp)forrouteinresult.routes:print(route.value,route.nodes)
Working with files or building a Rust application?