Usage summary matlab function in linprog

Usage summary matlab function in linprog

1 Introduction

In matlab, linprog function can solve linear programming problems, for finding the minimum of the objective function

in matlab denoted programming model are written
\ [min \ f \, ^ Tx \; \; such \ that \ begin {equation} \ left \ {\ begin {array} {** lr **} A \ cdot x \ leq b \\ Aeq \ cdot x = beq \\ lb \ leq x \ leq ub \ end {array} \ right. \ end {equation} \]

\ [F, x, b, beq, lb, ub is the vector; and A is a matrix Aeq \]

2. Grammar

2.1 x=linprog(f,A,b)

Solving for
\ [min \ f \ ^ Tx \; such \ that \ A \ cdot x \]

2.2 x=linprog(f,A,b,Aeq,beq)

Solving for
\ [min \ f \, ^ Tx \; \; such \ that \ begin {equation} \ left \ {\ begin {array} {** lr **} A \ cdot x \ leq b \\ Aeq \ cdot x = beq \\ \ end
{array} \ right. \ end {equation} \] If no equation is present, use [] instead Aeq and beq

2.3 x=linprog(f,A,b,Aeq,beq,lb,ub)

Solving for
\ [min \ f \, ^ Tx \; \; such \ that \ begin {equation} \ left \ {\ begin {array} {** lr **} A \ cdot x \ leq b \\ Aeq \ cdot x = beq \\ lb \
leq x \ leq ub \ end {array} \ right. \ end {equation} \] can constrain the range of decision variables [lb, ub] inner

Guess you like

Origin www.cnblogs.com/goodtwo/p/11141969.html