-
Notifications
You must be signed in to change notification settings - Fork 0
/
aufgabe_4_b.m
52 lines (41 loc) · 924 Bytes
/
aufgabe_4_b.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
% Autoren: Vladyslav Yushchenko, Jonas Molina Ramirez, Florian Beck
%%
clc;
clear;
n = 3;
eps = 0.1;
[A,b,c,B]=KleeMintyAlt(n,eps);
primalSimplex(A,b,c,B);
%
% %%
% [A,b,c,B]=KleeMintyBlock(n,eps);
% primalSimplex(A,b,c,B);
%% 4 b iii)
clc;
clear;
n = 3;
eps = 0.1;
[A,b,c,B]=KleeMintyAlt(n,eps);
[Bx,xB,message,iter] = phase1(A,b,c);
primalSimplex(A,b,c,Bx);
%% 4 c)
% Uncomment lines 70/71 to get output.
% We set those lines to comments, because the output slows down the
% computation significantly
clc;
clear;
eps = 0.4;
iterations_alt = zeros(1,15);
iterations_block = zeros(1,15);
for n = 1:15
[A,b,c,B]=KleeMintyAlt(n,eps);
[Bx,xB,message,iter]= primalSimplex(A,b,c,B);
iterations_alt(n) = iter;
[A,b,c,B]=KleeMintyBlock(n,eps);
[Bx,xB,message,iter] = primalSimplex(A,b,c,B);
iterations_block(n) = iter;
end
'Iterations alt:'
iterations_alt
'Iterations block:'
iterations_block