123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- include "primitives.alh"
- include "modelling.alh"
- Composite schedule {
- {Contains} Failure failure {}
- {Contains} Success success {}
- {Contains} ForAll copy_transitions {
- LHS {
- Pre_PetriNet_Runtime/Transition {
- label = "0"
- }
- }
- RHS {
- Post_PetriNet_Runtime/Transition ct1 {
- label = "0"
- }
- Post_PetriNet/Transition ct2 {
- label = "1"
- value_name = $
- Integer function value(model : Element, name : String, mapping : Element):
- return read_attribute(model, mapping["0"], "name")!
- $
- }
- Post_R2D_TransitionLink (ct1, ct2){
- label = "2"
- }
- }
- }
- {Contains} ForAll copy_places {
- LHS {
- Pre_PetriNet_Runtime/Place {
- label = "0"
- }
- }
- RHS {
- Post_PetriNet_Runtime/Place cp1 {
- label = "0"
- }
- Post_PetriNet/Place cp2 {
- label = "1"
- value_tokens = $
- Integer function value(host_model : Element, name : String, mapping : Element):
- return read_attribute(host_model, mapping["0"], "tokens")!
- $
- value_name = $
- String function value(host_model : Element, name : String, mapping : Element):
- return read_attribute(host_model, mapping["0"], "name")!
- $
- }
- Post_R2D_PlaceLink (cp1, cp2){
- label = "2"
- }
- }
- }
- {Contains} ForAll copy_P2T {
- LHS {
- Pre_PetriNet_Runtime/Place cp2t_p{
- label = "0"
- }
- Pre_PetriNet_Runtime/Transition cp2t_t{
- label = "1"
- }
- Pre_PetriNet_Runtime/P2T (cp2t_p, cp2t_t){
- label = "2"
- }
- Pre_PetriNet/Place cp2t_p2{
- label = "3"
- }
- Pre_PetriNet/Transition cp2t_t2{
- label = "4"
- }
- Pre_R2D_PlaceLink (cp2t_p, cp2t_p2){
- label = "5"
- }
- Pre_R2D_TransitionLink (cp2t_t, cp2t_t2){
- label = "6"
- }
- }
- RHS {
- Post_PetriNet_Runtime/Place rhs_cp2t_p{
- label = "0"
- }
- Post_PetriNet_Runtime/Transition rhs_cp2t_t{
- label = "1"
- }
- Post_PetriNet_Runtime/P2T rhs_cp2t_p2t (rhs_cp2t_p, rhs_cp2t_t){
- label = "2"
- }
- Post_PetriNet/Place rhs_cp2t_p2 {
- label = "3"
- }
- Post_PetriNet/Transition rhs_cp2t_t2 {
- label = "4"
- }
- Post_R2D_PlaceLink (rhs_cp2t_p, rhs_cp2t_p2){
- label = "5"
- }
- Post_R2D_TransitionLink (rhs_cp2t_t, rhs_cp2t_t2){
- label = "6"
- }
- Post_PetriNet/P2T rhs_cp2t_p2t2(rhs_cp2t_p2, rhs_cp2t_t2) {
- label = "7"
- value_weight = $
- Integer function value(host_model : Element, name : String, mapping : Element):
- return read_attribute(host_model, mapping["2"], "weight")!
- $
- }
- }
- }
- {Contains} ForAll copy_T2P {
- LHS {
- Pre_PetriNet_Runtime/Place ct2p_p{
- label = "0"
- }
- Pre_PetriNet_Runtime/Transition ct2p_t{
- label = "1"
- }
- Pre_PetriNet_Runtime/T2P (ct2p_t, ct2p_p){
- label = "2"
- }
- Pre_PetriNet/Place ct2p_p2{
- label = "3"
- }
- Pre_PetriNet/Transition ct2p_t2{
- label = "4"
- }
- Pre_R2D_PlaceLink (ct2p_p, ct2p_p2){
- label = "5"
- }
- Pre_R2D_TransitionLink (ct2p_t, ct2p_t2){
- label = "6"
- }
- }
- RHS {
- Post_PetriNet_Runtime/Place rhs_ct2p_p{
- label = "0"
- }
- Post_PetriNet_Runtime/Transition rhs_ct2p_t{
- label = "1"
- }
- Post_PetriNet_Runtime/T2P (rhs_ct2p_t, rhs_ct2p_p){
- label = "2"
- }
- Post_PetriNet/Place rhs_ct2p_p2 {
- label = "3"
- }
- Post_PetriNet/Transition rhs_ct2p_t2 {
- label = "4"
- }
- Post_R2D_PlaceLink (rhs_ct2p_p, rhs_ct2p_p2){
- label = "5"
- }
- Post_R2D_TransitionLink (rhs_ct2p_t, rhs_ct2p_t2){
- label = "6"
- }
- Post_PetriNet/T2P (rhs_ct2p_t2, rhs_ct2p_p2) {
- label = "7"
- value_weight = $
- Integer function value(host_model : Element, name : String, mapping : Element):
- return read_attribute(host_model, mapping["2"], "weight")!
- $
- }
- }
- }
- }
- OnSuccess (copy_places, copy_transitions) {}
- OnSuccess (copy_transitions, copy_P2T) {}
- OnSuccess (copy_P2T, copy_T2P) {}
- OnSuccess (copy_T2P, success) {}
- OnFailure (copy_places, copy_transitions) {}
- OnFailure (copy_transitions, copy_P2T) {}
- OnFailure (copy_P2T, copy_T2P) {}
- OnFailure (copy_T2P, success) {}
- Initial (schedule, copy_places) {}
|