PW_PN_RAM pw_to_epn { Composite schedule { {Contains} Success success {} {Contains} Atomic R_no_sensor { LHS { Pre_PW/Side { label = "1" } } NAC { Pre_PW/Side n_nac_s{ label = "1" } Pre_PW/Infrared n_nac_i{ label = "2" } Pre_PW/HasSensor (n_nac_s, n_nac_i) { label = "3" } } RHS { Post_EPN/Boundary n_0{ label = "0" } Post_EPN/Port n_4{ label = "4" name = $ String function value(host_model : Element, name : String, mapping : Element): return "InControlGoingDown"! $ } Post_EPN/Port n_6{ label = "6" name = $ String function value(host_model : Element, name : String, mapping : Element): return "InControlMovingUp"! $ } Post_EPN/Port n_50{ label = "50" name = $ String function value(host_model : Element, name : String, mapping : Element): return "InControlNeutral"! $ } Post_EPN/Transition n_16{ name = $ String function value(host_model : Element, name : String, mapping : Element): return "InControlMovingUp"! $ } label = "16" Post_EPN/Transition n_18{ label = "18" name = $ String function value(host_model : Element, name : String, mapping : Element): return "InControlMovingUp"! $ } Post_EPN/Transition n_20{ label = "20" name = $ String function value(host_model : Element, name : String, mapping : Element): return "InControlNeutral"! $ } Post_EPN/Transition n_22{ label = "22" name = $ String function value(host_model : Element, name : String, mapping : Element): return "InControlNeutral"! $ } Post_EPN/Transition n_24{ label = "24" name = $ String function value(host_model : Element, name : String, mapping : Element): return "InControlNeutral"! $ } Post_EPN/Transition n_26{ label = "26" name = $ String function value(host_model : Element, name : String, mapping : Element): return "InControlMovingUp"! $ } Post_EPN/Transition n_28{ label = "28" name = $ String function value(host_model : Element, name : String, mapping : Element): return "InControlMovingUp"! $ } Post_EPN/Place n_9{ label = "9" nbTokens = $ Integer function value(host_model : Element, name : String, mapping : Element): return 0! $ name = $ String function value(host_model : Element, name : String, mapping : Element): return "top"! $ } Post_EPN/Place n_11{ label = "11" nbTokens = $ Integer function value(host_model : Element, name : String, mapping : Element): return 0! $ name = $ String function value(host_model : Element, name : String, mapping : Element): return "middle"! $ } Post_EPN/Place n_14{ label = "14" nbTokens = $ Integer function value(host_model : Element, name : String, mapping : Element): return 1! $ name = $ String function value(host_model : Element, name : String, mapping : Element): return "bottom"! $ } Post_EPN/Has3 (n_0, n_4){ label = "5" } Post_EPN/Has3 (n_0, n_6){ label = "7" } Post_EPN/Has3 (n_0, n_50){ label = "8" } Post_EPN/Has2 (n_0, n_16){ label = "17" } Post_EPN/Has2 (n_0, n_18){ label = "19" } Post_EPN/Has2 (n_0, n_20){ label = "21" } Post_EPN/Has2 (n_0, n_22){ label = "23" } Post_EPN/Has2 (n_0, n_24){ label = "25" } Post_EPN/Has2 (n_0, n_26){ label = "27" } Post_EPN/Has2 (n_0, n_28){ label = "29" } Post_EPN/Has1 (n_0, n_9){ label = "10" } Post_EPN/Has1 (n_0, n_11){ label = "13" } Post_EPN/Has1 (n_0, n_14){ label = "15" } Post_EPN/PortTransition (n_6, n_16){ label = "32" } Post_EPN/PortTransition (n_6, n_18){ label = "49" } Post_EPN/PortTransition (n_4, n_28){ label = "54" } Post_EPN/PortTransition (n_4, n_26){ label = "53" } Post_EPN/PortTransition (n_50, n_20){ label = "52" } Post_EPN/PortTransition (n_50, n_22){ label = "51" } Post_EPN/PortTransition (n_50, n_24){ label = "12" } Post_EPN/P2T (n_9, n_20) { label = "40" } Post_EPN/P2T (n_9, n_26) { label = "36" } Post_EPN/P2T (n_11, n_16) { label = "34" } Post_EPN/P2T (n_11, n_22) { label = "42" } Post_EPN/P2T (n_11, n_28) { label = "38" } Post_EPN/P2T (n_14, n_18) { label = "31" } Post_EPN/P2T (n_14, n_24) { label = "44" } Post_EPN/T2P (n_16, n_9) { label = "35" } Post_EPN/T2P (n_18, n_11) { label = "33" } Post_EPN/T2P (n_20, n_9) { label = "41" } Post_EPN/T2P (n_22, n_11) { label = "43" } Post_EPN/T2P (n_24, n_14) { label = "45" } Post_EPN/T2P (n_26, n_11) { label = "37" } Post_EPN/T2P (n_28, n_14) { label = "39" } } } {Contains} Atomic R_sensor { LHS { Pre_PW/Side s_s{ label = "1" } Pre_PW/Infrared s_i{ label = "2" } Pre_PW/HasSensor (s_s, s_i) { label = "3" } } RHS { Post_EPN/Boundary s_0{ label = "0" } Post_EPN/Port s_36{ label = "36" name = $ String function value(host_model : Element, name : String, mapping : Element): return "InControlNeutral"! $ } Post_EPN/Port s_38{ label = "38" name = $ String function value(host_model : Element, name : String, mapping : Element): return "InControlMovingUp"! $ } Post_EPN/Port s_40{ label = "40" name = $ String function value(host_model : Element, name : String, mapping : Element): return "InControlMovingDown"! $ } Post_EPN/Port s_42{ label = "42" name = $ String function value(host_model : Element, name : String, mapping : Element): return "detectedObject"! $ } Post_EPN/Place s_9{ label = "9" nbTokens = $ Integer function value(host_model : Element, name : String, mapping : Element): return 0! $ name = $ String function value(host_model : Element, name : String, mapping : Element): return "top"! $ } Post_EPN/Place s_11{ label = "11" nbTokens = $ Integer function value(host_model : Element, name : String, mapping : Element): return 0! $ name = $ String function value(host_model : Element, name : String, mapping : Element): return "middle"! $ } Post_EPN/Place s_14{ label = "14" nbTokens = $ Integer function value(host_model : Element, name : String, mapping : Element): return 1! $ name = $ String function value(host_model : Element, name : String, mapping : Element): return "bottom"! $ } Post_EPN/Place s_19{ label = "19" nbTokens = $ Integer function value(host_model : Element, name : String, mapping : Element): return 0! $ name = $ String function value(host_model : Element, name : String, mapping : Element): return "topDetectedFrame"! $ } Post_EPN/Place s_23{ label = "23" nbTokens = $ Integer function value(host_model : Element, name : String, mapping : Element): return 0! $ name = $ String function value(host_model : Element, name : String, mapping : Element): return "middleDetectedFrame"! $ } Post_EPN/Transition s_32{ label = "32" name = $ String function value(host_model : Element, name : String, mapping : Element): return "ControlUp+Object"! $ } Post_EPN/Transition s_33{ label = "33" name = $ String function value(host_model : Element, name : String, mapping : Element): return "ControlUp+Object"! $ } Post_EPN/Transition s_27{ label = "27" name = $ String function value(host_model : Element, name : String, mapping : Element): return "InControlNeutral"! $ } Post_EPN/Transition s_29{ label = "29" name = $ String function value(host_model : Element, name : String, mapping : Element): return "InControlNeutral"! $ } Post_EPN/Transition s_16{ label = "16" name = $ String function value(host_model : Element, name : String, mapping : Element): return "InControlMovingUp"! $ } Post_EPN/Transition s_18{ label = "18" name = $ String function value(host_model : Element, name : String, mapping : Element): return "InControlMovingUp"! $ } Post_EPN/Transition s_20{ label = "20" name = $ String function value(host_model : Element, name : String, mapping : Element): return "InControlNeutral"! $ } Post_EPN/Transition s_22{ label = "22" name = $ String function value(host_model : Element, name : String, mapping : Element): return "InControlNeutral"! $ } Post_EPN/Transition s_24{ label = "24" name = $ String function value(host_model : Element, name : String, mapping : Element): return "InControlNeutral"! $ } Post_EPN/Transition s_26{ label = "26" name = $ String function value(host_model : Element, name : String, mapping : Element): return "InControlMovingUp"! $ } Post_EPN/Transition s_28{ label = "28" name = $ String function value(host_model : Element, name : String, mapping : Element): return "InControlMovingUp"! $ } Post_EPN/PortTransition (s_42, s_32){ label = "68" } Post_EPN/PortTransition (s_42, s_33){ label = "69" } Post_EPN/PortTransition (s_38, s_18){ label = "70" } Post_EPN/PortTransition (s_38, s_16){ label = "71" } Post_EPN/PortTransition (s_40, s_26){ label = "59" } Post_EPN/PortTransition (s_40, s_28){ label = "58" } Post_EPN/PortTransition (s_36, s_27){ label = "a_0" } Post_EPN/PortTransition (s_36, s_29){ label = "a_1" } Post_EPN/PortTransition (s_36, s_20){ label = "a_2" } Post_EPN/PortTransition (s_36, s_22){ label = "a_3" } Post_EPN/PortTransition (s_36, s_24){ label = "a_4" } Post_EPN/P2T (s_19, s_27){ label = "60" } Post_EPN/P2T (s_23, s_29){ label = "64" } Post_EPN/P2T (s_9, s_32){ label = "62" } Post_EPN/P2T (s_9, s_20){ label = "52" } Post_EPN/P2T (s_9, s_26){ label = "48" } Post_EPN/P2T (s_11, s_28){ label = "50" } Post_EPN/P2T (s_11, s_22){ label = "55" } Post_EPN/P2T (s_11, s_16){ label = "46" } Post_EPN/P2T (s_11, s_18){ label = "45" } Post_EPN/P2T (s_14, s_24){ label = "56" } Post_EPN/P2T (s_14, s_18){ label = "44" } Post_EPN/T2P (s_32, s_19){ label = "63" } Post_EPN/T2P (s_33, s_23){ label = "67" } Post_EPN/T2P (s_27, s_9){ label = "61" } Post_EPN/T2P (s_29, s_11){ label = "65" } Post_EPN/T2P (s_16, s_9){ label = "47" } Post_EPN/T2P (s_18, s_11){ label = "45" } Post_EPN/T2P (s_20, s_9){ label = "53" } Post_EPN/T2P (s_26, s_11){ label = "49" } Post_EPN/T2P (s_22, s_11){ label = "55" } Post_EPN/T2P (s_28, s_14){ label = "51" } Post_EPN/T2P (s_24, s_14){ label = "57" } Post_EPN/Has3 (s_0, s_42){ label = "43" } Post_EPN/Has3 (s_0, s_36){ label = "37" } Post_EPN/Has3 (s_0, s_38){ label = "39" } Post_EPN/Has3 (s_0, s_40){ label = "41" } Post_EPN/Has2 (s_0, s_32){ label = "34" } Post_EPN/Has2 (s_0, s_33){ label = "35" } Post_EPN/Has2 (s_0, s_27){ label = "30" } Post_EPN/Has2 (s_0, s_29){ label = "31" } Post_EPN/Has2 (s_0, s_16){ label = "7" } Post_EPN/Has2 (s_0, s_18){ label = "8" } Post_EPN/Has2 (s_0, s_20){ label = "13" } Post_EPN/Has2 (s_0, s_22){ label = "15" } Post_EPN/Has2 (s_0, s_24){ label = "17" } Post_EPN/Has2 (s_0, s_26){ label = "10" } Post_EPN/Has2 (s_0, s_28){ label = "12" } Post_EPN/Has1 (s_0, s_9){ label = "4" } Post_EPN/Has1 (s_0, s_11){ label = "5" } Post_EPN/Has1 (s_0, s_14){ label = "6" } Post_EPN/Has1 (s_0, s_19){ label = "21" } Post_EPN/Has1 (s_0, s_23){ label = "25" } } } } Initial (schedule, R_no_sensor) {} OnSuccess (R_no_sensor, R_no_sensor) {} OnFailure (R_no_sensor, R_sensor) {} OnSuccess (R_sensor, R_sensor) {} OnFailure (R_sensor, success) {} }