> Discrete Optimization > Solving Mixed Integer Programming Problems (MIP) > Considering Preliminary Issues > Entering MIP Problems |
Entering MIP Problems |
INDEX PREVIOUS NEXT |
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 13.1.
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.
read
command with an option to indicate the file type.
importModel
method in Concert Technology or use CPXreadcopyprob
in the Callable Library.
Copyright © 1987-2003 ILOG, S.A. All rights reserved. Legal terms. | PREVIOUS NEXT |