79244647

Date: 2024-12-02 15:36:36
Score: 2.5
Natty:
Report link

Sorry, cannot write a comment, so I post it as (incomplete) answer:

Should be possible to check .ActiveVar(index) and to set .NextVar(index)

https://or-tools.github.io/docs/pdoc/ortools/constraint_solver/pywrapcp.html#RoutingModel.NextVar

And .OnlyEnforeIf() can alternatively also be expressed as Boolean or LP formulation.

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Anonymous