4
$\begingroup$

Is it possible to solve VRP using OR-Tools CpModel, instead of RoutingModel? I want to do synchronized VRP, which is combining vehicle routing and scheduling constraints

$\endgroup$
  • $\begingroup$ Yes it's possible to use CpModel to model VRPs with specific additional constraints. This discussion in OR-Tools repo could serve as a guide if you're gathering ideas about modeling synchronized VRP: github.com/google/or-tools/issues/1047 $\endgroup$ – dhasson Jun 18 at 4:58
4
$\begingroup$

The answer is yes. Is it worthwhile ? it depends.

If you just want to have two persons visit the same virtual place (2 duplicated nodes) at the same time, you can force the time cumul var to be equal when using the routing library.

This will probably more efficient than the CP-SAT VRP code as the routing library is highly tuned.

If you want more complex constraints, you can try CP-SAT. You can look at ortools/constraint_solver/routing_sat.cc to get some ideas.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.