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
...@@ -47,3 +47,7 @@ class Entity(object): ...@@ -47,3 +47,7 @@ class Entity(object):
#outputs results to JSON File #outputs results to JSON File
def outputResultsJSON(self): def outputResultsJSON(self):
pass pass
#initializes all the Entity for a new simulation replication
def initialize(self):
pass
\ No newline at end of file
...@@ -57,6 +57,9 @@ class Job(Entity): ...@@ -57,6 +57,9 @@ class Job(Entity):
i+=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(): ...@@ -368,6 +368,8 @@ def initializeObjects():
element.initialize() element.initialize()
for repairman in G.RepairmanList: for repairman in G.RepairmanList:
repairman.initialize() repairman.initialize()
for entity in G.EntityList:
entity.initialize()
#activates all the objects #activates all the objects
def activateObjects(): 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