|
|
@@ -1,7 +1,7 @@
|
|
|
"""
|
|
|
Generated by Statechart compiler by Glenn De Jonghe, Joeri Exelmans, Simon Van Mierlo, and Yentl Van Tendeloo (for the inspiration)
|
|
|
|
|
|
-Date: Tue Oct 11 17:14:32 2016
|
|
|
+Date: Wed Oct 12 12:49:32 2016
|
|
|
|
|
|
Model author: Sadaf Mustafiz and Claudio Gomes and Simon Van Mierlo
|
|
|
Model name: CBDSimulator
|
|
|
@@ -425,6 +425,7 @@ class CBDSimulator(RuntimeClassBase):
|
|
|
|
|
|
# transition /Main/SimulationFlow/Waiting
|
|
|
_Main_SimulationFlow_Waiting_0 = Transition(self, self.states["/Main/SimulationFlow/Waiting"], [self.states["/Main/SimulationFlow/CheckTerminationCondition"]])
|
|
|
+ _Main_SimulationFlow_Waiting_0.setAction(self._Main_SimulationFlow_Waiting_0_exec)
|
|
|
_Main_SimulationFlow_Waiting_0.setTrigger(Event("_5after"))
|
|
|
self.states["/Main/SimulationFlow/Waiting"].addTransition(_Main_SimulationFlow_Waiting_0)
|
|
|
_Main_SimulationFlow_Waiting_1 = Transition(self, self.states["/Main/SimulationFlow/Waiting"], [self.states["/Main/SimulationFlow/CreateDependencyGraph"]])
|
|
|
@@ -591,8 +592,6 @@ class CBDSimulator(RuntimeClassBase):
|
|
|
|
|
|
def _Main_SimulationFlow_Waiting_exit(self):
|
|
|
self.removeTimer(5)
|
|
|
- diff = accurate_time.time() - self.realtime_start_time
|
|
|
- self.clock = diff * self.realtime_scale
|
|
|
|
|
|
def _Main_SimulationFlow_CreateDependencyGraph_enter(self):
|
|
|
self.depGraph = self.cbdController.createDepGraph(self.iteration)
|
|
|
@@ -642,6 +641,10 @@ class CBDSimulator(RuntimeClassBase):
|
|
|
def _Main_SimulationFlow_CheckTerminationCondition_2_guard(self, parameters):
|
|
|
return self.inState(["/Main/SimulationState/Stopped"])
|
|
|
|
|
|
+ def _Main_SimulationFlow_Waiting_0_exec(self, parameters):
|
|
|
+ diff = accurate_time.time() - self.realtime_start_time
|
|
|
+ self.clock = diff * self.realtime_scale
|
|
|
+
|
|
|
def _Main_SimulationFlow_Waiting_1_guard(self, parameters):
|
|
|
return self.waitTime() / 1000.0 <= self.sccd_yield()
|
|
|
|