Commit 8792ebaf authored by Georgios Dagkakis's avatar Georgios Dagkakis Committed by Jérome Perrin

Exit updated in order to also output total units exitted (in case this is...

Exit updated in order to also output total units exitted (in case this is different from the total Entities exited). Dump updated
parent 239eff74
......@@ -49,6 +49,7 @@ class Exit(CoreObject):
#lists to hold statistics of multiple runs
self.Exits=[]
self.UnitExits=[]
self.Lifespan=[]
def initialize(self):
......@@ -127,7 +128,8 @@ class Exit(CoreObject):
if MaxSimtime==None:
MaxSimtime=G.maxSimTime
# hold the numberOfExits of each replication
self.Exits.append(self.numOfExits)
self.Exits.append(self.numOfExits)
self.UnitExits.append(self.totalNumberOfUnitsExited)
try: # throw exception in case the numOfExits is zero
self.Lifespan.append(((self.totalLifespan)/self.numOfExits)/G.Base)
except ZeroDivisionError: # the lifespan in this case is zero
......@@ -207,7 +209,9 @@ class Exit(CoreObject):
json['_class'] = 'Dream.Exit';
json['id'] = str(self.id)
json['results'] = {}
json['results']['throughput']=self.numOfExits
json['results']['throughput']=self.numOfExits
if self.totalNumberOfUnitsExited!=self.numOfExits: #output this only if there was variability in units
json['results']['unitsThroughput']=self.totalNumberOfUnitsExited
json['results']['lifespan']=self.Lifespan[0]
json['results']['takt_time']=self.TaktTime[0]
......@@ -228,7 +232,17 @@ class Exit(CoreObject):
else:
json['results']['throughput']['min']=self.Exits[0]
json['results']['throughput']['avg']=self.Exits[0]
json['results']['throughput']['max']=self.Exits[0]
json['results']['throughput']['max']=self.Exits[0]
if self.Exits!=self.UnitExits: #output this only if there was variability in units
json['results']['unitThroughput']={}
if self.checkIfArrayHasDifValues(self.Exits):
json['results']['throughput']['min']=stat.bayes_mvs(self.UnitExits, G.confidenceLevel)[0][1][0]
json['results']['throughput']['avg']=stat.bayes_mvs(self.UnitExits, G.confidenceLevel)[0][0]
json['results']['throughput']['max']=stat.bayes_mvs(self.UnitExits, G.confidenceLevel)[0][1][1]
else:
json['results']['throughput']['min']=self.UnitExits[0]
json['results']['throughput']['avg']=self.UnitExits[0]
json['results']['throughput']['max']=self.UnitExits[0]
json['results']['lifespan']={}
if self.checkIfArrayHasDifValues(self.Lifespan):
json['results']['lifespan']['min']=stat.bayes_mvs(self.Lifespan, G.confidenceLevel)[0][1][0]
......
{
"_class": "Dream.Simulation",
"elementList": [
{
"_class": "Dream.Exit",
"id": "E1",
"results": {
"lifespan": 720.687581415545,
"unitsThroughput": 46060,
"throughput": 2303,
"takt_time": 0.6252713851498046,
"throughput": 2303
"lifespan": 720.687581415545
}
},
{
"_class": "Dream.Machine",
"id": "M1",
"results": {
"working_ratio": 79.96527777777777,
"blockage_ratio": 0.0,
"failure_ratio": 0.0,
"waiting_ratio": 20.03472222222222,
"working_ratio": 79.96527777777777
"waiting_ratio": 20.03472222222222
}
},
{
"_class": "Dream.Queue",
"id": "Q1"
"id": "Q1",
"schedulingRule": "FIFO"
}
],
"_class": "Dream.Simulation",
"general": {
"_class": "Dream.Configuration"
}
......
{
"_class": "Dream.Simulation",
"elementList": [
{
"_class": "Dream.Exit",
"id": "E1",
"results": {
"lifespan": 454.0,
"unitsThroughput": 28720,
"throughput": 359,
"takt_time": 4.006963788300836,
"throughput": 359
"lifespan": 454.0
}
},
{
"_class": "Dream.Machine",
"id": "M1",
"results": {
"working_ratio": 50.06944444444444,
"blockage_ratio": 49.826388888888886,
"failure_ratio": 0.0,
"waiting_ratio": 0.10416666666666667,
"working_ratio": 50.06944444444444
"waiting_ratio": 0.10416666666666667
}
},
{
"_class": "Dream.Machine",
"id": "M2",
"results": {
"working_ratio": 99.89583333333333,
"blockage_ratio": 0.0,
"failure_ratio": 0.0,
"waiting_ratio": 0.10416666666666667,
"working_ratio": 99.89583333333333
"waiting_ratio": 0.10416666666666667
}
},
{
"_class": "Dream.Machine",
"id": "M3",
"results": {
"working_ratio": 24.930555555555557,
"blockage_ratio": 0.0,
"failure_ratio": 0.0,
"waiting_ratio": 75.06944444444444,
"working_ratio": 24.930555555555557
"waiting_ratio": 75.06944444444444
}
},
{
"_class": "Dream.Queue",
"id": "Q1"
"id": "Q1",
"schedulingRule": "FIFO"
},
{
"_class": "Dream.Queue",
"id": "Q2"
"id": "Q2",
"schedulingRule": "FIFO"
}
],
"_class": "Dream.Simulation",
"general": {
"_class": "Dream.Configuration"
}
......
{
"_class": "Dream.Simulation",
"elementList": [
{
"_class": "Dream.Exit",
"id": "E1",
"results": {
"lifespan": 454.0,
"unitsThroughput": 35900,
"throughput": 359,
"takt_time": 4.006963788300836,
"throughput": 359
"lifespan": 454.0
}
},
{
"_class": "Dream.Machine",
"id": "M1",
"results": {
"working_ratio": 50.03472222222222,
"blockage_ratio": 49.861111111111114,
"failure_ratio": 0.0,
"waiting_ratio": 0.10416666666666667,
"working_ratio": 50.03472222222222
"waiting_ratio": 0.10416666666666667
}
},
{
"_class": "Dream.Machine",
"id": "M2",
"results": {
"working_ratio": 99.89583333333333,
"blockage_ratio": 0.0,
"failure_ratio": 0.0,
"waiting_ratio": 0.10416666666666667,
"working_ratio": 99.89583333333333
"waiting_ratio": 0.10416666666666667
}
},
{
"_class": "Dream.Machine",
"id": "M3",
"results": {
"working_ratio": 24.930555555555557,
"blockage_ratio": 0.0,
"failure_ratio": 0.0,
"waiting_ratio": 75.06944444444444,
"working_ratio": 24.930555555555557
"waiting_ratio": 75.06944444444444
}
},
{
"_class": "Dream.Queue",
"id": "Q1"
"id": "Q1",
"schedulingRule": "FIFO"
},
{
"_class": "Dream.LineClearance",
"id": "Q2"
"id": "Q2",
"schedulingRule": "FIFO"
}
],
"_class": "Dream.Simulation",
"general": {
"_class": "Dream.Configuration"
}
......
{
"_class": "Dream.Simulation",
"elementList": [
{
"_class": "Dream.Queue",
"id": "DummyQ"
"id": "DummyQ",
"schedulingRule": "FIFO"
},
{
"_class": "Dream.Exit",
"id": "E1",
"results": {
"lifespan": 344.2857142857143,
"unitsThroughput": 1344,
"throughput": 14,
"takt_time": 99.78571428571429,
"throughput": 14
"lifespan": 344.2857142857143
}
},
{
"_class": "Dream.Machine",
"id": "M1",
"results": {
"working_ratio": 29.51388888888889,
"blockage_ratio": 69.79166666666667,
"failure_ratio": 0.0,
"waiting_ratio": 0.6944444444444444,
"working_ratio": 29.51388888888889
"waiting_ratio": 0.6944444444444444
}
},
{
"_class": "Dream.Machine",
"id": "M2",
"results": {
"working_ratio": 98.26388888888889,
"blockage_ratio": 0.0,
"failure_ratio": 0.0,
"waiting_ratio": 1.7361111111111112,
"working_ratio": 98.26388888888889
"waiting_ratio": 1.7361111111111112
}
},
{
"_class": "Dream.Queue",
"id": "Q1"
"id": "Q1",
"schedulingRule": "FIFO"
}
],
"_class": "Dream.Simulation",
"general": {
"_class": "Dream.Configuration"
}
......
{
"_class": "Dream.Simulation",
"elementList": [
{
"_class": "Dream.Exit",
"id": "E1",
"results": {
"lifespan": 169.45000000000002,
"unitsThroughput": 1080,
"throughput": 12,
"takt_time": 24.891666666666666,
"throughput": 12
"lifespan": 169.45000000000002
}
},
{
"_class": "Dream.Machine",
"id": "M1",
"results": {
"working_ratio": 50.43333333333334,
"blockage_ratio": 49.23333333333333,
"failure_ratio": 0.0,
"waiting_ratio": 0.3333333333333333,
"working_ratio": 50.43333333333334
"waiting_ratio": 0.3333333333333333
}
},
{
"_class": "Dream.Machine",
"id": "M2",
"results": {
"working_ratio": 91.63333333333344,
"blockage_ratio": 7.199999999999894,
"failure_ratio": 0.0,
"waiting_ratio": 1.1666666666666667,
"working_ratio": 91.63333333333344
"waiting_ratio": 1.1666666666666667
}
},
{
"_class": "Dream.Machine",
"id": "M3",
"results": {
"working_ratio": 92.43333333333334,
"blockage_ratio": 0.0,
"failure_ratio": 0.0,
"waiting_ratio": 7.566666666666664,
"working_ratio": 92.43333333333334
"waiting_ratio": 7.566666666666664
}
},
{
"_class": "Dream.Queue",
"id": "Q1"
"id": "Q1",
"schedulingRule": "FIFO"
},
{
"_class": "Dream.LineClearance",
"id": "Q2"
"id": "Q2",
"schedulingRule": "FIFO"
},
{
"_class": "Dream.Queue",
"id": "Q3"
"id": "Q3",
"schedulingRule": "FIFO"
}
],
"_class": "Dream.Simulation",
"general": {
"_class": "Dream.Configuration"
}
......
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