Commit 6b4274fd authored by Georgios Dagkakis's avatar Georgios Dagkakis Committed by Sebastien Robin

Ann initialise method was added to Entities. Jobs need to be initialized in...

Ann initialise method was added to Entities. Jobs need to be initialized in every simulation replication in multiple runs. Now it works, but JSON results are not given for the route in multiple runs. This may require some thinking
parent b2f8d250
......@@ -46,4 +46,8 @@ class Entity(object):
#outputs results to JSON File
def outputResultsJSON(self):
pass
#initializes all the Entity for a new simulation replication
def initialize(self):
pass
\ No newline at end of file
......@@ -55,8 +55,11 @@ class Job(Entity):
json['results']['schedule'][str(i)]['stationId']=record[0]
json['results']['schedule'][str(i)]['entranceTime']=record[1]
i+=1
G.outputJSON['elementList'].append(json)
G.outputJSON['elementList'].append(json)
#initializes all the Entity for a new simulation replication
def initialize(self):
self.remainingRoute=self.fullRoute
self.currentStop=self.fullRoute[0][0]
\ No newline at end of file
......@@ -368,6 +368,8 @@ def initializeObjects():
element.initialize()
for repairman in G.RepairmanList:
repairman.initialize()
for entity in G.EntityList:
entity.initialize()
#activates all the objects
def activateObjects():
......
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