Originally posted by: bilgesu
thank you very much for your quick answer. but I have another tuple parameters that I should use in constraints. How tuple structure is being used in constraints I need to know.. For example Tj is the parameter that shows the set of tasks that assigned to workstations. I defined the Tj as:
Mod file:
tuple station_assignment{
int sttn;
{int} tsks;
};
{station_assignment}Tj=...;
data file:
Tj={<1, {1,2,5}>,
<2, {1, 2, 3, 4, 5, 6, 8}>,
<3, {2, 3, 4, 5, 6, 7, 8, 9, 10}>,
<4, {2, 3, 4, 5, 6, 7, 8, 9, 10}>,
<5, {2, 3, 4, 5, 6, 7, 8, 9, 10}>,
<6, {3, 5, 6, 7, 8, 9, 10, 11}>,
<7, {9, 10, 11}>,
};
It shows that 1, 2., and 5. tasks assigned to 1. station. 1, 2, 3, 4, 5, 6, and 8. tasks assigned to 2. station and so on...
In my constraint , below the sum expression every i is element of Tj is written. I wrote its code as below. I need the tsks data from the station_assignment tuple. Is this expression of tuples in constraint is true?
forall(jin workstation, d in positiond, r in machine)
sum (i in task: i==Tj.tsks[i]) x[i][j][d][r]<=1;
thanks in advance;
Regards...
#DecisionOptimization#OPLusingCPLEXOptimizer