Skip to content

Commit

Permalink
fixed errors and added performanceData support
Browse files Browse the repository at this point in the history
  • Loading branch information
iamaya2 committed Jan 16, 2021
1 parent 735ce52 commit 863d7dd
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CalculateFeature.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function [featureValue]= CalculateFeature(Instance, featID)
if featID==1
featureValue=Mirsh175(Instance);
featureValue=Mirsh222(Instance);
elseif featID==2
featureValue=Mirsh15(Instance);
elseif featID==3
Expand Down
3 changes: 2 additions & 1 deletion JSSPInstance.m
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
for i=1:size(instanceData(:,:,1))
instance.jobRegister(i)=0;
end
instance.gettingFeatures(true); % Defines initial feature values
end
end

Expand Down Expand Up @@ -110,7 +111,7 @@
end
end

obj.features=features
obj.features = features;
end

% ----- ---------------------------------------------------- -----
Expand Down
7 changes: 7 additions & 0 deletions JSSPMachine.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@
% Empty on purpose
end

function newMachine = clone(obj)
% clone Method for cloning a machine
newMachine = JSSPMachine();
newMachine.activities = obj.activities;
newMachine.jobList = obj.jobList;
end

function ranges = get.emptyRangeInMachine(obj)
% get.emptyRangeInMachine Returns matrix with empty slots
% within the machine
Expand Down
9 changes: 9 additions & 0 deletions JSSPSchedule.m
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@
% ----- ---------------------------------------------------- -----
% General methods
% ----- ---------------------------------------------------- -----
function newSchedule = clone(obj)
% clone Method for cloning the object so they are independent
newSchedule = JSSPSchedule(obj.nbMachines, obj.nbMaxJobs);
for idx = 1 : newSchedule.nbMachines
newSchedule.schedule(idx,1) = obj.schedule(idx,1).clone(); % Empty column of actitivities
end
newSchedule.schColorMap = obj.schColorMap;
end

%function timeIndex = getTimeslot(obj, machineID, activityLength)
function timeIndex = getTimeslot(obj, targetJob)
% getTimeslot Seeks a valid time for slotting the job with the given ID
Expand Down
File renamed without changes.

0 comments on commit 863d7dd

Please sign in to comment.