summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2019-12-12 08:18:27 +0100
committerDaniel Friesel <daniel.friesel@uos.de>2019-12-12 08:18:27 +0100
commit575a33b819d29ee99fa7d4264a943043d1d64032 (patch)
treefeb2d5ee1c7c1f3d6bf86d3a04b9265b5d73f974 /lib
parent7c9149430a5830ce5a2daedad76ae16e4c9c2ec9 (diff)
PTA.simulate: orig_state may also be a State
Diffstat (limited to 'lib')
-rwxr-xr-xlib/automata.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/automata.py b/lib/automata.py
index 5a420fe..39ac5df 100755
--- a/lib/automata.py
+++ b/lib/automata.py
@@ -956,7 +956,10 @@ class PTA:
total_duration_mae = 0.
total_energy = 0.
total_energy_error = 0.
- state = self.state[orig_state]
+ if type(orig_state) is State:
+ state = orig_state
+ else:
+ state = self.state[orig_state]
param_dict = dict([[self.parameters[i], self.initial_param_values[i]] for i in range(len(self.parameters))])
for function in trace:
if isinstance(function[0], Transition):