[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## [Help-glpk] Can I specify the actual variable bounds in the constraints

**From**: |
Maurice . Djona |

**Subject**: |
[Help-glpk] Can I specify the actual variable bounds in the constraints and s et the variables bounds to 'free' in the program? |

**Date**: |
Thu, 20 May 2004 13:56:11 -0400 |

Hi,
We use glpk 3.2.3 to develop programs for which changing the constraints is
easier than changing the bounds of variables.
So we prefer to set once in the program the
variables bounds to 'free' (lpx_set_col_bnds(lp, i, LPX_FR, 0.0, 0.0); /*
for all the i */).
We then specify the actual bounds of the variables in the constraints.
For example, for the problem:
maximize
Z = x1+x2
subject to
x1 + 2x2 <= 6
where all variables are non-negative
x1 >= 0 and x2 >= 0
We would set the objective function to
Z = x1+x2
And the constraints would be (non-negativity of variables is added to the
constraints):
x1 + 2x2 <= 6
x1 >= 0
x2 >= 0
In our program we already have lpx_set_col_bnds(lp, i, LPX_FR, 0.0, 0.0); /*
for each i.*/
Can anyone tell me if specifying the actual bounds in the constraints and
setting the variables bounds to 'free'
can create any problems in the program? (we have problems of up to 135
variables).
Thanks!
Maurice Djona
address@hidden

**[Help-glpk] Can I specify the actual variable bounds in the constraints and s et the variables bounds to 'free' in the program?**,
*Maurice . Djona* **<=**