help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] Single index for multidimensional sets


From: Andrew Makhorin
Subject: Re: [Help-glpk] Single index for multidimensional sets
Date: Tue, 17 Jul 2012 21:31:26 +0400

> 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)];







reply via email to

[Prev in Thread] Current Thread [Next in Thread]