i've looked through the Post before but found nothing similar to my problem.
In the problem, I try to define a SOS1 variable, which could look like this.
Code: Select all
Sets
i set which represents the later "Sets" of the SOS1 Variable /1*10/
l set which represents the later "Elements" in each "Set" of the SOS1 Variable /1*50/
;
SOS1 Variable
x(i,l) SOS1-Variable consisting of 10 sets whith 50 elements each;
You can find the following code for this in the Gams Documentation (adapted to my definitions above):
Code: Select all
SOS1 Variable
x(l);
Equation
defx;
defx.. sum(l, x(l)) =e= 1 ;
Code: Select all
SOS1 Variable
x(i,l) SOS1-Variable consisting of 10 sets whith 50 elements each;
Equation
defx(i);
defx(i).. sum(l, x(i,l)) =e= 1 ;
And thats where the tricky point starts . For the formulation of my model, there must be a further condition that not all, but a maximum of 5 sets for example, may contain a 1. This could be realized by an additional condition:
Code: Select all
Equation
additionalEq;
additionalEq.. sum((i,l), x(i,l)) =e= 5;
Therefore, my question now is whether it is possible to define the SOS1 variable in such a way that the non-zero values must be 1, but not every set needs a non-zero value (as required by the first equation).
I also attached a (sadly infeasable) minimalistic Model. I hope i could explain my problem in a understandable way. Please excuse grammar mistakes, as english is not my mother tongue.
Thanks a lot and have a nice day.
Greetings Pinguin_Fan