diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2019-12-12 08:18:27 +0100 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2019-12-12 08:18:27 +0100 |
commit | 575a33b819d29ee99fa7d4264a943043d1d64032 (patch) | |
tree | feb2d5ee1c7c1f3d6bf86d3a04b9265b5d73f974 | |
parent | 7c9149430a5830ce5a2daedad76ae16e4c9c2ec9 (diff) |
PTA.simulate: orig_state may also be a State
-rwxr-xr-x | lib/automata.py | 5 |
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): |