3. 3
Linear Programming
Variables
Decision variables
Structural variables
Auxiliary variables
Slack variables
Artificial variables
Coefficients
Cost coefficients
Technological coefficients
Constraint parameter or Right Hand Side value
Function
Objective or criterion function
Restriction or functional constraints
Nonnegativity constraints
4. 4
Linear Programming
Minimize f(x) = c1x1 + c2x2 + … + cnxn
Subject to
a11x1 + a12x2 + … + a1nxn ≤ b1
a21x1 + a22x2 + … + a2nxn ≤ b2
am1x1 + am2x2 + … + amnxn ≤ bm
and
x1 ≥ 0; x2 ≥ 0; … ; xn ≥ 0
Maximize or Minimize
≤ or ≥ or =
≤ 0 or ≥0 or unrestricted
5. Linear Programming
[x,fval,exitflag] = linprog(f,A,b,Aeq,beq,lb)
Di mana
f Vector koefisien fungsi tujuan (cost coefficient).
A Matrix koefisien fungsi kendala pertidaksamaan
(technological coefficient).
b Vector parameter batas fungsi kendala
pertidaksamaan(right-hand side or constraint parameter).
Aeq Matrix koefisien fungsi kendala persamaan
(technological coefficient).
beq Vector parameter batas fungsi kendala
persamaan(right-hand side or constraint parameter).
lb Vector batas bawahvariabel keputusan
ub Vector batas bawahvariabel keputusan
5
6. Linear Programming
Minimize f(x) = –5x1 – 4x2 – 6x3
Subject to :
x1 – x2 + x3 ≤ 20
3.x1 + 2.x2 + 4.x3 ≤ 42
3.x1 + 2.x2 ≤ 30
where x1 ≥ 0; x2 ≥ 0; x3 ≥ 0
Ketikkan perintah berikut di dalam command window:
f = [-5; -4; -6]; x = 0.000 x1
A = [1 -1 1; 3 2 4; 3 2 0]; 15.000 x2
b = [20; 42; 30]; 3.000 x3
lb=zeros(3,1); fval = -78.000
[x,fval,exitflag]= linprog(f,A,b,[],[],lb)
6
8. Binary Integer Programming
x = bintprog(f,A,b)
Di mana
f Vector koefisien fungsi tujuan (cost coefficient).
A Matrix koefisien fungsi kendala (technological
coefficient).
b Vector parameter batas fungsi kendala (right-
hand side or constraint parameter).
8
9. Binary Integer Programming
Minimize f(x) = –9x1 – 5x2 – 6x3 – 4x4,
Subject to :
6.x1 + 3.x2 + 5.x3 + 2.x4 ≤ 9
x3 + x4 ≤ 1
-x1 + x3 ≤ 0
-x2 + x4 ≤ 0
where x1, x2, x3, and x4 are binary integers
Ketikkan perintah berikut di dalam command window:
f = [-9; -5; -6; -4]; x = 1 x1
A = [6 3 5 2; 0 0 1 1; -1 0 1 0; 0 -1 0 1]; 1 x2
b = [9; 1; 0; 0]; 0 x3
x = bintprog(f,A,b) 0 x4
9
11. Quadratic Programming
x = quadprog(H,f,A,b)
Di mana
H Matrix bujursangkar simetris koefisien interaksi
fungsi tujuan (cost coefficient).
f Vector koefisien fungsi tujuan (cost coefficient).
A Matrix koefisien fungsi kendala (technological
coefficient).
b Vector parameter batas fungsi kendala (right-
hand side or constraint parameter).
11
12. Quadratic Programming
Minimize f(x) = 1
/2.x1
2
+ x2
2
– x1x2 – 2.x1 – 6.x2,
Subject to :
x1 + x2 ≤ 2
-x1 + 2.x2 ≤ 2
2.x1 + x2 ≤ 3
where x1 ≥ 0; x2 ≥ 0
Ketikkan perintah berikut di dalam command window:
H = [1 -1; -1 2];
f = [-2; -6]; x = 0.6667 x1
A = [1 1; -1 2; 2 1]; 1.3333 x2
b = [2; 2; 3];
x = quadprog(H, f, A, b)
12
13. Goal Programming
Multiobjective goal attainment
A weighting vector to control the relative
underattainment or overattainment of the objectives in
fgoalattain.
When the values of goal are all nonzero, to ensure the
same percentage of under- or overattainment of the
active objectives, set the weighting function to
abs(goal).
The active objectives are the set of objectives that are
barriers to further improvement of the goals at the
solution.
13
14. Goal Programming
x = fgoalattain(fun,x0,goal,weight,A,b)
Di mana
fun function dengan vector x menghasilkan vector F,
dengan objective functions dievaluasi pada vector x
x0 Vector initial x.
goal Vector koefisien fungsi tujuan (cost coefficient)
weight Vector pembobotan dari underattainment atau
overattainment dari tujuan
A Matrix koefisien fungsi kendala (technological coefficient).
b Vector parameter batas fungsi kendala (right-hand side or
constraint parameter).
14
15. Minimax Programming
minimizes the worst-case (largest) value
of a set of multivariable functions,
starting at an initial estimate.
15
16. Minimax Programming
x = fminimax(fun,x0,A,b)
Di mana
fun function dengan vector x menghasilkan vector F,
dengan objective functions dievaluasi pada vector x
x0 Vector initial x.
A Matrix koefisien fungsi kendala (technological coefficient).
b Vector parameter batas fungsi kendala (right-hand side or
constraint parameter).
16