Dear Daniel,
Many thanks for your response.
Please let's say, I need to define j and t indices over the tasks set on the outer loop.
e4: forall(j,t in tasks: j<t)
sum(h in workers, i in workstation) i*x[i,h,j] <=
sum(h in workers, i in workstation) i*x[i,h,t];
But, this constraint should determine refashions between tasks and whose precedence. this is why I defined such a tuple set. Also, I have tried to use the nested set as follows:
setof(int) operations[tasks] = [{1}, {1}, {1,2}, {1,2,3}, {4,7}, {6}, {6}, {5}, {8}];
Instead of using tuple and define the constraint in the form:
e4: forall(j,t in tasks, jj in operations[j], tt in operations[j]: j<t)
sum(h in workers, i in workstation) i*x[i,h,jj] <=
sum(h in workers, i in workstation) i*x[i,h,tt];
But, when the model is solved, the results are not correct.
I was wondering if, where am I wrong and how can I fix this issue?
------------------------------
Abbas Omidi
------------------------------
Original Message:
Sent: Thu April 30, 2020 10:36 AM
From: Daniel Junglas
Subject: Tuple set issue
I am not sure I understand how exactly you want to add those sets into the constraints. Do you mean something like
forall(t in tasks) ...
and then
sum(j in relations[t].task) ...
? Or do you mean something else? If you mean something else then maybe you can give a short example of the constraint that should be generated for the first task, lets say.
------------------------------
Daniel Junglas
------------------------------