浏览代码

Add tracability links for the transitions as well for plant

Yentl Van Tendeloo 8 年之前
父节点
当前提交
3ea339e496
共有 2 个文件被更改,包括 34 次插入2 次删除
  1. 12 2
      integration/test_powerwindow.py
  2. 22 0
      models/plant_to_EPN.mvc

+ 12 - 2
integration/test_powerwindow.py

@@ -93,11 +93,21 @@ class TestPowerWindow(unittest.TestCase):
                             "CTRL2EPN_link",
                             "PW_Control/State",
                             "Encapsulated_PetriNet/Place",
+                        "instantiate",
+                            "Association",
+                            "CTRL2EPN_tlink",
+                            "PW_Control/Transition",
+                            "Encapsulated_PetriNet/Transition",
                         "instantiate",
                             "Association",
                             "PLANT2EPN_link",
                             "PW_Plant/State",
                             "Encapsulated_PetriNet/Place",
+                        "instantiate",
+                            "Association",
+                            "PLANT2EPN_tlink",
+                            "PW_Plant/Transition",
+                            "Encapsulated_PetriNet/Transition",
                         "instantiate",
                             "Association",
                             "ENV2EPN_link",
@@ -284,13 +294,13 @@ class TestPowerWindow(unittest.TestCase):
                 "Model loaded, ready for commands!",
                 "Use 'help' command for a list of possible commands",
                 "Please give your command.",
-                # instantiate * 5
+                # instantiate * 7
                 ] + [   "Type to instantiate?",
                         "Name of new element?",
                         "Source name?",
                         "Destination name?",
                         "Instantiation successful!",
-                        "Please give your command.", ] * 5 + [
+                        "Please give your command.", ] * 7 + [
                 "Ready for command...",
                 # transformation_RAMify
                 "Which metamodel do you want to RAMify?",

+ 22 - 0
models/plant_to_EPN.mvc

@@ -331,6 +331,9 @@ A B {
                 Post_Encapsulated_PetriNet/T2P (post_ct_10, post_ct_7) {
                     label = "14"
                 }
+                Post_PLANT2EPN_tlink (post_ct_2, post_ct_10) {
+                    label = "100"
+                }
             }
         }
 
@@ -384,6 +387,9 @@ A B {
                 Pre_Encapsulated_PetriNet/T2P (pre_co_15, pre_co_4) {
                     label = "17"
                 }
+                Pre_PLANT2EPN_tlink (pre_co_2, pre_co_15) {
+                    label = "100"
+                }
 
                 constraint = $
                     Boolean function constraint (host_model : Element, mapping : Element):
@@ -449,6 +455,10 @@ A B {
                 Post_Encapsulated_PetriNet/T2P (post_co_15, post_co_8) {
                     label = "10"
                 }
+                Post_PLANT2EPN_tlink (post_co_2, post_co_15) {
+                    label = "100"
+                }
+
             }
         }
 
@@ -536,6 +546,9 @@ A B {
                 Pre_Encapsulated_PetriNet/PortPlace (pre_de_20, pre_de_19) {
                     label = "21"
                 }
+                Pre_PLANT2EPN_tlink (pre_de_2, pre_de_7) {
+                    label = "100"
+                }
 
                 constraint = $
                     Boolean function constraint (host_model : Element, mapping : Element):
@@ -639,6 +652,9 @@ A B {
                 Post_Encapsulated_PetriNet/T2P (post_de_7, post_de_19) {
                     label = "25"
                 }
+                Post_PLANT2EPN_tlink (post_de_2, post_de_7) {
+                    label = "100"
+                }
             }
         }
         {Contains} ForAll remove_detect {
@@ -701,6 +717,9 @@ A B {
                 Pre_Encapsulated_PetriNet/PortPlace (pre_rd_14, pre_rd_13) {
                     label = "15"
                 }
+                Pre_PLANT2EPN_tlink (pre_rd_2, pre_rd_7) {
+                    label = "100"
+                }
             }
             RHS {
                 Post_PW_Plant/ErrorState post_rd_0{
@@ -760,6 +779,9 @@ A B {
                 Post_Encapsulated_PetriNet/T2P (post_rd_7, post_rd_13) {
                     label = "17"
                 }
+                Post_PLANT2EPN_tlink (post_rd_2, post_rd_7) {
+                    label = "100"
+                }
             }
         }
     }