Home > mpt > solvers > mpt_solveLP.m

# mpt_solveLP

## PURPOSE

MPT_SOLVELP Interface to various LP solvers

## SYNOPSIS

function [xopt,fval,lambda,exitflag,how]=mpt_solveLP(f,A,B,Aeq,Beq,x0,lpsolver,lb,ub)

## DESCRIPTION

```MPT_SOLVELP Interface to various LP solvers

[xopt,fval,lambda,exitflag,how]=mpt_solveLP(f,A,B,Aeq,Beq,x0,lpsolver,lb,ub)

---------------------------------------------------------------------------
DESCRIPTION
---------------------------------------------------------------------------
Solves an LP problem:

min  f'x
s.t.   A*x <= B
Aeq*x = Beq
lb <= x <= ub

by using the method specified in 'solver'

---------------------------------------------------------------------------
INPUT
---------------------------------------------------------------------------
f        - Optimization objective
A,B      - Matrices defining inequality constraints
Aeq,Beq  - Matrices defining equality constraints (optional)
x0       - Initial value                          (optional)
lpsolver - Which LP solver to use:
lpsolver=0: uses NAG (E04NAG.M)
lpsolver=9: uses NAG (E04MBF.M)
lpsolver=1: uses linprog.m
lpsolver=2: uses CPLEX9 (cplexint)
lpsolver=3: uses CDD Criss-Cross (cddmex)
lpsolver=4: uses GLPK (glpkmex)
lpsolver=5: uses CDD Dual Simplex (cddmex)
lpsolver=6: uses SeDuMi
lpsolver=7: uses QSopt (qsoptmex)
lpsolver=8: uses CPLEX8 (lp_cplex)
lpsolver=10: uses XPRESS
lpsolver=11: uses MOSEK
lpsolver=12: uses OOQP
lpsolver=13: uses CLP
lpsolver=14: uses BPMPD (bpmpd_mex)
lpsolver=15: uses CPLEX (cplexmex)
lpsolver=16: uses PDCO

lb, ub   - lower and upper bounds on variables (optional)
Note! set "lpsolver=[]" to select the default solver.

Note: if 'lpsolver' is not specified, mptOptions.lpsolver will be used instead
(see help mpt_init)

---------------------------------------------------------------------------
OUTPUT
---------------------------------------------------------------------------
xopt      - The optimizer
fval      - Value of the objective
lambda    - Vector of Lagrangian multipliers
exitflag  - An integer specifying result of the optimization:
1 - feasible optimal solution found
0 - unbounded or undecided problem
-1 - infeasible problem
how       - States the result of optimization ('ok', 'unbounded', 'infeasible')

## CROSS-REFERENCE INFORMATION

This function calls:
• length LENGTH Returns number of regions over which the explicit control law is defined
• end END Returns the last element in a given polytope array
• length LENGTH Returns number of elements in a polytope array
• size SIZE Returns size of the given polytope object
• mpt_error MPT_ERROR Function called if MPT toolbox is not initialized
• mpt_solveLPi MPT_SOLVELPi Interface to various LP solvers (version without errorchecks)
• mpt_solveLPs MPT_SOLVELPS Interface to various LP solvers ("safe" version)
This function is called by:
• distance DISTANCE Distance between two sets
• mpt_dlyap_infnorm Lyapunov equation with inf-norm for discrete-time LTI systems
• mpt_verify MPT_VERIFY Verifies if states enter a given set in a given number of steps
• hys2pwa HYS2PWA Transformation of HYSDEL model into PWA model
• mpt_optControlPWA MPT_OPTCONTROLPWA Solves the CFTOC problem for a given PWA system
• mpt_simplexContr MPT_SIMPLEXCONTR Computes a piecewise affine feedback law defined over simplices
• mpt_solveMPC MPT_SOLVEMPC Solves the on line optimization MPC problem
• intersectHP1 Tobias Geyer, 2003-2004
• mpt_optMergeDivCon ===============================================================================
• mpt_getInput MPT_GETINPUT For a given state, extracts the (optimal) output from a controller structure

Generated on Thu 30-Mar-2006 10:26:47 by m2html © 2003