> I solve an optimization problem where I need to specify variables
> (columns) to be in one of possible states:
>    1) within an set interval lpx_set_col_bnds(lpx, id, LPX_DB, from,
>       to)
>    2) zero
> 
> Is there a way how to set a column to be in interval <from, to> or
> zero?

This is so called disjunctive constraint; in your case it can be
modeled as follows:

   from * z <= x <= to * z

or, in the standard format:

   x - from * z >= 0
   x -   to * z <= 0

where x is your variable, z is a *binary* variable (z = 0 means that
x = 0, and z = 1 means that from <= x <= to). Note that each original
variable needs two constraints (rows) and one binary variable.

Another way could be using semi-continuous variables, however, glpk
does not support such kind of variables.





_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to