# subset operation

 0 Dear all I would like to make a set as follow in opl cplex : J in {1,..,n}-{6,12,18,....} how I should do that ? I also have a variable as follow: (sum of i ) X{ij}-1k , forall in j,k that j is as above and k , i =1,...,n Regards asked 05 Sep '17, 10:48 Shah 13●2 accept rate: 0%

 2 Hi  int n=20; int m=6; {int} J1=asSet(1..n) diff {6*i | i in 1..n}; {int} J2={i | i in 1..n : i mod m!=0}; execute { writeln(J1); writeln(J2); }  gives {1 2 3 4 5 7 8 9 10 11 13 14 15 16 17 19 20} {1 2 3 4 5 7 8 9 10 11 13 14 15 16 17 19 20}  regards answered 06 Sep '17, 14:58 Alex Fleischer 156●4 accept rate: 11%
 toggle preview community wiki

By Email:

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:

×2
×2