12.07.2015 Views

ILOG CPLEX 11.0 User's Manual

ILOG CPLEX 11.0 User's Manual

ILOG CPLEX 11.0 User's Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

◆milp, miqp, or miqcpindicating that you want <strong>ILOG</strong> <strong>CPLEX</strong> to treat the problem as an MILP, MIQP, orMIQCP, respectively. This change in problem type makes the model ready fordeclaration of the integer variables via subsequent change type commands. If youchange the problem to be an MIQP and there are not already quadratic terms in theobjective function, an empty quadratic matrix is created, ready for populating via thechange qpterm command.◆lp, qcp, or qpindicating that you want all integer declarations removed from the variables in theproblem. If you choose the qp problem type and there are not already quadratic terms inthe objective function, an empty quadratic matrix is created, ready for populating via thechange qpterm command.From the Callable Library, use the routine CPXchgprobtype to change the problem type toCPXPROB_MILP, CPXPROB_MIQP, or CPXPROB_MIQCP for the MILP, MIQP, and MIQCPcase respectively, and then assign integer declarations to the variables through theCPXcopyctype function. Conversely, remove all integer declarations from the problem byusing CPXchgprobtype with problem type CPXPROB_LP, CPXPROB_QP, orCPXPROB_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 thisoptimal solution (for example, to know the reduced costs for the continuous variables of theproblem at this solution). To do this, you will want to change the problem to be of typeFixed, either fixed_milp for the MILP case or fixed_miqp for the MIQP case. The fixedMIP is the continuous problem in which the integer variables are fixed at the values theyattained in the best integer solution. After changing the problem type, you can then call anyof the continuous optimizers to re-optimize, and then display solution information for thecontinuous form of the problem. If you then wish to change the problem type back to theassociated milp or miqp, you can do so without loss of information in the model.Changing Variable TypeThe command change type adds (or removes) the restriction on a variable that it must bean integer. In the Interactive Optimizer, when you enter the command change type, thesystem prompts you to enter the variable that you want to change, and then it prompts you toenter the type (c for continuous, b for binary, i for general integer, s for semi-continuous, nfor 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 createboth a lower bound and an upper bound for it. These variable types specify that at an optimal260 <strong>ILOG</strong> <strong>CPLEX</strong> <strong>11.0</strong> — USER’ S MANUAL

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!