Sunday, February 24, 2013



No, sorry, this is not at all the case. In the link it is indeed mentioned this is really needed to interpret the sos2 sets correctly:

“Here we need to keep c last in variable lambda. This makes sure we have i × t sets with c members.”


  • SOS2 variables x(i) : a single set with i members (actually card(i) members but I drop the card for convenience)
  • SOS2 variables x(i,j) : i sets with j members
  • SOS2 variables x(i,j,k) : i x j sets with k members

It has nothing to do with reordering of indices to achieve better performance (I don’t think the blog post even implies this).

Of course for more information see the GAMS manual.