0

I've adapted the course time scheduling sample for my planning issue...but I don't know how to assure consecutives or adjacents periods. My schedule plan has activities, each of them with a duration that I have translated to periods. For instance....one activity that is about 120 minutes, and the timeslot is about 30minutes, so I create 4 SlotActivities. This way seems easy to adapt an activity to the different periods....but I don't find an easy way to assure that all these slotactivities must be consecutives. Any idea about how to achieve this?

Thanks in advance!!

Ivan Fontanals
  • 123
  • 1
  • 9

1 Answers1

0

If it's a hard constraint, I wouldn't split it up in 4 periods of 30 minutes, but instead would have 1 Activity with a startingSlot (= planning variable) and a duration of 4 periods.

If it's a soft constraint, I 'd do it like the similar constraint in the curriculum course scheduling example (IIRC).

Geoffrey De Smet
  • 26,223
  • 11
  • 73
  • 120
  • Thanks a lot!!!! It's exactly what I've finally done and works really well!!! My first solution was really difficult to mantain if the slot time was short...Now, the rules are easier too! – Ivan Fontanals Jun 11 '15 at 07:51