diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2019-12-11 10:22:42 +0100 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2019-12-11 10:22:42 +0100 |
commit | 4190543b8f132ce9d7139e60dc271bfa6dbaf3ab (patch) | |
tree | d133dc2e9ef044d01dedb57abdca872c7a0773c6 | |
parent | f4af48cf398b92b17a9a718416cf18ea1d956375 (diff) |
PTAAttribute.eval: Only call model function if it can handle the parameters
-rwxr-xr-x | lib/automata.py | 5 |
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): |