summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2019-12-11 10:22:42 +0100
committerDaniel Friesel <daniel.friesel@uos.de>2019-12-11 10:22:42 +0100
commit4190543b8f132ce9d7139e60dc271bfa6dbaf3ab (patch)
treed133dc2e9ef044d01dedb57abdca872c7a0773c6 /lib
parentf4af48cf398b92b17a9a718416cf18ea1d956375 (diff)
PTAAttribute.eval: Only call model function if it can handle the parameters
Diffstat (limited to 'lib')
-rwxr-xr-xlib/automata.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/automata.py b/lib/automata.py
index f1f2909..6ace61f 100755
--- a/lib/automata.py
+++ b/lib/automata.py
@@ -26,8 +26,9 @@ class PTAAttribute:
return 'PTAATtribute<{:.0f}, None>'.format(self.value)
def eval(self, param_dict=dict(), args=list()):
- if self.function:
- return self.function.eval(_dict_to_list(param_dict), args)
+ param_list = _dict_to_list(param_dict)
+ if self.function and self.function.is_predictable(param_list):
+ return self.function.eval(param_list, args)
return self.value
def to_json(self):