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

main script updated to read new JSON notation (elementList and definition of...

main script updated to read new JSON notation (elementList and definition of successorList in Repairman). Only tested in Topology01 for now
parent c2b64c63
......@@ -341,7 +341,7 @@ class Assembly(Process):
json['results']['waiting_ratio']['avg']=self.Waiting[0]
json['results']['waiting_ratio']['max']=self.Waiting[0]
G.outputJSON['coreObject'].append(json)
G.outputJSON['elementList'].append(json)
......
......@@ -382,7 +382,7 @@ class Conveyer(Process):
json['results']['waiting_ratio']['min']=self.Waiting[0]
json['results']['waiting_ratio']['avg']=self.Waiting[0]
json['results']['waiting_ratio']['max']=self.Waiting[0]
G.outputJSON['coreObject'].append(json)
G.outputJSON['elementList'].append(json)
#takes the array and checks if all its values are identical (returns false) or not (returns true)
#needed because if somebody runs multiple runs in deterministic case it would crash!
......
......@@ -339,7 +339,7 @@ class Dismantle(Process):
json['results']['waiting_ratio']['avg']=self.Waiting[0]
json['results']['waiting_ratio']['max']=self.Waiting[0]
G.outputJSON['coreObject'].append(json)
G.outputJSON['elementList'].append(json)
#takes the array and checks if all its values are identical (returns false) or not (returns true)
#needed because if somebody runs multiple runs in deterministic case it would crash!
......
......@@ -249,7 +249,7 @@ class Exit(Process):
json['results']['taktTime']['min']=self.TaktTime[0]
json['results']['taktTime']['avg']=self.TaktTime[0]
json['results']['taktTime']['max']=self.TaktTime[0]
G.outputJSON['coreObject'].append(json)
G.outputJSON['elementList'].append(json)
#takes the array and checks if all its values are identical (returns false) or not (returns true)
#needed because if somebody runs multiple runs in deterministic case it would crash!
......
......@@ -6,14 +6,13 @@
"trace": "No",
"confidenceLevel": "0.95"
},
"modelResource": [
{"_class": "Dream.Repairman",
"elementList": [
{"_class": "Dream.Repairman",
"id": "W1",
"name": "W1",
"capacity": "1"
}
],
"coreObject": [
"name": "W1",
"capacity": "1",
"successorList": ["M1", "M2"]
},
{"_class": "Dream.Source",
"id": "S1",
"name": "Raw Material",
......@@ -35,8 +34,7 @@
"failures":{
"failureDistribution": "Fixed",
"MTTF": "60",
"MTTR": "5",
"repairman": "W1"
"MTTR": "5"
},
"successorList": ["Q1"]
},
......@@ -50,8 +48,7 @@
"failures":{
"failureDistribution": "Fixed",
"MTTF": "40",
"MTTR": "10",
"repairman": "W1"
"MTTR": "10"
},
"successorList": ["E1"]
},
......
This diff is collapsed.
......@@ -496,7 +496,7 @@ class Machine(Process):
json['results']['waiting_ratio']['avg']=self.Waiting[0]
json['results']['waiting_ratio']['max']=self.Waiting[0]
G.outputJSON['coreObject'].append(json)
G.outputJSON['elementList'].append(json)
#takes the array and checks if all its values are identical (returns false) or not (returns true)
......
......@@ -42,7 +42,9 @@ class Repairman(object):
#lists to hold statistics of multiple runs
self.Waiting=[]
self.Working=[]
self.coreObjectIds=[] #list with the coreObjects that the repairman repairs
def initialize(self):
self.totalWorkingTime=0 #holds the total working time
self.totalWaitingTime=0 #holds the total waiting time
......@@ -140,7 +142,7 @@ class Repairman(object):
json['results']['waiting_ratio']['avg']=self.Waiting[0]
json['results']['waiting_ratio']['max']=self.Waiting[0]
G.outputJSON['coreObject'].append(json)
G.outputJSON['elementList'].append(json)
#takes the array and checks if all its values are identical (returns false) or not (returns true)
#needed because if somebody runs multiple runs in deterministic case it would crash!
......
{"elementList": [{"_class": "Dream.Machine", "id": "M1", "results": {"working_ratio": 12.760416666666666, "blockage_ratio": 78.17708333333333, "failure_ratio": 9.027777777777779, "waiting_ratio": 0.034722222222222224}}, {"_class": "Dream.Machine", "id": "M2", "results": {"working_ratio": 76.31944444444444, "blockage_ratio": 0.0, "failure_ratio": 19.791666666666668, "waiting_ratio": 3.888888888888889}}, {"_class": "Dream.Exit", "id": "E1", "results": {"throughput": 732, "takt_time": 1.965846994535519, "lifespan": 7.646516393442623}}, {"_class": "Dream.Repairman", "id": "W1", "results": {"working_ratio": 26.73611111111111, "waiting_ratio": 73.26388888888889}}], "_class": "Dream.Simulation", "general": {"totalExecutionTime": 0.2929999828338623, "_class": "Dream.Configuration"}}
\ No newline at end of file
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