Commit 48828936 authored by Georgios Dagkakis's avatar Georgios Dagkakis

objects to output whole lists in replications

parent b01883d0
......@@ -433,13 +433,8 @@ class Assembly(CoreObject):
json = {'_class': self.class_name,
'id': self.id,
'results': {}}
if(G.numberOfReplications==1):
json['results']['working_ratio']=100*self.totalWorkingTime/G.maxSimTime
json['results']['blockage_ratio']=100*self.totalBlockageTime/G.maxSimTime
json['results']['waiting_ratio']=100*self.totalWaitingTime/G.maxSimTime
else:
json['results']['working_ratio'] = getConfidenceIntervals(self.Working)
json['results']['blockage_ratio'] = getConfidenceIntervals(self.Blockage)
json['results']['waiting_ratio'] = getConfidenceIntervals(self.Waiting)
json['results']['working_ratio'] = getConfidenceIntervals(self.Working)
json['results']['blockage_ratio'] = getConfidenceIntervals(self.Blockage)
json['results']['waiting_ratio'] = getConfidenceIntervals(self.Waiting)
G.outputJSON['elementList'].append(json)
......@@ -341,21 +341,11 @@ class BatchReassembly(CoreObject):
'id': self.id,
'family': self.family,
'results': {}}
if (G.numberOfReplications == 1):
# if we had just one replication output the results as numbers
json['results']['failure_ratio']=100*self.totalFailureTime/G.maxSimTime
json['results']['working_ratio']=100*self.totalWorkingTime/G.maxSimTime
json['results']['blockage_ratio']=100*self.totalBlockageTime/G.maxSimTime
json['results']['waiting_ratio']=100*self.totalWaitingTime/G.maxSimTime
#output the off-shift time only if there is any
if self.totalOffShiftTime:
json['results']['off_shift_ratio']=100*self.totalOffShiftTime/G.maxSimTime
else:
json['results']['failure_ratio'] = getConfidenceIntervals(self.Failure)
json['results']['working_ratio'] = getConfidenceIntervals(self.Working)
json['results']['blockage_ratio'] = getConfidenceIntervals(self.Blockage)
json['results']['waiting_ratio'] = getConfidenceIntervals(self.Waiting)
json['results']['off_shift_ratio'] = getConfidenceIntervals(self.OffShift)
json['results']['failure_ratio'] = getConfidenceIntervals(self.Failure)
json['results']['working_ratio'] = getConfidenceIntervals(self.Working)
json['results']['blockage_ratio'] = getConfidenceIntervals(self.Blockage)
json['results']['waiting_ratio'] = getConfidenceIntervals(self.Waiting)
json['results']['off_shift_ratio'] = getConfidenceIntervals(self.OffShift)
G.outputJSON['elementList'].append(json)
......@@ -496,15 +496,9 @@ class Conveyer(CoreObject):
json = {'_class': self.class_name,
'id': self.id,
'results': {}}
if (G.numberOfReplications == 1):
# if we had just one replication output the results as numbers
json['results']['working_ratio']=100*self.totalWorkingTime/G.maxSimTime
json['results']['blockage_ratio']=100*self.totalBlockageTime/G.maxSimTime
json['results']['waiting_ratio']=100*self.totalWaitingTime/G.maxSimTime
else:
json['results']['working_ratio'] = getConfidenceIntervals(self.Working)
json['results']['blockage_ratio'] = getConfidenceIntervals(self.Blockage)
json['results']['waiting_ratio'] = getConfidenceIntervals(self.Waiting)
json['results']['working_ratio'] = getConfidenceIntervals(self.Working)
json['results']['blockage_ratio'] = getConfidenceIntervals(self.Blockage)
json['results']['waiting_ratio'] = getConfidenceIntervals(self.Waiting)
G.outputJSON['elementList'].append(json)
......
......@@ -370,12 +370,7 @@ class Dismantle(CoreObject):
json = {'_class': self.class_name,
'id': self.id,
'results': {}}
if(G.numberOfReplications==1):
json['results']['working_ratio']=100*self.totalWorkingTime/G.maxSimTime
json['results']['blockage_ratio']=100*self.totalBlockageTime/G.maxSimTime
json['results']['waiting_ratio']=100*self.totalWaitingTime/G.maxSimTime
else:
json['results']['working_ratio'] = getConfidenceIntervals(self.Working)
json['results']['blockage_ratio'] = getConfidenceIntervals(self.Blockage)
json['results']['waiting_ratio'] = getConfidenceIntervals(self.Waiting)
json['results']['working_ratio'] = getConfidenceIntervals(self.Working)
json['results']['blockage_ratio'] = getConfidenceIntervals(self.Blockage)
json['results']['waiting_ratio'] = getConfidenceIntervals(self.Waiting)
G.outputJSON['elementList'].append(json)
......@@ -221,25 +221,10 @@ class Exit(CoreObject):
'id': self.id,
'family': self.family,
'results': {} }
if(G.numberOfReplications==1):
json['results']['throughput']=self.numOfExits
if self.totalNumberOfUnitsExited!=self.numOfExits: #output this only if there was variability in units
json['results']['unitsThroughput']=self.totalNumberOfUnitsExited
if len(self.intervalThroughPutList): #output this only if there is an interval throughput
#TODO - check how to output in stochastic cases
json['results']['intervalThroughputList']=self.intervalThroughPutList
json['results']['lifespan']=self.Lifespan[0]
json['results']['takt_time']=self.TaktTime[0]
else:
# json['results']['throughput'] =self.Exits
# json['results']['lifespan'] = self.Lifespan
# json['results']['takt_time'] = self.TaktTime
# if self.Exits!=self.UnitExits: #output this only if there was variability in units
# json['results']['unitsThroughput'] = self.UnitExits
json['results']['throughput'] = getConfidenceIntervals(self.Exits)
json['results']['lifespan'] = getConfidenceIntervals(self.Lifespan)
json['results']['takt_time'] = getConfidenceIntervals(self.TaktTime)
if self.Exits!=self.UnitExits: #output this only if there was variability in units
json['results']['unitsThroughput'] = getConfidenceIntervals(self.UnitExits)
json['results']['throughput'] = getConfidenceIntervals(self.Exits)
json['results']['lifespan'] = getConfidenceIntervals(self.Lifespan)
json['results']['takt_time'] = getConfidenceIntervals(self.TaktTime)
if self.Exits!=self.UnitExits: #output this only if there was variability in units
json['results']['unitsThroughput'] = getConfidenceIntervals(self.UnitExits)
G.outputJSON['elementList'].append(json)
......@@ -1239,27 +1239,13 @@ class Machine(CoreObject):
'id': self.id,
'family': self.family,
'results': {}}
if (G.numberOfReplications == 1):
# if we had just one replication output the results as numbers
json['results']['failure_ratio']=100*self.totalFailureTime/G.maxSimTime
json['results']['working_ratio']=100*self.totalWorkingTime/G.maxSimTime
json['results']['blockage_ratio']=100*self.totalBlockageTime/G.maxSimTime
json['results']['waiting_ratio']=100*self.totalWaitingTime/G.maxSimTime
#output the off-shift time only if there is any
if self.totalOffShiftTime:
json['results']['off_shift_ratio']=100*self.totalOffShiftTime/G.maxSimTime
if any(type=='Setup' for type in self.multOperationTypeList):
json['results']['setup_ratio']=100*self.totalSetupTime/G.maxSimTime
if any(type=='Load' for type in self.multOperationTypeList):
json['results']['load_ratio']=100*self.totalLoadTime/G.maxSimTime
else:
json['results']['failure_ratio'] = getConfidenceIntervals(self.Failure)
json['results']['working_ratio'] = getConfidenceIntervals(self.Working)
json['results']['blockage_ratio'] = getConfidenceIntervals(self.Blockage)
json['results']['waiting_ratio'] = getConfidenceIntervals(self.Waiting)
json['results']['off_shift_ratio'] = getConfidenceIntervals(self.OffShift)
json['results']['setup_ratio'] = getConfidenceIntervals(self.SettingUp)
json['results']['loading_ratio'] = getConfidenceIntervals(self.Loading)
json['results']['failure_ratio'] = self.Failure
json['results']['working_ratio'] = self.Working
json['results']['blockage_ratio'] = self.Blockage
json['results']['waiting_ratio'] = self.Waiting
json['results']['off_shift_ratio'] = self.OffShift
json['results']['setup_ratio'] = self.SettingUp
json['results']['loading_ratio'] = self.Loading
G.outputJSON['elementList'].append(json)
......@@ -324,16 +324,9 @@ class Operator(ObjectResource):
'id': self.id,
'family': self.family,
'results': {}}
if(G.numberOfReplications==1):
json['results']['working_ratio']=100*self.totalWorkingTime/G.maxSimTime
json['results']['waiting_ratio']=100*self.totalWaitingTime/G.maxSimTime
#output the off-shift time only if there is any
if self.totalOffShiftTime:
json['results']['off_shift_ratio']=100*self.totalOffShiftTime/G.maxSimTime
else:
json['results']['working_ratio'] = getConfidenceIntervals(self.Working)
json['results']['waiting_ratio'] = getConfidenceIntervals(self.Waiting)
json['results']['off_shift_ratio'] = getConfidenceIntervals(self.OffShift)
json['results']['working_ratio'] = getConfidenceIntervals(self.Working)
json['results']['waiting_ratio'] = getConfidenceIntervals(self.Waiting)
json['results']['off_shift_ratio'] = getConfidenceIntervals(self.OffShift)
if self.ouputSchedule:
if self.schedule:
json['results']['schedule']=[]
......
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