google / google/or-tools

SetAllowedVehiclesForIndex default behavior is not what it should be.

Open
#4,644 2 comments 0 reactions 1 assignee Claimed by @Mizux View on GitHub
Help Needed Lang: C++ Solver: Routing
Dominant language
C++
Stars
14.1k
Forks
2.5k
Avg merge
8h 39m
Merged PRs (30d)
72

Description

The documentation for SetAllowedVehiclesForIndex states:

"Sets the vehicles which can visit a given node. If the node is in a disjunction, this will not prevent it from being unperformed. Specifying an empty vector of vehicles has no effect (all vehicles will be allowed to visit the node)."

The last sentence here is the issue. This is clearly not the correct behavior. I might have very good reasons for specifying that no vehicle is allowed to visit the node. Indeed, if that node also has a disjunction / disjunction cost (as it does in my case) doing so would result in a perfectly feasible solution.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.