# SETS in Gams conditions possible?

 0 hey, im new to gams and i was trying to make a set(i,j) of i and j than only contains the (i,j) such that i its different than j. can it be made using conditionals or something else than assigning them manually ? sets i /1*3/ j /1*5/; set newset(i,j) = the i and j such i its different than j  thanks in advance asked 29 May '16, 02:20 jmslaterc 15●4 accept rate: 0% fbahr ♦ 4.6k●7●16

 0 set newset(i,j); newset(i,j)\$(ord(i) <> ord(j)) = yes; display newset; ---- 12 SET newset 1 2 3 4 5 1 YES YES YES YES 2 YES YES YES YES 3 YES YES YES YES  answered 29 May '16, 05:26 fbahr ♦ 4.6k●7●16 accept rate: 13% thanks for the answer (30 May '16, 14:57) jmslaterc
 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:

×51
×4
×4