help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] Re: Getting a variable from Datafile


From: Andrew Makhorin
Subject: [Help-glpk] Re: Getting a variable from Datafile
Date: Thu, 21 Oct 2010 18:19:01 +0400

> I need to get the value of a variable from the data file how do i do
> it?
> 
> My statement on model file is
> 
> subject to volumeconstraints1: sum {i in ranges,j in
> carriers}vol1[i,j]<=30,000;
> 
> I want to assign x=30000 in data file and have
> 
> subject to volumeconstraints1: sum {i in ranges,j in
> carriers}vol1[i,j]<=x; as the statement in model file.
> 
> Any help is appreciated.

param x;
. . .
subject to volumeconstraints1: sum {i in ranges,j in
carriers}vol1[i,j]<=x;
. . .
data;
param x := 30000;
. . .

For more details please see the language description inluded in the glpk
distribution.




reply via email to

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