Hi all,
I have a prioritized locations: L1, L2, L3, ... , Ln
L1 has the highest priority and the Ln has the lowest one.
i.e. "priority of Lx" is grater than "priority of Ly" where x < y.
I'd like to create a route with the following rule.
1. L1 is the start and the end node.
2. The route can be a set of L1, L2, ... , Lk. (k <= n).
3. All locations from L1 to Lk must be in the route, but any of the other locations (Lk+1 to Ln) must not in the route.
So a location set of routes will be like
[L1]
, [L1, L2]
, [L1, L2, L3, L4], but not like [L1, L3], [L1, L2, L5, L6, ..., Ln].
How to represent VRP constraints for locatio
![]()
ns? Can I do this by specifying location dropping penalties with
AddDisjunction function?
Actually, I already tried several times with the
AddDisjunction function, but the results will be varied by the first solution strategy (see attached .py file and the result.txt file).
I'm wondering if my code attached has wrong constraints, or all I need to care about is to set dropping penalties and the first solution strategy?
Best Regards,
![]()
![]()
Yukihiro Katagiri