|
  |
 |
|
| CPLEX Interactive Optimizer |
|
CPLEX Interactive Optimizer is a command-line utility provided with
CPLEX. This utility
serves as a prototyping and debugging tool for applications developed with
CPLEX Component Libraries. It also serves as
a stand-alone executable program that can be used to solve linear, mixed
integer, and quadratic programming problems. CPLEX Interactive
Optimizer can be run either interactively or in batch mode. Basic
commands are:
| add |
Add constraints to the problem |
| baropt |
Solve using barrier algorithm |
| change |
Change the problem |
| display |
Display problem, solution, or parameter settings |
| enter |
Enter a new problem |
| help |
Provide information on CPLEX commands |
| mipopt |
Solve a mixed integer program |
| netopt |
Solve the problem using network method |
| optimize |
Solve the problem |
| primopt |
Solve using the primal method |
| quit |
Leave CPLEX |
| read |
Read problem or basis information from a file |
| set |
Set parameters |
| tranopt |
Solve using the dual method |
| write |
Write problem or solution information to a file |
| xecute |
Execute a command from the operating system |
|
Below is an example of a session with CPLEX Interactive Optimizer. User
inputs are indicated in bold.
 |
|
Welcome to CPLEX Linear Optimizer 7.0.0
with Mixed Integer & Barrier Solvers
Copyright (c) ILOG 1997-2000
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 afiro.mps
Selected objective sense: MINIMIZE
Selected objective name: obj
Selected RHS name: rhs
Problem 'afiro.mps' read.
Read time = 0.10 sec.
CPLEX> opt
Tried aggregator 1 time.
LP Presolve eliminated 9 rows and 11 columns.
Aggregator did 6 substitutions.
Reduced LP has 12 rows, 15 columns, and 38 nonzeros.
Presolve time = 0.04 sec.
Iteration log . . .
Iteration: 1 Scaled dual infeas = 0.480000
Iteration: 3 Dual objective = -487.457143
Dual - Optimal: Objective = -4.6475314286e+002
Solution time = 0.18 sec. Iterations = 5 (2)
CPLEX> dis prob nam var
Display which variable name(s): -
x2 x13 x17 x29 x32 x1 x3 x4 x5 x6 x7 x8 x14 x15 x9 x10 x11
x12 x16 x18 x19 x20 x21 x22 x23 x24 x31 x30 x25 x26 x27 x28
CPLEX> dis sol var x2
Variable Name Solution Value
x2 25.500000
CPLEX> change
Change options:
bounds change bounds on a variable
coefficient change a coefficient
delete delete some part of the problem
name change a constraint or variable name
objective change objective function value
problem change problem type
qpterm change a quadratic objective term
rhs change a right-hand side or network supply/demand value
sense change objective function or a constraint sense
type change variable type
Change to make: bound
Change bounds on which variable: x2
Present bounds on variable x2: The indicated variable is >= 0.
Change lower or upper bound, or both ['l', 'u', or 'b']: u
Change upper bound to what ['+inf' for no upper bound]: 24
New bounds on variable 'x2': 0 <= x2 <= 24
CPLEX> opt
Iteration log . . .
Iteration: 1 Dual objective = -464.235986
Dual - Optimal: Objective = -4.6423598571e+002
Solution time = 0.00 sec. Iterations = 1 (0)
CPLEX> dis sol var x2
Variable Name Solution Value
x2 24.000000
CPLEX> quit
|
 |
|
|
 |
 |
 |
ILOG Optimization Technologies Workshop |
 |
| |
29 May 2008 Pittsburgh, PA |
|
| |
|
|
 |
|
 |
|