You are on page 1of 3

SIMPLEX METHOD TEKNIK OPTIMASI

Nama : Muhamad Khoir


Nim : 22521251001

PROBLEMS EXERCISE
1. State the following LP problem in standard form:
Maximize f = −2x1 − x2 + 5x3
subject to:
x1 − 2x2 + x3 ≤ 8
3x1 − 2x2 ≥ −18
2x1 + x2 − 2x3 ≤ −4

Answer
Matrik x = [x1; x2; x3], and f = [-2; -1 ;5]
Matrix A = [1 -2 1; 3 -2 0; 2 2 – 2], and b = 8; -18; -4]
f = [-2; -1; 5]

f=
-2
-1
5
>> A = [1 -2 1; 3 -2 0; 2 2 -2]
A=
1 -2 1
3 -2 0
2 2 -2
>> b = [8; -18; -4]
b=
8
-18
-4
hanya bisa sampai sini pak karena keterangan dri aplikasi matlab nya error

options = optimset('LargeScale', 'off', 'Simplex', 'on');


Error using optimset
Unrecognized parameter name 'Simplex'. Please see the options table in
the documentation for a list of acceptable option parameters. Note that
some parameters are only supported by OPTIMOPTIONS. Link to options
table

2. State the following LP problem in standard form:


Maximize f = x1 − 8x2
subject to:
3x1 + 2x2 ≥ 6
9x1 + 7x2 ≤ 108
2x1 − 5x2 ≥ −35
x1, x2 unrestricted in sign
Matrix x = [x1 ; x2], and f = [1 ; -8]
Matrix A = [3 2 ; 9 7 ; 2 -5] , and b = [6 ; 108 ; -35]
>> f = [1;-8]

f=
1
-8

>> A = [3 2 ; 9 7 ; 2 -5]
A=
3 2
9 7
2 -5

>> b = [6; 108 ; -35]


b=
6
108
-35
>> b = zeros (3,1)
b=
0
0
0

>> Aeq=[];
>> beq=[];
>> options = optimset('LargeScale', 'off', 'Simplex', 'on');
Error using optimset
Unrecognized parameter name 'Simplex'. Please see the options table in
the documentation for a list of acceptable option parameters. Note that
some parameters are only supported by OPTIMOPTIONS. Link to options
table
>> [x,fval,exitflag,output] = linprog(f,A,b,Aeq,beq,lb,[],[],optimset('Display','iter'))

Unrecognized function or variable 'lb'.


)*Mohon maaf tidaK BISA di optimalkan dikarenakan keterangan dari matlab nya Error Pak.

You might also like