Hi @Simon Küter. You can define sets using a set expression (as long as the definition attribute of the set is empty or uses initial data). So you can use something like:
Set2 := { Version1 };
solve MP;
Set2 := { Version2 };
solve MP;
The supported set expressions are described here. (Set2 might be a subset of some other set containing all possible versions.)
Hi @Marcel Hunting ,
thanks again for your help!!
I guess my best choice is to create In the Set 2 the Subsets (Version1, Version2, Version3). This elements of the set are fixed and do not change.
In a constraint I wand to do a skalar vector mulitplication. Until now I did a summation of the whole matrix like sum((Set1, Set2) Variables(Set1,Set2)*Parameter(Set1,Set2)).
Now I want to rebuild that Formula. like.
sum((Set1,Version2)Variables(Set1,Version2)*Parameter(Set1,Version2)) - do I have to define each header of the colums as as Subset or can I use the name of the colums to use the values below?
I think the best approach would be to create a superset of Set2 containing the power set of (Version1, Version2, Version3), and then define Set2 using set expressions. Then there is no need to adjust expression
sum((Set1, Set2) Variables(Set1,Set2)*Parameter(Set1,Set2)).
because the contents of Set2 is defined by a set expression:
Set2 := { Version2 };
sum((Set1, Set2) Variables(Set1,Set2)*Parameter(Set1,Set2)).
This sum will be evaluated for elements in Version2 only.
Hi @Simon Küter,
Just wanted to check back - did you find the help you needed in this thread, or maybe you found another solution you could share with us? Thank you so much!:)