Browse Source

Updated outline and labels in control_to_EPN

Yentl Van Tendeloo 8 years ago
parent
commit
553e2e068e
1 changed files with 30 additions and 16 deletions
  1. 30 16
      models/control_to_EPN.mvc

+ 30 - 16
models/control_to_EPN.mvc

@@ -380,7 +380,7 @@ All_RAM Control2EPN {
             }
         }
 
-        {Contains} ForAll check_object_present {
+        {Contains} ForAll check_object {
             LHS {
                 Pre_Control_PW/State pre_cop_s1 {
                     label = "0"
@@ -413,10 +413,10 @@ All_RAM Control2EPN {
                     label = "6"
                 }
                 Pre_Encapsulated_PetriNet/Place pre_cop_ps1 {
-                    label = "7"
+                    label = "8"
                 }
                 Pre_Encapsulated_PetriNet/Port pre_pp1 {
-                    label = "9"
+                    label = "11"
                     constraint_name = $
                         Boolean constraint(host_model : Element, name : String):
                             String t
@@ -428,16 +428,16 @@ All_RAM Control2EPN {
                         $
                 }
                 Pre_Encapsulated_PetriNet/PortPlace (pre_pp1, pre_ps1) {
-                    label = "11"
+                    label = "12"
                 }
                 Pre_Encapsulated_PetriNet/Transition pre_cop_t {
-                    label = "13"
+                    label = "15"
                 }
                 Pre_Encapsulated_PetriNet/P2T (pre_ps1, pre_cop_t) {
-                    label = "14"
+                    label = "16"
                 }
                 Pre_Encapsulated_PetriNet/T2P (pre_cop_t, pre_ps2) {
-                    label = "15"
+                    label = "17"
                 }
 
                 constraint = $
@@ -446,7 +446,7 @@ All_RAM Control2EPN {
                         String s1_value
                         String ps1_type
                         s1_value = read_attribute(host_model, mapping["2"], "objDetected")
-                        ps1_type = read_attribute(host_model, mapping["9"], "name")
+                        ps1_type = read_attribute(host_model, mapping["11"], "name")
 
                         if (s1_value == "Y"):
                             if (ps1_type == "objDetected"):
@@ -481,33 +481,47 @@ All_RAM Control2EPN {
                     label = "6"
                 }
                 Post_Encapsulated_PetriNet/Place post_ps1 {
-                    label = "7"
+                    label = "8"
                 }
                 Post_Encapsulated_PetriNet/Port post_pp1 {
-                    label = "9"
+                    label = "11"
                 }
                 Post_Encapsulated_PetriNet/PortPlace (post_pp1, post_ps1) {
-                    label = "11"
+                    label = "12"
                 }
                 Post_Encapsulated_PetriNet/Transition post_ct_t {
-                    label = "13"
+                    label = "15"
                 }
                 Post_Encapsulated_PetriNet/P2T (post_ps1, post_ct_t) {
-                    label = "14"
+                    label = "16"
                 }
                 Post_Encapsulated_PetriNet/T2P (post_ct_t, post_ps2) {
-                    label = "15"
+                    label = "17"
                 }
                 Post_Encapsulated_PetriNet/P2T (post_cop_obj, post_cop_t) {
-                    label = "16"
+                    label = "9"
                 }
                 Post_Encapsulated_PetriNet/T2P (post_cop_t, post_cop_obj) {
-                    label = "17"
+                    label = "10"
                 }
             }
         }
     }
     Initial (schedule, init_ports) {}
+
+    OnSuccess (init_ports, create_states) {}
+    OnSuccess (create_states, create_transitions) {}
+    OnSuccess (create_transitions, check_object) {}
+    OnSuccess (check_object, fix_interrupt) {}
+    OnSuccess (fix_interrupt, check_input) {}
+    OnSuccess (check_input, success) {}
+
+    OnFailure (init_ports, create_states) {}
+    OnFailure (create_states, create_transitions) {}
+    OnFailure (create_transitions, check_object) {}
+    OnFailure (check_object, fix_interrupt) {}
+    OnFailure (fix_interrupt, check_input) {}
+    OnFailure (check_input, success) {}
 }
 
 export annotate to models/pn_annotate