Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help needed #34

Open
fderyckel opened this issue Mar 22, 2018 · 1 comment
Open

Help needed #34

fderyckel opened this issue Mar 22, 2018 · 1 comment

Comments

@fderyckel
Copy link
Contributor

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?

@timnon
Copy link
Owner

timnon commented Mar 23, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants