[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] default column bounds
From: |
Robbie Morrison |
Subject: |
[Help-glpk] default column bounds |
Date: |
Tue, 4 Jan 2011 22:51:25 +1300 (NZDT) |
User-agent: |
SquirrelMail/1.4.17 |
Hello all, hello Andrew
I have been helping Xypron sub-edit his recent GLPK
Wikibook entry:
http://en.wikibooks.org/wiki/GLPK/Modeling_Lower_and_Uppper_Bounds
And I wanted to make a comment about the default bounds
on structural variables.
Xypron points out that, under MathProg, (structural)
variables are unbounded by default. For instance:
var x;
minimize obj : x;
end;
$ glpsol --model bounds.mod
Preprocessing...
PROBLEM HAS NO DUAL FEASIBLE SOLUTION
$ glpsol --model bounds.mod --nopresol
PROBLEM HAS UNBOUNDED SOLUTION
However, 'x' can be made non-negative by declaring it
thus:
var x, >= 0;
Now turning to the API behavior.
The 4.45 documentation states that a new column call
'glp_add_cols' for the i-th column effectively sets:
glp_set_col_bnds(lp, i, GLP_FX, 0.0, 0.0);
If I am not mistaken, that behavior used to be (around
three years ago) one of non-negativity, namely:
glp_set_col_bnds(lp, i, GLP_LO, 0.0, 0.0);
So, in conclusion, for version 4.45:
* MathProg, without further qualification, sets
unbounded variables
* 'glp_add_cols', without a subsequent call to
'glp_set_col_bnds', sets zeroed variables
Is this correct?
Robbie
---
Robbie Morrison
PhD student -- policy-oriented energy system simulation
Technical University of Berlin (TU-Berlin), Germany
University email (redirected) : address@hidden
Webmail (preferred) : address@hidden
[from Webmail client]
- [Help-glpk] default column bounds,
Robbie Morrison <=