Home > mpt > extras > auxiliary > mpt_solveLPs.m

mpt_solveLPs

PURPOSE ^

MPT_SOLVELPS Interface to various LP solvers ("safe" version)

SYNOPSIS ^

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

DESCRIPTION ^

MPT_SOLVELPS Interface to various LP solvers ("safe" version)

 [xopt,fval,lambda,exitflag,how]=mpt_solveLPs(f,A,B,Aeq,Beq,x0,lpsolver);

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

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

 by using the method specified in 'lpsolver'

 WARNING: This is the "safe" version, which means that if the problem is
 infeasible with the default solver, another available solver will be used
 until: 
   - a feasible solution is found, or
   - all available solvers are tried

 WARNING: This is a "fast" version of mpt_solveLP:
   - objective vector "f" must be a row vector !!!
   - no (or at least very few) error checks are being performed
   - all 7 input arguments must be specified

 NOTE! NOTE! NOTE! This function is used only for internal purposes, ordinary
 users should always use "mpt_solveLP" instead.

 ---------------------------------------------------------------------------
 INPUT
 ---------------------------------------------------------------------------
 f        - Optimization objective (must be a row vector!!!!!!!!)
 A,B      - Matrices defining inequality constraints
 Aeq,Beq  - Matrices defining equality constraints
 x0       - Initial value                         
 lpsolver - Which LP solver to use

 ---------------------------------------------------------------------------
 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')

 see also MPT_SOLVELP

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Thu 30-Mar-2006 10:26:47 by m2html © 2003