> I'm sorry I got stuck again. I can not manage to "extend" the domain of
> a parameter. This is a small example to describe what I mean:
> 
> set A;
> 
> param p{A};
> 
> set mA := setof{a in A, i in 1..3} a&i;
> 
> So basically I created several instances of each element in set A. Now
> I'd like to extend parameter p to them, something like
> 
> param mp{mA};
> 
> forall {a in A, i in 1..3}
>   mp[a&i] := m[a];
> 
> I tried to find some tricks to add values for mp in the data section,
> but I did not manage to find anything appropriate.
> 
> Is there any way to do this nicely (without using external scripts or a
> big workaround)?

param mp{ai in mA} := m[substr(ai, 1, length(ai)-1)];





_______________________________________________
Help-glpk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to