|
@@ -17,7 +17,9 @@ Boolean function simulate(model : Element):
|
|
|
Element in_arcs
|
|
|
String arc_under_study
|
|
|
|
|
|
- all_transitions = allInstances(model, "PetriNets/Transition")
|
|
|
+ log("Got types: " + set_to_string(dict_keys(model["metamodel"]["model"])))
|
|
|
+
|
|
|
+ all_transitions = allInstances(model, "PetriNets_Runtime/Transition")
|
|
|
enabled_transitions = create_node()
|
|
|
|
|
|
while (0 < read_nr_out(all_transitions)):
|
|
@@ -25,7 +27,7 @@ Boolean function simulate(model : Element):
|
|
|
enabled = True
|
|
|
|
|
|
// Find all incoming transitions
|
|
|
- in_arcs = allIncomingAssociationInstances(model, under_study, "PetriNets/P2T")
|
|
|
+ in_arcs = allIncomingAssociationInstances(model, under_study, "PetriNets_Runtime/P2T")
|
|
|
|
|
|
while (0 < read_nr_out(in_arcs)):
|
|
|
arc_under_study = set_pop(in_arcs)
|
|
@@ -54,7 +56,7 @@ Boolean function simulate(model : Element):
|
|
|
String working_place
|
|
|
Integer new_value
|
|
|
|
|
|
- workset = allIncomingAssociationInstances(model, transition, "PetriNets/P2T")
|
|
|
+ workset = allIncomingAssociationInstances(model, transition, "PetriNets_Runtime/P2T")
|
|
|
while (0 < read_nr_out(workset)):
|
|
|
working_arc = set_pop(workset)
|
|
|
working_place = reverseKeyLookup(model["model"], read_edge_src(model["model"][working_arc]))
|
|
@@ -62,7 +64,7 @@ Boolean function simulate(model : Element):
|
|
|
instantiate_attribute(model, working_place, "tokens", new_value)
|
|
|
|
|
|
// Add tokens
|
|
|
- workset = allOutgoingAssociationInstances(model, transition, "PetriNets/T2P")
|
|
|
+ workset = allOutgoingAssociationInstances(model, transition, "PetriNets_Runtime/T2P")
|
|
|
while (0 < read_nr_out(workset)):
|
|
|
working_arc = set_pop(workset)
|
|
|
working_place = reverseKeyLookup(model["model"], read_edge_dst(model["model"][working_arc]))
|