Enforcing a range of number of agents that must complete a multi-agent visit. #4303
Unanswered
nicomiguel6
asked this question in
Routing (and legacy CP) questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
Apologies if my question does not match the adequate format--I have looked everywhere and cannot seem to find an answer to my question.
I am currently working on a CVRP algorithm using OR-Tools. One of the constraints is for locations that can be visited by multiple agents. Simple enough, I can create the necessary amount of copies of the corresponding location, link them all together, and be done with it.
However, now the requirement is that there can be a range of multiple agents that can visit the location. For example, it is valid that any number of agents in the range of [min, max] visits the location. If one location has a range of [2,5], then as long as the number of agents that visited that location falls between that range, it is satisfied. The reasoning for this is that certain locations might be satisfied quicker with more agents, for example.
I investigated with using the Dropping Penalties to try and add a variable Disjunction/Penalty such that the penalty is high if more than (max - min) number of copies of that location are dropped. However, these disjunctions must be constant integers that are defined pre-solve, and therefore, cannot change depending on the results of solve (i.e they aren't in the loop with the solver). If I enforce a high penalty on (min) number of the copies, then the solve defaults to dropping all but the minimum number of copies, as there is no incentive to visit a location more than the minimum number of times.
Further, the duration of the task at the location can depend on the number of agents that visit it. If more agents visit, then the duration for each individual agent would drop at that location. Hence, if the maximum possible number of agents visits a specific location, then the duration for each individual agent is the lowest it can be. However, since duration is worked into the time matrix, again I cannot modify it in the loop with the solver--it must be set pre-solve.
Is there a reasonable way to attack this problem with the routing solver?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions