-
Notifications
You must be signed in to change notification settings - Fork 0
/
EvaluateUPSOtoJSSP.m
42 lines (31 loc) · 1.46 KB
/
EvaluateUPSOtoJSSP.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
%% Code for assessing fitness of UPSO values as a JSSP instance
% UPSO works with a column array. The first n elements are processing time
% values, while the next n values are machine orderings
function performanceData = EvaluateUPSOtoJSSP(UPSOArray, nbJobs, heurID, varargin)
toPlot = false;
if nargin == 4, toPlot = varargin{1}; end
JSSPInstanceData = UPSOtoJSSP(UPSOArray, nbJobs); % Translate
JSSPInstanceData2 = UPSOtoJSSP(UPSOArray, nbJobs); % Temp... just for testing
% Solve
% performanceJAO = JSSPHeurJAOFull(JSSPInstanceData);
% performanceJDO = JSSPHeurJDOFull(JSSPInstanceData2);
% performanceLPT = JSSPSolveInstance(JSSPInstanceData,1);
% performanceSPT = JSSPSolveInstance(JSSPInstanceData2,2);
performanceHeur1 = JSSPSolveInstance(JSSPInstanceData2,heurID(1));
performanceHeur2 = JSSPSolveInstance(JSSPInstanceData,heurID(2));
% Evaluate performance
% IMPORTANT: THIS FUNCTION REQUIRES THE ADDITION OF THE DELTA LEVEL TO
% GENERATE INSTANCES WITH SPECIFIC LEVELS OF DIFFICULTY
% performanceData = performanceJAO - performanceJDO; % Favors JAO
% performanceData = performanceJDO - performanceJAO; % Favors JDO
% performanceData = performanceSPT - performanceLPT;
%performanceData = performanceLPT - performanceSPT;
% performanceData = performanceSPT - performanceLPT;
% performanceData = performanceLPT - performanceSPT;
performanceData = performanceHeur1 - performanceHeur2;
% Plot if requested
if toPlot
JSSPInstanceData.plot
JSSPInstanceData2.plot
end
end