ILOG CPLEX 11.0 User's Manual > Discrete Optimization > Solving Mixed Integer Programming Problems (MIP) > Considering Preliminary Issues > Changing Variable Type |
Changing Variable Type |
INDEX PREVIOUS NEXT |
The command change type
adds (or removes) the restriction on a variable that it must be an integer. In the Interactive Optimizer, when you enter the command change type
, the system prompts you to enter the variable that you want to change, and then it prompts you to enter the type (c
for continuous, b
for binary, i
for general integer, s
for semi-continuous, n
for semi-integer).
You can change a variable to binary even if its bounds are not 0 (zero) and 1 (one). However, in such a case, the optimizer will change the bounds to be 0 and 1.
If you change the type of a variable to be semi-continuous or semi-integer, be sure to create both a lower bound and an upper bound for it. These variable types specify that at an optimal solution the value for the variable must be either exactly zero or else be between the lower and upper bounds (and further subject to the restriction that the value be an integer, in the case of semi-integer variables).
A problem may be changed to a mixed integer problem, even if all its variables are continuous.
Copyright © 1987-2007 ILOG S.A. All rights reserved. Legal terms. | PREVIOUS NEXT |