Hi guys and girls
Can someone advise on best practice to manage resources in a schedule. If I have various resource identified by numbers 0,1,2,... and a task can use one of several of them, but not all of them can be used for this task; say the task requires resource 1,4 or 5. The optimizer should chose exactly one of them for the task. I have for the task an IntervalVar to determine the time duration (the task is fixed length) and a IntVar to determine which of the resources. How can I model that no other task can overlap this task if it the optimizer chose to use the same resource for both, but can overlap if two different resources were allocated?
Thanks all for any help.
This topic has been locked.
3 replies Latest Post - 2013-03-01T15:21:19Z by ChrisBr
Pinned topic Resource allocation basic question
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2013-03-01T15:21:19Z at 2013-03-01T15:21:19Z by ChrisBr
Re: Resource allocation basic question2013-02-27T00:07:24Z in response to SystemAdminCan't you just use different cumulResources with NoOverlap constraints and make use of the many isPresent/isNotPresent-style arguments that are provided by CP Optimizer's functions?
Re: Resource allocation basic question2013-02-27T16:42:08Z in response to SystemAdminThanks.
I'm not sure how to follow up on your advise. I'm relatively new to CP. I don't see cumulResources. Do you mean IloCumulFunctionExpr and IloCumulFunctionExprArray?
Looking for information I came across IloAlternative. Looks like I can solve the problem I described by having a matrix (array of array) or Interval Vars, with number of rows equal to the number of tasks and number of columns equals to the number of resources. Each row is constrained to the task interval with IloAlternative so exactly one of them is present and that specific one has the same start/end as the task. That represents selection of specific resource which becomes unavailable for other tasks. Each column is constrained using IloNoOverlap. Is that an efficient solution?