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) : [email protected] Webmail (preferred) : [email protected] [from Webmail client] _______________________________________________ Help-glpk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-glpk
