help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Assign a param to a set in data section


From: Andrew Makhorin
Subject: Re: [Help-glpk] Assign a param to a set in data section
Date: Thu, 30 Nov 2006 02:51:37 +0300

> Is it possible to assign a param to a set in the data section?
> By "assign" I mean, deduce the set from the elements whose values are given
> in the param.
> For instance:
> 
> Set A;
> set B within A cross A;
> param P{B};
> 
> data;
> 
> set A:=a1 a2 a3;
> 
> param P:= a1 a2 a3 :=
>             a1    1   2    .
>             a2    .     3     .
>             a3    5    .      .
> ;
> 
> so the question is, is it possible to do something like:
> set B:=P;
> ? (This would define B where there are values in P only.)

See the example maxlow.mod included in the distribution. In the data
section of that example a set (of arcs) is specified along with a
parameter (arc capacities) defined over this set. Probably this is what
you need.





reply via email to

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