diff --git a/powl/__init__.py b/powl/__init__.py index f55d88a..522199f 100644 --- a/powl/__init__.py +++ b/powl/__init__.py @@ -15,4 +15,4 @@ ) __name__ = "powl" -__version__ = "2.3.2" +__version__ = "2.3.3" diff --git a/powl/objects/tagged_powl/to_legacy.py b/powl/objects/tagged_powl/to_legacy.py index 9ea8c86..15aa60a 100644 --- a/powl/objects/tagged_powl/to_legacy.py +++ b/powl/objects/tagged_powl/to_legacy.py @@ -2,7 +2,7 @@ from powl.objects.BinaryRelation import BinaryRelation from powl.objects.obj import POWL, SilentTransition, Transition, StrictPartialOrder, DecisionGraph, OperatorPOWL, \ - Operator, FrequentTransition + Operator from powl.objects.tagged_powl.activity import Activity from powl.objects.tagged_powl.base import TaggedPOWL from powl.objects.tagged_powl.choice_graph import ChoiceGraph @@ -21,14 +21,6 @@ def convert_tagged_powl_to_legacy_model(model: TaggedPOWL) -> POWL: def rec(n: TaggedPOWL): - if isinstance(n, Activity): - if n.is_silent(): - return SilentTransition() - if n.is_repeatable() or n.is_skippable(): - max_f = '-' if n.is_repeatable() else 1 - return FrequentTransition(label=n.label, min_freq=n.min_freq, max_freq=max_f) - return Transition(n.label) - if n.is_repeatable(): if n.is_skippable(): body = rec(_strip_freq(n)) @@ -46,6 +38,11 @@ def rec(n: TaggedPOWL): ) return xor + if isinstance(n, Activity): + if n.is_silent(): + return SilentTransition() + return Transition(n.label) + if isinstance(n, PartialOrder): new_nodes = list(n.get_nodes()) old_nodes = [rec(x) for x in new_nodes]