------------------------------ deprecated ------------------------------ Use QPS_MATPOWER instead. -------------------------------------------------------------------------- MP_LP Linear program solver. [X, LAMBDAOUT, HOWOUT, SUCCESS] = ... MP_LP(f, A, b, VLB, VUB, X0, N, VERBOSE, ALG, OPT) A common wrapper for various LP solvers, using the calling syntax of LP from version 1 of the Optimization Toolbox, with the exception that verbose == 0 means no output. The optional argument alg determines the solver. alg = 100 : BPMPD_MEX alg = 200 : MIPS, MATLAB Interior Point Solver pure MATLAB implementation of a primal-dual interior point method alg = 250 : MIPS-sc, a step controlled variant of MIPS alg = 300 : Optimization Toolbox, LINPROG or LP alg = 400 : IPOPT alg = 500 : CPLEX alg = 600 : MOSEK alg = 700 : Gurobi If ALG is missing or equal to zero, the first available solver is used. An additional optional argument OPT can be used to set algorithm specific options. From the Optimization Toolbox v.1 docs ... X=LP(f,A,b) solves the linear programming problem: min f'x subject to: Ax <= b x X=LP(f,A,b,VLB,VUB) defines a set of lower and upper bounds on the design variables, X, so that the solution is always in the range VLB <= X <= VUB. X=LP(f,A,b,VLB,VUB,X0) sets the initial starting point to X0. X=LP(f,A,b,VLB,VUB,X0,N) indicates that the first N constraints defined by A and b are equality constraints. X=LP(f,A,b,VLB,VUB,X0,N,DISPLAY) controls the level of warning messages displayed. Warning messages can be turned off with DISPLAY = -1. [x,LAMBDA]=LP(f,A,b) returns the set of Lagrangian multipliers, LAMBDA, at the solution. [X,LAMBDA,HOW] = LP(f,A,b) also returns a string how that indicates error conditions at the final iteration. LP produces warning messages when the solution is either unbounded or infeasible.
0001 function [varargout] = mp_lp(varargin) 0002 %------------------------------ deprecated ------------------------------ 0003 % Use QPS_MATPOWER instead. 0004 %-------------------------------------------------------------------------- 0005 %MP_LP Linear program solver. 0006 % [X, LAMBDAOUT, HOWOUT, SUCCESS] = ... 0007 % MP_LP(f, A, b, VLB, VUB, X0, N, VERBOSE, ALG, OPT) 0008 % 0009 % A common wrapper for various LP solvers, using the calling syntax of 0010 % LP from version 1 of the Optimization Toolbox, with the exception 0011 % that verbose == 0 means no output. The optional argument alg 0012 % determines the solver. 0013 % alg = 100 : BPMPD_MEX 0014 % alg = 200 : MIPS, MATLAB Interior Point Solver 0015 % pure MATLAB implementation of a primal-dual 0016 % interior point method 0017 % alg = 250 : MIPS-sc, a step controlled variant of MIPS 0018 % alg = 300 : Optimization Toolbox, LINPROG or LP 0019 % alg = 400 : IPOPT 0020 % alg = 500 : CPLEX 0021 % alg = 600 : MOSEK 0022 % alg = 700 : Gurobi 0023 % If ALG is missing or equal to zero, the first available solver is used. 0024 % An additional optional argument OPT can be used to set algorithm 0025 % specific options. 0026 % 0027 % From the Optimization Toolbox v.1 docs ... 0028 % X=LP(f,A,b) solves the linear programming problem: 0029 % 0030 % min f'x subject to: Ax <= b 0031 % x 0032 % 0033 % X=LP(f,A,b,VLB,VUB) defines a set of lower and upper 0034 % bounds on the design variables, X, so that the solution is always in 0035 % the range VLB <= X <= VUB. 0036 % 0037 % X=LP(f,A,b,VLB,VUB,X0) sets the initial starting point to X0. 0038 % 0039 % X=LP(f,A,b,VLB,VUB,X0,N) indicates that the first N constraints defined 0040 % by A and b are equality constraints. 0041 % 0042 % X=LP(f,A,b,VLB,VUB,X0,N,DISPLAY) controls the level of warning 0043 % messages displayed. Warning messages can be turned off with 0044 % DISPLAY = -1. 0045 % 0046 % [x,LAMBDA]=LP(f,A,b) returns the set of Lagrangian multipliers, 0047 % LAMBDA, at the solution. 0048 % 0049 % [X,LAMBDA,HOW] = LP(f,A,b) also returns a string how that indicates 0050 % error conditions at the final iteration. 0051 % 0052 % LP produces warning messages when the solution is either unbounded 0053 % or infeasible. 0054 0055 % MATPOWER 0056 % $Id: mp_lp.m,v 1.32 2011/11/11 16:08:11 cvs Exp $ 0057 % by Ray Zimmerman, PSERC Cornell 0058 % Copyright (c) 1996-2010 by Power System Engineering Research Center (PSERC) 0059 % 0060 % This file is part of MATPOWER. 0061 % See http://www.pserc.cornell.edu/matpower/ for more info. 0062 % 0063 % MATPOWER is free software: you can redistribute it and/or modify 0064 % it under the terms of the GNU General Public License as published 0065 % by the Free Software Foundation, either version 3 of the License, 0066 % or (at your option) any later version. 0067 % 0068 % MATPOWER is distributed in the hope that it will be useful, 0069 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0070 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0071 % GNU General Public License for more details. 0072 % 0073 % You should have received a copy of the GNU General Public License 0074 % along with MATPOWER. If not, see <http://www.gnu.org/licenses/>. 0075 % 0076 % Additional permission under GNU GPL version 3 section 7 0077 % 0078 % If you modify MATPOWER, or any covered work, to interface with 0079 % other modules (such as MATLAB code and MEX-files) available in a 0080 % MATLAB(R) or comparable environment containing parts covered 0081 % under other licensing terms, the licensors of MATPOWER grant 0082 % you additional permission to convey the resulting work. 0083 0084 [varargout{1:nargout}] = mp_qp([], varargin{:});