Main Menu

New constraint(?)

Started by Benahmed Abdelkrim, July 23, 2020, 11:33:55 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Benahmed Abdelkrim

Hi!
is this constraint possible: A set of  activities are not overlapping in time slots from selection.  in order to give users the possibility to choose allowed and forbidden time slots?
And not as it is now activities do not overlap in all time slots.
Thanks!
B.A/krim

Liviu Lalescu

You can use the constraint activities max simultaneous in selected time slots, with max simultaneous = 1.

Benahmed Abdelkrim

Thank you!
But could not this affect the good performance of the program?
B.A/krim

Benahmed Abdelkrim

Quote from: Liviu Lalescu on July 23, 2020, 12:47:29 PM
You can use the constraint activities max simultaneous in selected time slots, with max simultaneous = 1.
In fact, I avoided using it, because I was afraid of affecting the program performance and generation speed..
B.A/krim

Liviu Lalescu

#4
The constraint is implemented in the best way possible (I hope) for the general case of max simultaneous = n, and making n=1 yields also good code behavior, probably nearly best possible (if I would make it a special constraint for n=1, it might only gain a negligible fraction of time of speed).

Neglect the warning there.

Some testing would be interesting, if you could do that.