# Writing constraint for a tuple

 0 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% fbahr ♦ 4.6k●7●16 2 Hi, regards (17 Jul '17, 14:55) AlexFleischer 2 ... and answered there. (18 Jul '17, 14:56) Paul Rubin ♦♦
Be the first one to answer this question!
 toggle preview community wiki

### Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "Title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported

Tags:

×191
×41
×25
×13

Asked: 16 Jul '17, 10:29

Seen: 219 times

Last updated: 18 Jul '17, 14:56

### Related questions

OR-Exchange! Your site for questions, answers, and announcements about operations research.