« Previous « Start » Next »
3 Using the Matlab Interface
The two main routines in the two-layer design of the interface are
shown in Table
1. Page and section references are
given to detailed descriptions on how to use the routines. Users not
using the TOMLAB
Prob format can skip reading about the routine
cplexTL. A normal user, not using callbacks, only has to read
about how to call the level 1 interface routine
cplex.m.
Table 1: The interface routines.
|
Function |
Description |
Section |
|
cplex |
The layer one Matlab interface routine, calls the
MEX-file interface cplexmex.dll |
A.1 |
cplexTL |
The layer two TOMLAB interface routine that calls
cplex.m. Converts the input Prob format before calling cplex.m
and converts back to the output Result structure. |
A.2 |
|
The CPLEX control parameters (Section
G in
this manual), are all possible to set from Matlab.
They could be set as input to the interface routine
cplex, but
also in the callback routines. The user sets fields in a structure
called
cpxControl, where the subfield names are the same as
the names of the control variables. The following example shows
how to set the values for one integer variable
ITLIM, one
double variable
EPOPT, and one character variable valued
variable
WORKDIR. TOMLAB /CPLEX does not use the prefix
CPX_PARAM_ in the Matlab structures.
cpxControl.ITLIM = 50; % Setting maximal number of simplex iterations
cpxControl.EPOPT = 1E-5; % Changing reduced cost tolerance
cpxControl.WORKDIR = '.'; % New work directory ( '.' for current directory)
Character valued variables should have ≤ 64 characters.
« Previous « Start » Next »