Say I have 3 sets [A, B, C] each set has 2 elements [X, Y], and I want
to select of each set a single element only. That means I have 2+2+2=6
[(A+X, A+Y, B+X, B+Y, C+X, C+Y] possible combinations. Suppose all
variables are BINARY, and an SOS constraint forces a single selection
from each set ONLY. It is a binary linear model.
Now, assume that every element has a single value of ONE. That means
any solution is an optimal since any pair of elements has a value of
2.
Whether I am using GAMS, MPL, AMPL, etc. Is there a way that I can
trick the modeler/solver to write down all 6 solutions?
Thanks,
Mike
... or 2*2*2=8 combinations ...
> Suppose all
> variables are BINARY, and an SOS constraint forces a single selection
> from each set ONLY. It is a binary linear model.
>
> Now, assume that every element has a single value of ONE. That means
> any solution is an optimal since any pair of elements has a value of
> 2.
>
> Whether I am using GAMS, MPL, AMPL, etc. Is there a way that I can
> trick the modeler/solver to write down all 6 solutions?
It's possible to force most solvers to find all combinations by usin,
t a callback that records and then rejects each solution. I'm not
aware of a way to do that from a modelling language.
This presumes that there is some reason for using variables in the
first place (i.e., that this is a piece of a larger model). If you
have all three sets populated up front (the sets contain data) and you
want to generate the set of all combinations, you can use a looping
construct in a modelling language.
/Paul