ILOG CPLEX 11.0 User's Manual > Discrete Optimization > Solving Mixed Integer Programming Problems (MIP) > Considering Preliminary Issues > Entering MIP Problems

You enter MIPs into ILOG CPLEX as explained in each of the chapters about the APIs of ILOG CPLEX, 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 users can specify this information by passing the value of a type to the appropriate constructor when creating the variable, as summarized in Table 14.1.

Table 14.1 Specifying Type of Variable in a MIP
Type of Variable 
C++ API 
Java API 
.NET API 
binary 
IloNumVar::Type::ILOBOOL 
IloNumVarType.Bool 
NumVarType.Bool 
integer 
IloNumVar::Type::ILOINT 
IloNumVarType.Int 
NumVarType.Int 
semi-continuous 
IloSemiContVar::Type::ILONUM 
IloNumVarType.Float 
NumVarType.Float 
semi-integer 
IloSemiContVar::Type::ILOINT 
IloNumVarType.Int 
NumVarType.Int 

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

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 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. Understanding File Formats in this manual lists the file formats briefly, and the ILOG CPLEX Reference Manual documents file formats, such as MPS, LP, and others.