-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProjectInterface.m
More file actions
47 lines (43 loc) · 1.31 KB
/
Copy pathProjectInterface.m
File metadata and controls
47 lines (43 loc) · 1.31 KB
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
%%
clear all;
clc;
Algorithm = input('Enter SA for Simulated-Annealing & CE for Cross-Entropy & Mix for mixed:\n','s');
if (~strcmp(Algorithm,'SA') && ~strcmp(Algorithm,'CE') && ~strcmp(Algorithm,'Mix'))
fprintf('Wrong input!\n');
return;
end
TypeOfTest = input('Enter Default for example or New for your own parameters\n','s');
% disp(['You entered: ' Algorithm ]);
if strcmp(TypeOfTest,'New')
NumberOfPeople = input('Enter group size:\n');
if (NumberOfPeople <= 0)
fprintf('Wrong input!\n');
return;
end
Team.graph = zeros(NumberOfPeople);
Team.gender = [];
for i=1:NumberOfPeople
Team.gender = [Team.gender input(['Enter gender, M or F, for ' num2str(i) ' please:\n'], 's')];
if (Team.gender(i) ~= 'M' && Team.gender(i) ~= 'F' )
fprintf('Wrong input!\n');
return;
end
end
for i=1:NumberOfPeople
for j=i+1:NumberOfPeople
Input = input(['Enter suitability for ' num2str(i) ',' num2str(j) ' please:\n']);
Team.graph (i,j) = Input;
Team.graph (j,i) = Input;
end
end
else
Team = SimulateTeam();
end
switch Algorithm
case 'SA'
ProjectSA.ProjectSA(Team);
case 'CE'
ProjectCE.ProjectCE(Team);
case 'Mix'
ProjectMixed.ProjectMixed(Team);
end