SOL LPOPT

From TomWiki
Revision as of 13:03, 22 January 2012 by Elias (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Notice.png

This page is part of the SOL Manual. See SOL.

Direct Solver Call

A direct solver call is not recommended unless the user is 100 % sure that no other solvers will be used for the problem. Please refer to #Using TOMLAB for information on how to use LPOPT with TOMLAB.

Purpose

lpopt solves dense linear optimization problems defined as


where , , and .

If isempty(c) (or all(c==0), then a feasible point problem is solved (FP). Otherwise a standard linear programming problem is solved (LP)

Calling Syntax

[Inform, Iter, iState, Ax, cLamda, Obj, x] = lpopt(A, bl, bu, c, Warm, x, iState, SpecsFile, 
PrintFile,  SummFile, PriLev, optPar );

Description of Inputs

The following fields are used:
A Constraint matrix, m x n (DENSE).
bl Lower bounds on (x,Ax), m+n x 1 vector (DENSE).
bu Upper bounds on (x,Ax), m+n x 1 vector (DENSE).
c Linear objective function cost coeffs, n x 1 (DENSE). If length(c) < n, setting c(1:n)=0;
Warm If Warm > 0, then warm start, otherwise cold Start. Default 0. If warm start, then x and iState must be set properly. Normally the values from last call to lpopt are used.
x Initial estimate of solution vector x. (DENSE) If length(x) ¡ n, the rest of the elements in x are set to 0.
iState Working set (if Warm start) (n+m) x 1 (DENSE) If length(iState) ¡ n+m, setting iState(1:n+m)=0;

iState(i)=0: Corresponding constraint not in the initial QP working set.

iState(i)=1: Inequality constraint at its lower bound in QP working set.

iState(i)=2: Inequality constraint at its upper bound in QP working set.

iState(i)=3: Equality constraint in the initial QP working set,bl(i)==bu(i).

SpecsFile Name of the OPTIONS File, see TOMLAB Guide.
PrintFile Name of the Print file. Name includes the path, maximal number of characters = 500.
SummFile Name of the Summary file. Name includes the path, maximal number of char- acters = 500.
PriLev Print level in the lpopt MEX-interface.

= 0 Silent.

= 1 Summary information.

= 2 More detailed information. if isempty(PriLev), set as 0.

optPar Vector with optimization parameters overriding defaults and the optionally specified SPECS file. If length(optPar) ¡ 62, lpopt sets the rest of the values to missing value (-999).

Description of Outputs

The following fields are used:
Inform Result of LPOPT run.

0 = Optimal solution with unique minimizer found.

1 = A dead point was reached.

2 = The solution appears to be unbounded (or badly scaled).

3 = The constraints could not be satisfied. The problem has no feasible solu- tion.

4 = Too many iterations, in either phase.

5 = The Maximum degrees of freedom is too small. The reduced Hessian must expand if further progress is too be made.

6 = An input parameter was invalid.

7 = The problem type was not recognized. Other = UNKNOWN LPOPT Inform value.

Iter Number of iterations.
iState Status of working set, se input description of iState.
Ax A*x.
cLamda Lagrangian multipliers (dual solution vector) (m x 1 vector).
Obj Objective function value at optimum.
x Solution vector with decision variable values (n x 1 vector).

Using TOMLAB

Purpose

lpoptTL solves dense linear optimization problems defined as


where , , and .

Calling Syntax

Using the driver routine tomRun :

Prob = lpAssign( ... );
Result = tomRun('lpopt',  Prob ... );
or
Prob = ProbCheck( ... ); 
Result = lpoptTL(Prob);

Call Prob = lpAssign( ... ) or Prob=ProbDef to define the Prob for the second option.

Description of Inputs

Prob, The following fields are used:
x_L, x_U Bounds on variables.
b_L, b_U Bounds on linear constraints.
A Linear constraint matrix.
QP.c Linear coefficients in objective function.
PriLevOpt Print level.
WarmStart If true, use warm start, otherwise cold start.
SOL.xs Solution and slacks from previous run.
SOL.iState Working set (if Warm start) (n+m) x 1 (DENSE) If length(iState) ¡ n+m, setting iState(1:n+m)=0;

iState(i)=0:Corresponding constraint not in the initial QP working set.

iState(i)=1:Inequality constraint at its lower bound in QP working set.

iState(i)=2:Inequality constraint at its upper bound in QP working set.

iState(i)=3:Equality constraint in the initial QP working set, bl(i)==bu(i).

SOL.SpecsFile Name of user defined SPECS file, read BEFORE optPar() is used.
SOL.PrintFile Name of SOL Print file. Amount and type of printing determined by SPECS parameters or optPar parameters.
SOL.SummFile Name of SOL Summary File.
SOL.optPar Elements > -999 takes precedence over corresponding TOMLAB params. See Table 50.

Description of Outputs

Result, The following fields are used:
Result The structure with results (see ResultDef.m).
f_k Function value at optimum.
x_k Solution vector.
x_0 Initial solution vector.
g_k Gradient c (linear objective).
xState State of variables. Free == 0; On lower == 1; On upper == 2; Fixed == 3;
bState State of linear constraints. Free == 0; Lower == 1; Upper == 2; Equality == 3;
v_k Lagrangian multipliers (for bounds + dual solution vector).
ExitFlag Exit status from lpopt.m (similar to TOMLAB).
Inform LPOPT information parameter.

0 = Optimal solution with unique minimizer found.

1 = A dead point was reached.

2 = The solution appears to be unbounded (or badly scaled).

3 = The constraints could not be satisfied. The problem has no feasible solu- tion.

4 = Too many iterations, in either phase.

5 = The Maximum degrees of freedom is too small. The reduced Hessian must expand if further progress is too be made.

6 = An input parameter was invalid.

7 = The problem type was not recognized. Other = UNKNOWN LPOPT Inform value.

rc Reduced costs. If ninf=0, last m == -v k.
Iter Number of iterations.
FuncEv Number of function evaluations.
ConstrEv Number of constraint evaluations.
QP.B Basis vector in TOMLAB QP standard. MinorIter Number of minor iterations. Not Set. Solver Name of the solver (lpopt).
SolverAlgorithm Description of the solver.
SOL.xs Solution and slack variables.
SOL.iState State for variables and constraints in iState.

optPar

Description

Use missing value (-999 or less), when no change of parameter setting is wanted. No call is then done to internal routines lpprmi, lpprmr and lpprm. The default value will then be used by LPOPT, unless the value is altered in the SPECS file.

Description of Inputs

Table: The following fields are used:

# SPECS keyword text Lower Default Upper Comment
Printing
1. PRINT LEVEL 0 10 0,1,5,10,20,30
Convergence Tolerances
In LPOPT/QPOPT: macheps = 2-53 ; eps in Matlab is = 2-52 ;
10. OPTIMALITY TOLERANCE > 0 1.05E-8 sqrt(macheps)
11. FEASIBILITY TOLERANCE > 0 1.05E-8 sqrt(macheps)
Other Tolerances
21. CRASH TOLERANCE > 0 0.01 < 1
27. RANK TOLERANCE > 0 1.11E-14 100*macheps
30. ITERATION LIMIT >0 max(2000,5(n+m))
33. MIN SUM YES (or NO)

IF 1 (MIN SUM YES), minimize the infeasibilities before return.

0 0 1 1=min infeas.
36. FEASIBILITY PHASE ITERATIONS >0 max(2000,5(n+m))
45. INFINITE STEP SIZE >0 1E20
Frequencies
51. CHECK FREQUENCY > 0 50
52. EXPAND FREQUENCY > 0 5