The following parameters are given, with a being a subset of aa. However, all the non-overlapping elements of aa with a are already kicked out of emis2. Hence, the remaining aa and a are basically the same.
emis1(r,a,t)
emis2(r,aa,t)
Now I want to define the dimensions of emis2 dependent from a, not aa - so that emis2(r,a,t).
Do you have any idea how I can do that? Maybe by mapping the remaining elements from aa to a?
Map set elements to another set
Re: Map set elements to another set
Hi,
Your subject talks about set elements, but your example mentions parameters, so I'm not sure what you're asking. But perhaps this is what you want:
Since a is a subset of aa, you can index paa by a in the assignment above. The result is independent of paa('blahblah'), i.e. of the contents of paa for elements in aa - a.
HTH,
-Steve
Your subject talks about set elements, but your example mentions parameters, so I'm not sure what you're asking. But perhaps this is what you want:
Code: Select all
sets aa / blah blahblah /, a(aa) / blah /;
parameter pa(a), paa(aa);
paa('blah') = 1215;
pa(a) = paa(a);
HTH,
-Steve
-
- User
- Posts: 2
- Joined: 2 years ago
Re: Map set elements to another set
Hi,
sorry about the confusion with the topic, my question was how the parameter could be defined in dependence from a, not aa.
But your answer actually helped already!!
I now wrote:
sets aa / blah blahblah /, a(aa) / blah /;
parameter pa(a), paa(aa);
pa(a(aa)) = paa(aa);
Thank you so much!!
sorry about the confusion with the topic, my question was how the parameter could be defined in dependence from a, not aa.
But your answer actually helped already!!
I now wrote:
sets aa / blah blahblah /, a(aa) / blah /;
parameter pa(a), paa(aa);
pa(a(aa)) = paa(aa);
Thank you so much!!