Entering MIP Problems

You enter MIPs into ILOG CPLEX as explained in Put Data in the Problem Object, with this additional consideration: you need to indicate which variables are binary, general integer, semi-continuous, and semi-integer, and which are contained in special ordered sets (SOS).

Concert Technology Library users can specify this information by passing a type value to the appropriate constructor when creating the variable. Use IloNumVar objects of type ILOBOOL (IloNumVarType.Bool in Java) for binary variables and of type ILOINT (IloNumVarType.Int in Java) for general integer variables. Use IloSemiContVar objects of type ILONUM (IloNumVarType.Float in Java) for semi-continuous variables, and IloSemiContVar of type ILOINT (IloNumVarType.Int in Java) for semi-integer variables.

Callable Library users can specify this information through the CPXcopyctype() routine.

In the Interactive Optimizer, to indicate binary integers in the context of the enter command, type binaries on a separate line, followed by the designated binary variables. To indicate general integers, type generals on a separate line, followed by the designated general variables. To indicate semi-continuous variables, type semi-continuous on a separate line, followed by the designated variables. Semi-integer variables are indicated by being specified as both general integer and semi-continuous. The order of these three sections does not matter. To enter the general integer variable of the Sample: Stating a MIP Problem, you type this:

generals

x4

You may also read MIP data in from a formatted file, just as you do for linear programming problems. Chapter 9, More About Using ILOG CPLEX in this manual describes file formats briefly, and the ILOG CPLEX Reference Manual documents file formats, such as MPS, LP, and others.


Previous Page: Considering Preliminary Issues  Return to Top Next Page: Displaying MIP Problems