|
@@ -223,7 +223,7 @@ A B {
|
|
|
Pre_PW_Plant/State pre_ct_1{
|
|
|
label = "1"
|
|
|
}
|
|
|
- Pre_PW_Plant/Transition pre_ct_2{
|
|
|
+ Pre_PW_Plant/Transition pre_ct_2 (pre_ct_0, pre_ct_1) {
|
|
|
label = "2"
|
|
|
}
|
|
|
Pre_Encapsulated_PetriNet/Place pre_ct_3{
|
|
@@ -232,10 +232,10 @@ A B {
|
|
|
Pre_Encapsulated_PetriNet/Place pre_ct_4{
|
|
|
label = "4"
|
|
|
}
|
|
|
- Pre_PLANT2EPN_link (pre_ct_0, pre_ct_3) {
|
|
|
+ Pre_PLANT2EPN_link P2E_l1 (pre_ct_0, pre_ct_3) {
|
|
|
label = "5"
|
|
|
}
|
|
|
- Pre_PLANT2EPN_link (pre_ct_1, pre_ct_4) {
|
|
|
+ Pre_PLANT2EPN_link P2E_l2(pre_ct_1, pre_ct_4) {
|
|
|
label = "6"
|
|
|
}
|
|
|
Pre_Encapsulated_PetriNet/Place pre_ct_7 {
|
|
@@ -243,10 +243,31 @@ A B {
|
|
|
}
|
|
|
Pre_Encapsulated_PetriNet/Port pre_ct_8 {
|
|
|
label = "8"
|
|
|
+ constraint_name = $
|
|
|
+ Boolean function constraint(value : String):
|
|
|
+ return (bool_or(bool_or(value == "up", value == "neutral"), value == "down"))!
|
|
|
+ $
|
|
|
}
|
|
|
- Pre_Encapsulated_PetriNet/PortPlace (pre_ct_8, pre_ct_7) {
|
|
|
+ Pre_Encapsulated_PetriNet/PortPlace pp_l (pre_ct_8, pre_ct_7) {
|
|
|
label = "9"
|
|
|
}
|
|
|
+
|
|
|
+ constraint = $
|
|
|
+ Boolean function constraint(model : Element, mapping : Element):
|
|
|
+ String transition_type
|
|
|
+ String port_name
|
|
|
+ transition_type = read_type(model, mapping["2"])
|
|
|
+ port_name = read_attribute(model, mapping["8"], "name")
|
|
|
+
|
|
|
+ if (transition_type == "PW_Plant/OnUp"):
|
|
|
+ return (port_name == "up")!
|
|
|
+ elif (transition_type == "PW_Plant/OnNeutral"):
|
|
|
+ return (port_name == "neutral")!
|
|
|
+ elif (transition_type == "PW_Plant/OnDown"):
|
|
|
+ return (port_name == "down")!
|
|
|
+ else:
|
|
|
+ return False!
|
|
|
+ $
|
|
|
}
|
|
|
RHS {
|
|
|
Post_PW_Plant/State post_ct_0{
|
|
@@ -255,7 +276,7 @@ A B {
|
|
|
Post_PW_Plant/State post_ct_1{
|
|
|
label = "1"
|
|
|
}
|
|
|
- Post_PW_Plant/Transition post_ct_2{
|
|
|
+ Post_PW_Plant/Transition post_ct_2 (post_ct_0, post_ct_1) {
|
|
|
label = "2"
|
|
|
}
|
|
|
Post_Encapsulated_PetriNet/Place post_ct_3{
|
|
@@ -282,6 +303,10 @@ A B {
|
|
|
|
|
|
Post_Encapsulated_PetriNet/Transition post_ct_10 {
|
|
|
label = "10"
|
|
|
+ value_name = $
|
|
|
+ String function value(model : Element, name : String, mapping : Element):
|
|
|
+ return read_type(model, mapping["2"])!
|
|
|
+ $
|
|
|
}
|
|
|
Post_Encapsulated_PetriNet/P2T (post_ct_3, post_ct_10) {
|
|
|
label = "11"
|
|
@@ -306,7 +331,7 @@ A B {
|
|
|
Pre_PW_Plant/State pre_co_1{
|
|
|
label = "1"
|
|
|
}
|
|
|
- Pre_PW_Plant/Transition pre_co_2{
|
|
|
+ Pre_PW_Plant/Transition pre_co_2 (pre_co_0, pre_co_1) {
|
|
|
label = "2"
|
|
|
constraint_objPresent = $
|
|
|
Boolean function constraint(value : String):
|
|
@@ -368,7 +393,7 @@ A B {
|
|
|
Post_PW_Plant/State post_co_1{
|
|
|
label = "1"
|
|
|
}
|
|
|
- Post_PW_Plant/Transition post_co_2{
|
|
|
+ Post_PW_Plant/Transition post_co_2 (post_co_0, post_co_1) {
|
|
|
label = "2"
|
|
|
}
|
|
|
Post_Encapsulated_PetriNet/Place post_co_3{
|
|
@@ -420,7 +445,7 @@ A B {
|
|
|
Pre_PW_Plant/ErrorState pre_de_1{
|
|
|
label = "1"
|
|
|
}
|
|
|
- Pre_PW_Plant/Transition pre_de_2{
|
|
|
+ Pre_PW_Plant/Transition pre_de_2 (pre_de_0, pre_de_1) {
|
|
|
label = "2"
|
|
|
}
|
|
|
Pre_Encapsulated_PetriNet/Place pre_de_3{
|
|
@@ -502,14 +527,14 @@ A B {
|
|
|
// Check whether the bound primary places match with the state
|
|
|
String source_type
|
|
|
String port_name
|
|
|
- source_type = read_type(host_model, mapping["0"])
|
|
|
+ source_type = read_type(host_model, mapping["2"])
|
|
|
port_name = read_attribute(host_model, mapping["11"], "name")
|
|
|
|
|
|
- if (source_type == "Up"):
|
|
|
+ if (source_type == "PW_Plant/OnUp"):
|
|
|
return (port_name == "up")!
|
|
|
- elif (source_type == "Neutral"):
|
|
|
+ elif (source_type == "PW_Plant/OnNeutral"):
|
|
|
return (port_name == "neutral")!
|
|
|
- elif (source_type == "Down"):
|
|
|
+ elif (source_type == "PW_Plant/OnDown"):
|
|
|
return (port_name == "down")!
|
|
|
else:
|
|
|
return False!
|
|
@@ -522,7 +547,7 @@ A B {
|
|
|
Post_PW_Plant/ErrorState post_de_1{
|
|
|
label = "1"
|
|
|
}
|
|
|
- Post_PW_Plant/Transition post_de_2{
|
|
|
+ Post_PW_Plant/Transition post_de_2 (post_de_0, post_de_1){
|
|
|
label = "2"
|
|
|
}
|
|
|
Post_Encapsulated_PetriNet/Place post_de_3{
|
|
@@ -609,7 +634,7 @@ A B {
|
|
|
Pre_PW_Plant/NormalState pre_rd_1{
|
|
|
label = "1"
|
|
|
}
|
|
|
- Pre_PW_Plant/Transition pre_rd_2{
|
|
|
+ Pre_PW_Plant/Transition pre_rd_2 (pre_rd_0, pre_rd_1){
|
|
|
label = "2"
|
|
|
}
|
|
|
Pre_Encapsulated_PetriNet/Place pre_rd_3{
|
|
@@ -669,7 +694,7 @@ A B {
|
|
|
Post_PW_Plant/ErrorState post_rd_1{
|
|
|
label = "1"
|
|
|
}
|
|
|
- Post_PW_Plant/Transition post_rd_2{
|
|
|
+ Post_PW_Plant/Transition post_rd_2 (post_rd_0, post_rd_1){
|
|
|
label = "2"
|
|
|
}
|
|
|
Post_Encapsulated_PetriNet/Place post_rd_3{
|