ILOG CPLEX 11.0 User's Manual > Discrete Optimization > Solving Mixed Integer Programming Problems (MIP) > Considering Preliminary Issues > Changing Problem Type in MIPs

Concert Technology applications treat all models as capable of containing integer variables, and thus these variable declarations may be added or deleted at will. When extracting a model with integer variables, it will automatically detect it as a MIP and make the required adjustments to internal data structures.

However, the other ways of using ILOG CPLEX, the Callable Library and the Interactive Optimizer, require an explicit declaration of a problem type to distinguish continuous LPs, QPs, and QCPs from MIPs. Techniques to declare the problem type with the Callable Library and the Interactive Optimizer are discussed in this topic.

When you enter a problem, ILOG CPLEX detects the problem type from the available information. If the problem is read from a file (LP, MPS, or SAV format, for example), or entered interactively, the problem type is discovered according to Table 14.3.

Table 14.3 Problem Type Definitions
Problem Type 
No Integer Variables 
Has Integer Variables 
No Quadratic Terms in the Objective Function 
Has Quadratic Terms in the Objective Function 
Has Quadratic Terms in Constraints 
lp 

 

 

 
qp 

 

 

 
qcp 

 

 
possibly 
milp 

 

 

 
miqp 

 

 

 
miqcp 

 

 
possibly 

However, if you enter a problem with no integer variables, so that its problem type is initially lp, qp, or qcp, and you then wish to modify the problem to contain integer variables, this is accomplished by first changing the problem type to milp, miqp, or miqcp. Conversely, if you have entered an MILP, MIQP, or MIQCP model and wish to remove all the integer declarations and thus convert the model to a continuous formulation, you can change the problem type to lp, qp, or qcp. Note that deleting each of the integer variable declarations individually still leaves the problem type as milp, miqp, or miqcp, although in most instances the distinction between this problem and its continuous counterpart is somewhat arbitrary in terms of the steps that will be taken to solve it.

Thus, when using the Interactive Optimizer, you use the command change problem with one of the following options:

From the Callable Library, use the routine CPXchgprobtype to change the problem type to CPXPROB_MILP, CPXPROB_MIQP, or CPXPROB_MIQCP for the MILP, MIQP, and MIQCP case respectively, and then assign integer declarations to the variables through the CPXcopyctype function. Conversely, remove all integer declarations from the problem by using CPXchgprobtype with problem type CPXPROB_LP, CPXPROB_QP, or CPXPROB_QCP.

At the end of a MIP optimization, the optimal values for the variables are directly available. However, you may wish to obtain information about the LP, QP, or QCP associated with this optimal solution (for example, to know the reduced costs for the continuous variables of the problem at this solution). To do this, you will want to change the problem to be of type Fixed, either fixed_milp for the MILP case or fixed_miqp for the MIQP case. The fixed MIP is the continuous problem in which the integer variables are fixed at the values they attained in the best integer solution. After changing the problem type, you can then call any of the continuous optimizers to re-optimize, and then display solution information for the continuous form of the problem. If you then wish to change the problem type back to the associated milp or miqp, you can do so without loss of information in the model.