Commit d9cc785b authored by Georgios Dagkakis's avatar Georgios Dagkakis

queues removed from tab schedule and elements sorted based ontime

parent 4b8f4da4
......@@ -5,6 +5,7 @@ from pprint import pformat
from dream.plugins import plugin
from dream.plugins.TimeSupport import TimeSupportMixin
import datetime
from copy import copy
class JSComponentTabSchedule(plugin.OutputPreparationPlugin, TimeSupportMixin):
'''outputs the Job Schedules in tabular format'''
......@@ -115,4 +116,18 @@ class JSComponentTabSchedule(plugin.OutputPreparationPlugin, TimeSupportMixin):
self.convertToFormattedRealWorldTime(entranceTime),
processingTime,
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
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)
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