help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Question about modeling in MathProg


From: glpk xypron
Subject: Re: [Help-glpk] Question about modeling in MathProg
Date: Sun, 07 Mar 2010 01:36:53 +0100

Hello Aly,

> 1. In question 1 below, do I have to define the set T by "set T :=
> {1..10};" ? Couldn't it be "set T;" and then from the data the model would
> identify the cardinality of the set T by itself? Cause I'd like the model to 
> be
> general for any instance size.
You can initialize sets and parameters in either of:
the declaration
the data section
a table statement (see doc/tables.pdf) using a SQL data base, a CSV file, or a 
DBF file.

> 2. Is there a difference between "var x{T};" and "var x{t in T}>=0;" ?
var x{T} is unbounded and the same as var x{t in T}
var x{T} >=0 is lower bounded
var x{T} <=0 is upper bounded
var x{T} >=0,<=4 is double bounded

Best regards

Xypron
-- 
GMX DSL: Internet, Telefon und Entertainment für nur 19,99 EUR/mtl.!
http://portal.gmx.net/de/go/dsl02




reply via email to

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