I have defined the following tuple:

```
tuple capacity3
{
int sup; // varies from 1 to 5
int comp; // varies from 1 to 3
int peri; // varies from 1 to 6
int val3; // values corresponding to sup, comp, peri
}
{capacity3} aa=...;
I have written my tuple as
aa={<1,1,1,620>,<1,1,2,610>,<1,1,3,630>,<1,1,4,620>,<1,1,5,640>,<1,1,6,630>, ...and so on.
```

Now I have the following constraint;

```
forall(i in I, c in C, p in P)
sum(j in J)X[i][j][c][p]<= RHS
```

At RHS, I need to write the value defined as val3 (620, 610 ....) in tuple corresponding to specific i,c and p which are defined as sup, comp and peri in my tuple.

How will I write my constraint i.e. value in pace of RHS ? or I am going wrong elsewhere also?

I am new to CPLEX.

asked
**16 Jul '17, 10:29**

Manjot

11●1

accept rate:
0%

Hi,

exact same question at https://stackoverflow.com/questions/45127545/writing-constraint-for-a-tuple/45132498#45132498

regards

... and answered there.