0
votes
{int} t1 = {1,2,3};
{int} t2 = {4,5,6};
range t= t1..t2;

C[t4] >= sum (d in d) d * task[t4][d];          

Basically I want to use specific values for each t1 t2 t3. I want my range between t1 and t4. And then I call the t1 I want to use 1 2 3 as indices. I could not find a way around this and i am new to CPLEX OPL. Is this possible? If so how I can achieve this?

1

1 Answers

0
votes

Let me help you with the syntax:

{int} t1 = {1,2,3};
{int} t2 = {4,5,6};
range D=1..10;



tuple tuple4
{
int i;
int j;
}

{tuple4} t4={<i,j> | i in t1,j in t2};

int task[<i,j> in t4][d in D]=i+j+d;

dvar int C[t4];

subject to
{

forall(i4 in t4)C[i4] >= sum (d in D) d * task[i4][d]; 

}