How can I define a constraint that prevents a resource to be allocated to 2 tasks that overlap?
I have defined 5 resources: R1,R2,...,R5 and 3 tasks: T1,T2,T3 that have their corresponding start and end date(s1, e1 represent the start and end date of the first task, s2,e2 of second task and so on). My constraint should prevent R1 to be allocated to task T1 and task T2 if these two tasks overlap. R1 can be allocated to any number of tasks so if T1 and T3 do not overlap, they can both be performed by R1.
I am planning to use C# and Microsoft Solver Foundation to solve this problem but of course this is not so important. My problem is that I don't know how to formulate this problem as a constraint.