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: yo yo
Subject: Re : [Help-glpk] Assign a param to a set in data section
Date: Thu, 30 Nov 2006 23:27:13 +0000 (GMT)

Yes, this exactly what I need, Thanks.
One exception maybe, from the documentation they say that this only works for 
param specified in the tabbing format and I would like it for any type of 
param, matrix type in my case.
Is it still possible?

Thanks,
Lionel.


----- Message d'origine ----
De : Andrew Makhorin <address@hidden>
À : yo yo <address@hidden>
Cc : address@hidden
Envoyé le : Jeudi, 30 Novembre 2006, 0h51mn 37s
Objet : Re: [Help-glpk] Assign a param to a set in data section

> 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.






        

        
                
___________________________________________________________________________ 
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur 
Yahoo! Questions/Réponses 
http://fr.answers.yahoo.com




reply via email to

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