summaryrefslogtreecommitdiff
path: root/lib/automata.py
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-02-18 15:00:22 +0100
committerDaniel Friesel <derf@finalrewind.org>2019-02-18 15:00:22 +0100
commit07a587d243147ee855fe0448ec0c6f69f04d7d05 (patch)
treea0f575584bd696f540be324914444b7bbede6d9e /lib/automata.py
parentd5ec05c3d05b560de331237a7d227965d5c398b1 (diff)
automata: Fix dfs
Diffstat (limited to 'lib/automata.py')
-rwxr-xr-xlib/automata.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/automata.py b/lib/automata.py
index a947a61..3386761 100755
--- a/lib/automata.py
+++ b/lib/automata.py
@@ -30,8 +30,8 @@ class Transition:
arguments = [], param_update_function = None,
arg_to_param_map = None, set_param = None):
self.name = name
- self.origin = orig_state.name
- self.destination = dest_state.name
+ self.origin = orig_state
+ self.destination = dest_state
self.energy = energy
self.energy_function = energy_function
self.duration = duration
@@ -74,8 +74,8 @@ class Transition:
def to_json(self):
ret = {
'name' : self.name,
- 'origin' : self.origin,
- 'destination' : self.destination,
+ 'origin' : self.origin.name,
+ 'destination' : self.destination.name,
'is_interrupt' : self.is_interrupt,
'arguments' : self.arguments,
'arg_to_param_map' : self.arg_to_param_map,