How to Use CPLEX                              last update: 2001.9.1

1.  Log on to one of the teaching machines:

          lab110-5 ... lab110-18

2. Set cplex's environment variable.
   If you are using tcsh or csh then your environment should
   set to:
        setenv CPLEXLICDIR /usr/local/pkgs/cplex/licdir
   If you are using Bourne shell then your environment should
   set to:
        CPLEXLICDIR=/usr/local/pkgs/cplex/licdir; export CPLEXLICDIR

3. Make sure your search path include /usr/local/bin.

4. Just type "cplex" and you should get the cplex prompt.

5. Our licence only allows 10 users at any one time.

6. Complete documentation is in the consultants office at the labs in McConnell 106.

7. A few sample cplex input files are contained in

8. Here is a sample session on sita for the 5 queens problem:

[] cplex

Welcome to CPLEX Linear Optimizer 6.0.1
  with Mixed Integer & Barrier Solvers
Copyright (c) ILOG 1997-1998
CPLEX is a registered trademark of ILOG

Type 'help' for a list of available commands.
Type 'help' followed by a command name for more
information on commands.

CPLEX> read 5queens.lp
Problem '5queens.lp' read.
Read time =    0.00 sec.
CPLEX> mipopt
Tried aggregator 1 time.
No MIP presolve or aggregator reductions.
Presolve time =    0.00 sec.
Maximum infeasibility variable selection.
Objective is integral.

        Nodes                                         Cuts/
   Node  Left     Objective  IInf  Best Integer     Best Node    ItCnt

      0     0        5.0000     9                      5.0000       13
*     4     0        5.0000     0        5.0000                     34

Integer optimal solution:  Objective =    5.0000000000e+00
Solution time =    0.01 sec.  Iterations = 34  Nodes = 4

CPLEX> di so va -
Variable Name           Solution Value
x12                           1.000000
x25                           1.000000
x33                           1.000000
x41                           1.000000
x54                           1.000000
All other variables in the range 1-25 are zero.
CPLEX> quit
[ 48]