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" } } } {Contains} Atomic R_sensor { } } 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) {} }