Browse Source

Attempt at optimizing rule create_transitions

Yentl Van Tendeloo 8 years ago
parent
commit
a0f5a8f0de
1 changed files with 12 additions and 0 deletions
  1. 12 0
      models/control_to_EPN.mvc

+ 12 - 0
models/control_to_EPN.mvc

@@ -294,6 +294,10 @@ All_RAM Control2EPN {
                 }
                 Pre_Encapsulated_PetriNet/Port pre_ct_9 {
                     label = "9"
+                    constraint_name = $
+                        Boolean function constraint(value : String):
+                            return bool_or(bool_or(value == "up", value == "neutral"), value == "down")!
+                        $
                 }
                 Pre_Encapsulated_PetriNet/PortPlace (pre_ct_9, pre_ct_7) {
                     label = "8"
@@ -304,6 +308,10 @@ All_RAM Control2EPN {
                 }
                 Pre_Encapsulated_PetriNet/Port pre_ct_12 {
                     label = "12"
+                    constraint_name = $
+                        Boolean function constraint(value : String):
+                            return bool_or(bool_or(value == "up", value == "neutral"), value == "down")!
+                        $
                 }
                 Pre_Encapsulated_PetriNet/PortPlace (pre_ct_12, pre_ct_10) {
                     label = "11"
@@ -314,6 +322,10 @@ All_RAM Control2EPN {
                 }
                 Pre_Encapsulated_PetriNet/Port pre_ct_15 {
                     label = "15"
+                    constraint_name = $
+                        Boolean function constraint(value : String):
+                            return bool_or(bool_or(value == "cmdUp", value == "cmdNeutral"), value == "cmdDown")!
+                        $
                 }
                 Pre_Encapsulated_PetriNet/PortPlace (pre_ct_15, pre_ct_13) {
                     label = "14"