You should be able to declare an indexed collection of sets, for example:
set BaseSET;
set SetColl {BaseSET};
param DataVals {s in BaseSET, t in SetColl[s]};
Each of the sets in the collection may be given different numbers of
elements. For example the data file could contain:
set BaseSET := a b c ;
set SetColl[a] := ABD KDL ;
set SetColl[b] := G H LKM H KI ;
set SetColl[c] := ZZ YY XX ;
SetColl can be used similarly to index parameters, variables, constraints,
sums, and the like.
Bob Fourer
[EMAIL PROTECTED]
In reply to the message from >>> Niyati Parikh <[EMAIL PROTECTED]>
received 2/18/05 11:13 PM:
> Greetings,
> I am using MathProg to solve a Linear Programming Problem. I need to
> create a parameter that will be an array of Sets. How can I declare such a
> parameter ?
>
> At runtime I would give sets for this array. Note that these sets would be 1
> dimensional and would contain different number of elements.
>
> I appreciate your help.
>
> Thanks,
> Niyati Parikh
> Graduate Student
> Arizona State University
>
>
> Yahoo! India Matrimony: Find your life partneronline.
> _______________________________________________
> Help-glpk mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/help-glpk
>
_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk