Commit 5d2d4dbe authored by Georgios Dagkakis's avatar Georgios Dagkakis

try statement added to save from bugs

parent d9cc785b
...@@ -116,18 +116,22 @@ class JSComponentTabSchedule(plugin.OutputPreparationPlugin, TimeSupportMixin): ...@@ -116,18 +116,22 @@ class JSComponentTabSchedule(plugin.OutputPreparationPlugin, TimeSupportMixin):
self.convertToFormattedRealWorldTime(entranceTime), self.convertToFormattedRealWorldTime(entranceTime),
processingTime, processingTime,
operatorId]) operatorId])
# remove all the elements that have to do with buffers
tabElements=copy(result[self.configuration_dict['output_id']])
tabElements.pop(0)
for row in tabElements:
stationId=row[4]
stationClass=data['graph']['node'][stationId]['_class']
if stationClass in ['Dream.MouldAssemblyBuffer','Dream.ConditionalBuffer']:
result[self.configuration_dict['output_id']].remove(row)
# sort the elements according to Entrance Time try:
firstRow=result[self.configuration_dict['output_id']].pop(0) # remove all the elements that have to do with buffers
result[self.configuration_dict['output_id']].sort(key=lambda x: x[5]) tabElements=copy(result[self.configuration_dict['output_id']])
result[self.configuration_dict['output_id']].insert(0,firstRow) tabElements.pop(0)
for row in tabElements:
stationId=row[4]
stationClass=data['graph']['node'][stationId]['_class']
if stationClass in ['Dream.MouldAssemblyBuffer','Dream.ConditionalBuffer','Dream.OrderDecomposition']:
result[self.configuration_dict['output_id']].remove(row)
# sort the elements according to Entrance Time
firstRow=result[self.configuration_dict['output_id']].pop(0)
result[self.configuration_dict['output_id']].sort(key=lambda x: x[5])
result[self.configuration_dict['output_id']].insert(0,firstRow)
except:
pass
return data return data
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