Originally posted by: SatishKumarA
Hi All,
I am using cumulative function for a resource to calculate its usage. My resource can process more than one task (say two) in parallel.
cumulFunction ResourceUsage[m in TaskList] = sum(t1 in ResourceTaskListb:m==t1.Task) pulse(op_task[t1], 1);
forall(r in ResourceList)
ResourceUsage[r] <= ResourceCapacity[r];
The above representation of upper limit on usage is standard.
New Constraint: My resource cannot process one task at any point time when its capacity is two. that means, resource can process either two tasks or zero tasks(idle case).
I kept a statefunction for two tasks to be processed in parallel. And I tried the following for this requirement,
forall(r in ResourceList)
ResourceUsage[r] == ResourceCapacity[r] || ResourceUsage[r] == 0;
which is throwing an error. How to handle this in OPL?
#DecisionOptimization#OPLusingCPOptimizer