Replies: 1 comment 1 reply
-
Any ideas? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have successfully implemented a program where I allocate N truck drivers to M gathering hubs for each one of the days of the week. The constraints I have implemented are:
The program runs smoothly and satisfies the overall objective and outputs for each hub-driver pair a schedule in the following form:
However, I would like to add an extra constraint to force the drivers work at one hub, if possible, instead of their working days being split in many hubs.
For instance, in the above output, we see that the driver works 3 days at a different hub and 3 days at Hub 7. How can we write a constraint to make drivers be allocated -if possible- to work at one hub if possible?
Please find my code below.
Thank you
Beta Was this translation helpful? Give feedback.
All reactions