I have 5 days, each days consists of 5 hours, 6 courses that each require 3 hours, but no 2hours can be on the same day
Any idea on how to model this?
Here is what I would start with:
Hi, sorry, i think i first missunderstood your question:
your courses have length 3, so if you model them as above, all three hours will be in consecutive slots, which could start and end on different days? Is this what you want to avoid? This can be achieved by adding a "night"-blocker in-between days
or do you want to have courses which consist of three separate slots which can be scheduled individually, but not two of them should be on the same day? Is this case, you need to split each course into three tasks, and then you can add some capacity constraints on each single day
I have 5 days, each days consists of 5 hours, 6 courses that each require 3 hours, but no 2hours can be on the same day Any idea on how to model this? Here is what I would start with:
s = Scenario('S_trial01', horizon=25) class = s.Resource('Class_6') courseA = s.Task('Course_A', 3) courseB = s.Task('Course_B', 3) courseC = s.Task('Course_C', 3) courseD = s.Task('Course_D', 3) courseE = s.Task('Course_E', 3) courseF = s.Task('Course_F', 3)
But then I am not sure how to add the constraints of not having twice the same course on one day.
Any suggestion?