|
@@ -600,6 +600,8 @@ Void function action(host_model : Element, name : String, mapping : Element):
|
|
|
\tweight = read_attribute(host_model, mapping["2"], "weight")
|
|
|
\tunset_attribute(host_model, name, "tokens")
|
|
|
\tinstantiate_attribute(host_model, name, "tokens", tokens - weight)
|
|
|
+\tunset_attribute(host_model, name, "executed")
|
|
|
+\tinstantiate_attribute(host_model, name, "executed", True)
|
|
|
\treturn!
|
|
|
"""
|
|
|
|
|
@@ -614,6 +616,8 @@ Void function action(host_model : Element, name : String, mapping : Element):
|
|
|
\tweight = read_attribute(host_model, mapping["2"], "weight")
|
|
|
\tunset_attribute(host_model, name, "tokens")
|
|
|
\tinstantiate_attribute(host_model, name, "tokens", tokens + weight)
|
|
|
+\tunset_attribute(host_model, name, "executed")
|
|
|
+\tinstantiate_attribute(host_model, name, "executed", True)
|
|
|
\treturn!
|
|
|
"""
|
|
|
|
|
@@ -805,8 +809,8 @@ Void function action(host_model : Element, name : String, mapping : Element):
|
|
|
"instantiate", "RHS_contains", "", "rhs_unmark_transition", "post_unmark_t",
|
|
|
# Atomic of rule 4 "unmark transition"
|
|
|
"instantiate", "Atomic", "unmark_transition",
|
|
|
- "instantiate", "AtomicLHS", "", "produce", "lhs_unmark_transition",
|
|
|
- "instantiate", "AtomicRHS", "", "produce", "rhs_unmark_transition",
|
|
|
+ "instantiate", "AtomicLHS", "", "unmark_transition", "lhs_unmark_transition",
|
|
|
+ "instantiate", "AtomicRHS", "", "unmark_transition", "rhs_unmark_transition",
|
|
|
# Rule 5: unmark marked places
|
|
|
# LHS
|
|
|
"instantiate", "LHS", "lhs_unmark_place",
|
|
@@ -824,8 +828,8 @@ Void function action(host_model : Element, name : String, mapping : Element):
|
|
|
"instantiate", "RHS_contains", "", "rhs_unmark_place", "post_unmark_p",
|
|
|
# Atomic of rule 5 "unmark place"
|
|
|
"instantiate", "Atomic", "unmark_place",
|
|
|
- "instantiate", "AtomicLHS", "", "produce", "lhs_unmark_place",
|
|
|
- "instantiate", "AtomicRHS", "", "produce", "rhs_unmark_place",
|
|
|
+ "instantiate", "AtomicLHS", "", "unmark_place", "lhs_unmark_place",
|
|
|
+ "instantiate", "AtomicRHS", "", "unmark_place", "rhs_unmark_place",
|
|
|
# Compose schedule
|
|
|
"instantiate", "Composite", "main",
|
|
|
"instantiate", "Success", "success",
|
|
@@ -856,8 +860,9 @@ Void function action(host_model : Element, name : String, mapping : Element):
|
|
|
"load", "pn",
|
|
|
"list",
|
|
|
"verify",
|
|
|
- "read",
|
|
|
- "t1",
|
|
|
+ "read", "t1",
|
|
|
+ "read", "p1",
|
|
|
+ "read", "p2",
|
|
|
"exit",
|
|
|
],
|
|
|
None, "PO"))
|