Commit 48828936 authored by Georgios Dagkakis's avatar Georgios Dagkakis

objects to output whole lists in replications

parent b01883d0
......@@ -433,11 +433,6 @@ 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)
......
......@@ -341,16 +341,6 @@ 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)
......
......@@ -496,12 +496,6 @@ 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)
......
......@@ -370,11 +370,6 @@ 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)
......
......@@ -221,21 +221,6 @@ 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)
......
......@@ -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,13 +324,6 @@ 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)
......
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