Sunday, February 24, 2013

SOS2 in GAMS

https://groups.google.com/d/topic/gurobi/YZGRWaA-oQE/discussion:

image

No, sorry, this is not at all the case. In the link http://yetanothermathprogrammingconsultant.blogspot.com/2009/06/gams-piecewise-linear-functions-with.html 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.”

I.e.

  • 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.

No comments:

Post a Comment