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

try statement added to save from bugs

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