Commit af83a2f2 authored by Georgios Dagkakis's avatar Georgios Dagkakis

normalize the last assignment time for the machine based to the last time that...

normalize the last assignment time for the machine based to the last time that there was an assignment
parent a511229e
......@@ -144,12 +144,24 @@ class SkilledRouter(Router):
# # stations of the line and their corresponding WIP
# TODO: the WIP of the stations must be normalised to the max WIP possible on that station
#===================================================================
# identify the last time that there was an assignment
maxLastAssignment=0
for record in self.solutionList:
if record:
maxLastAssignment=record["time"]
self.availableStationsDict={}
for station in self.availableStations:
lastAssignmentTime=0
for record in self.solutionList:
if station.id in record["allocation"].values():
lastAssignmentTime=record["time"]
# normalise the lastAssignmentTime based on the maxLastAssignment.
if maxLastAssignment:
lastAssignmentTime=1.0-float(lastAssignmentTime/float(maxLastAssignment))
# it there is definition of 'technology' to group machines add this
if station.technology:
self.availableStationsDict[str(station.id)]={'stationID':station.technology,'machineID':station.id,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment