4.9 MATLAB Solutions 235
Basic Variables bi/ais
variables x 1 x 2 λ 1 λ 2 θ 1 θ 2 Y 1 Y 2 z 1 z 2 w bi forais> 0
x 1 1 0 0 269 − 261 131 135 0 261 − 131 0 3213
Y 2 0 0 0 −^8126269 − 139 137 1 − 269 139 0 2413
λ 1 0 0 1 − 137 − 135 − 133 − 132 0 135 133 0 138
x 2 0 1 0 − 139 131 − 132 133 0 − 131 132 0 1413
−w 0 0 0 0 0 0 0 0 1 1 1 0
Since both the artificial variablesz 1 andz 2 are driven out of the basis, the present tableau
gives the desired solution asx 1 =^3213 , x 2 =^1413 , Y 2 =^2413 , λ 1 = 138 (basic variables),
λ 2 = 0 ,Y 1 = 0 ,θ 1 = 0 ,θ 2 = (nonbasic variables). Thus the solution of the original 0
quadratic programming problem is given by
x∗ 1 =^3213 , x 2 ∗=^1413 , nda fmin= f(x 1 ∗, x 2 ∗) =−^8813
4.9 MATLAB Solutions
The solutions of linear programming problems, based on interior point method, and
quadratic programming problems using MATLAB are illustrated by the following
examples.
Example 4.15 Find the solution of the following linear programming problem using
MATLAB (interior point method):
Minimizef= −x 1 − 2 x 2 −x 3
subject to
2 x 1 +x 2 −x 3 ≤ 2
2 x 1 −x 2 + 5 x 3 ≤ 6
4 x 1 +x 2 +x 3 ≤ 6
xi≥ 0 ;i= 1 , 2 , 3
SOLUTION
Step 1Express the objective function in the formf (x)=fTx nd identify the vectorsa
xandf as
x=
x 1
x 2
x 3
and f=
− 1
− 2
− 1