//Dodatkowe modele tylko dla scenariusza EIC2620
include pkp/d1_stojaca.inc d1_li -10773.2 -0.00143202 24536.8 314.5 end
include pkp/d1_stojaca.inc d1_ru -12325.3 -0.151881 28584.1 181.5 end
include ip/pkp/w7.inc w7_ru -12187.8 0.513482 27005.6 329.25 end
include ip/pkp/w7.inc w7_li -11777.1 0.37849 25989.9 160 end

include edobre/robol.inc rob_ru_li1 -12003.3 0.226895 26571 200.5 end
include edobre/robol.inc rob_ru_li2 -11993 0.0369328 26552.1 281.75  end
include edobre/robol.inc rob_ru_li3 -11976.2 0.0213833 26512.8 160.5 end
include edobre/robol.inc rob_ru_li4 -11955.9 0.0451499 26460.2 272.75 end

include ip/pkp/w7.inc w7_jerz-r1 496.5 1.0 -35760.0 0.0 end 
include ip/pkp/w7.inc w7_jerz-r2 500.0 1.0 -37800 180.0 0 end

include edobre\robol.inc rob_je1 487 0 -36930 -320     end 
include edobre\robol.inc rob_je2 489.2 0.2 -36941 16     end 
include edobre\robol.inc rob_je3 489.2 0.2 -36911 185     end 
include edobre\robol.inc rob_je4 497.4 0.0 -36935 -60     end
include edobre\robol.inc rob_je5 498 0.0 -36963 -20     end 

include ip\pkp\d1.inc d1_wrzosy -26.1 0.0 -5670 0.0     end
include ip\pkp\d1.inc d1_debica -26.1 0.0 -2590 0.0     end

//Eventy Pogodowe - te akurat są zmienione nazwy nie odpowiadaja ustawionej pogodzie, zmieniła mi się po drodze koncepcja
event weather1 updatevalues 0.0 __simulation.weather * 0.15 10200 endevent
event weather2 updatevalues 0.0 __simulation.weather * 0.25 8500 endevent
event weather3 updatevalues 0.0 __simulation.weather * 0.35 4450 endevent
event weather4 updatevalues 0.0 __simulation.weather * 0.45 2250 endevent
event weather5 updatevalues 0.0 __simulation.weather * 0.55 1850 endevent

event chmury_low multiple 0 none weather1 randomdelay 180 endevent
event chmury_med multiple 0 none weather2 randomdelay 180 endevent
event chmury_full multiple 0 none weather3 randomdelay 180 endevent
event deszcz_maly multiple 0 none weather4 randomdelay 180 endevent
event deszcz_duzy multiple 0 none weather5 randomdelay 180 endevent

//Dźwięki - deklaracje:

node 1200 0 meg_sandomierz1 sound -18453 4 52479 radiotelefon/wrzosy/tde330604_sandomierz.wav endsound
event meg_sandomierz1 sound 100 meg_sandomierz1 1 endevent

node 1200 0 meg_sandomierz2 sound -18453 4 52479 radiotelefon/wrzosy/roj23451_sandomierz.wav endsound
event meg_sandomierz2 sound 0 meg_sandomierz2 1 endevent

node 1000 0 meg_sandomierz3 sound -18453 4 52479 radiotelefon/wrzosy/eic2620_sandomierz.wav endsound
event meg_sandomierz3 sound 45 meg_sandomierz3 1 endevent

//Radio deklaracje:=================================================
//Wolica-Arkadia: R1
//Arkadia-Nowa Ruda: R7
//Nowa Ruda-Dębica: R2
//Dębica-Turów: R5
//Turów-Sandomierz: R3

//Sandomierz - Turów R3
node -1 0 r3_rudawa1 sound -12300 0 29450 radiotelefon/wrzosy/2620radio_1.wav endsound
event r3_rudawa1 sound 0 r3_rudawa1 1 3 endevent

node -1 0 r3_rudawa2 sound -12300 0 29450 radiotelefon/wrzosy/2620radio_2.wav endsound
event r3_rudawa2 sound 0 r3_rudawa2 1 3 endevent

node -1 0 r3_rudawa3 sound -12300 0 29450 radiotelefon/wrzosy/2620radio_3.wav endsound
event r3_rudawa3 sound 0 r3_rudawa3 1 3 endevent

node -1 0 r3_rudawa4 sound -12300 0 29450 radiotelefon/wrzosy/2620radio_4.wav endsound
event r3_rudawa4 sound 0 r3_rudawa4 1 3 endevent

node -1 0 r3_rudawa5 sound -12300 0 29450 radiotelefon/wrzosy/2620radio_5.wav endsound
event r3_rudawa5 sound 0 r3_rudawa5 1 3 endevent

node -1 0 r3_turow1 sound -5000 1 22000 radiotelefon/wrzosy/2620radio_6.wav endsound
event r3_turow1 sound 0 r3_turow1 1 3 endevent

node -1 0 r3_turow2 sound -5000 1 22000 radiotelefon/wrzosy/2620radio_7.wav endsound
event r3_turow2 sound 0 r3_turow2 1 3 endevent

node -1 0 r3_turow3 sound -5000 1 22000 radiotelefon/wrzosy/2620radio_8.wav endsound
event r3_turow3 sound 10 r3_turow3 1 3 endevent

//Turów - Dębica R5
node -1 0 r5_turow3 sound -5000 1 22000 radiotelefon/wrzosy/2620radio_8.wav endsound
event r5_turow3 sound 10 r5_turow3 1 5 endevent

node -1 0 r5_krap1 sound -5000 1 22000 radiotelefon/wrzosy/2620radio_9.wav endsound
event r5_krap1 sound 0 r5_krap1 1 5 endevent

node -1 0 r5_krap2 sound -5000 1 22000 radiotelefon/wrzosy/2620radio_10.wav endsound
event r5_krap2 sound 0 r5_krap2 1 5 endevent

node -1 0 r5_krap3 sound -5000 1 22000 radiotelefon/wrzosy/2620radio_11.wav endsound
event r5_krap3 sound 0 r5_krap3 1 5 endevent

//Dębica - Nowa Ruda R2

//Nowa Ruda - Arkadia R7

//Arkadia - Wolica R1
node -1 0 r1_wolica1 sound -22700 8 -68674 radiotelefon/wrzosy/2620radio_13.wav endsound
event r1_wolica1 sound 0 r1_wolica1 1 1 endevent

node -1 0 r1_wolica2 sound -22700 8 -68674 radiotelefon/wrzosy/2620radio_14.wav endsound
event r1_wolica2 sound 0 r1_wolica2 1 1 endevent

node -1 0 r1_wolica3 sound -22700 8 -68674 radiotelefon/wrzosy/2620radio_15.wav endsound
event r1_wolica3 sound 12 r1_wolica3 1 1 endevent

node -1 0 r1_wolica4 sound -22700 8 -68674 radiotelefon/wrzosy/2620radio_16.wav endsound
event r1_wolica4 sound 0 r1_wolica4 1 1 endevent

node -1 0 r1_wolica5 sound -22700 8 -68674 radiotelefon/wrzosy/2620radio_17.wav endsound
event r1_wolica5 sound 0 r1_wolica5 1 1 endevent

node -1 0 r1_wolica6 sound -22700 8 -68674 radiotelefon/wrzosy/2620radio_18.wav endsound
event r1_wolica6 sound 2 r1_wolica6 1 1 endevent

//Deklaracja wyświetlaczy:
event sos_lcd_p1t4 texture 0 monitor_san11b|monitor_san12b 1 make:scripts/tablica_pti?peron=1&tor=4 none endevent
event sos_lcd_p1t2 texture 0 monitor_san11a|monitor_san12a 1 make:scripts/tablica_pti?peron=1&tor=2 none endevent
event sos_lcd_p2t1 texture 0 monitor_san21b|monitor_san22b 1 make:scripts/tablica_pti?peron=2&tor=1 none endevent
event sos_lcd_p2t3 texture 0 monitor_san21a|monitor_san22a 1 make:scripts/tablica_pti?peron=2&tor=3 none endevent

event sos_lcd_2620 texture 0 monitor_san11a|monitor_san12a 1 make:scripts/tablica_pti?peron=1&tor=2&do="Wolica"&przez="Turów, Dębica, Jerzynianka"&godzina="9:30"&numer="EIC 2620"&nazwa="WOLSKI" none endevent
event sos_lcd_23451 texture 0 monitor_san21a|monitor_san22a 1 make:scripts/tablica_pti?peron=2&tor=3&do="Kraków Główny"&przez="Tarnów, Bochnia, Kłaj, Podłęże, Kraków Płaszów"&godzina="9:36"&numer="R 23451" none endevent

event tos_lcd_p1t1 texture 0 monitor_tu11|monitor_tu12 1 make:scripts/tablica_pti?peron=1&tor=1 none endevent
event tos_lcd_p2t3 texture 0 monitor_tu21b|monitor_tu22b 1 make:scripts/tablica_pti?peron=2&tor=3 none endevent
event tos_lcd_p2t2 texture 0 monitor_tu21a|monitor_tu22a 1 make:scripts/tablica_pti?peron=2&tor=2 none endevent
event tos_lcd_p3t4 texture 0 monitor_tu31|monitor_tu32 1 make:scripts/tablica_pti?peron=3&tor=4 none endevent

event tos_lcd_2620_p3t4 texture 0 monitor_tu31|monitor_tu32 1 make:scripts/tablica_pti?peron=3&tor=4&do="Wolica"&przez="Dębica, Jerzynianka"&godzina="10:00"&numer="EIC 2620"&nazwa="WOLSKI" none endevent
event tos_lcd_2620_p2t2 texture 0 monitor_tu21a|monitor_tu22a 1 make:scripts/tablica_pti?peron=2&tor=3&do="Wolica"&przez="Dębica, Jerzynianka"&godzina="10:00"&numer="EIC 2620"&nazwa="WOLSKI" none endevent
event tos_lcd_23502 texture 0 monitor_tu21a|monitor_tu22a 1 make:scripts/tablica_pti?peron=2&tor=2&do="Kielce Główne"&godzina="09:57"&numer="R 23502"&koniec=1 none endevent

event dos_lcd_p1t5 texture 0 monitor_deb11|monitor_deb12 1 make:scripts/tablica_pti?peron=1&tor=5 none endevent

event dos_lcd_62100 texture 0 monitor_deb11|monitor_deb12 1 make:scripts/tablica_pti?peron=1&tor=5&do="Lublin Główny"&przez="Turów, Kielce Główne, Radom Główny, Puławy Miasto"&godzina="10:23"&numer="IC 62100"&nazwa="CZARNOZIEM" none endevent

event onstart_tab_init multiple 0 none
sos_lcd_p1t4 sos_lcd_p1t2 sos_lcd_p2t1 sos_lcd_p2t3 tos_lcd_p1t1 tos_lcd_p2t3 tos_lcd_p2t2 tos_lcd_p3t4 dos_lcd_p1t5 sos_lcd_2620
endevent

//Sterowanie sygnałami Pc1 i Pc2 dla AI (wpisane zdalnie, aby nie ingerować w pliki SCM L053):
event tor1665:event1 multiple 0 none ustaw_pc2 endevent
event tor0379:event1 multiple 0 none ustaw_pc1 endevent
event tor2811:event1 multiple 0 none ustaw_pc2 endevent
event tor2365:event1 multiple 0 none ustaw_pc1 endevent
event tor2106:event1 multiple 0 none ustaw_pc2 endevent

event onstart_ruch_pocz multiple 20 none
furmany_zwr04- furmany_zwr02- furmany_d2_s10 //przelot dla 330604
330604_droga 330604-u-o meg_sandomierz1 //wjazd na bok dla 330604
62253-skwarki //wyjazd 62253 ze Skwarek
endevent

event 330604_droga multiple 80 none przejazd51_zamykaj zwr0136- zwr131- endevent

event 330604-u-o multiple 90 none sandomierz_u_s12 sandomierz_o_s13 endevent

event 62253-skwarki multiple 360 none przejazd43_zamykaj skwarki_b_s2 endevent //wyjazd 62253 ze Skwarek

event tor1451:event1 multiple 10 none 
zwr122- anglik93ad zwr130- 23451-g5-tm22 sos_lcd_23451 meg_sandomierz2 //wjazd 23451 w perony
62253-b-g1
2620-wyjazd-sem1 meg_sandomierz3 //wyjazd dla 2620
2620_prz_skwarki //przelot dla 2620
endevent

event 23451-g5-tm22 multiple 10 none sandomierz_g5_ms2 sand_tm22_ms2 sos_lcd_33451 randomdelay 12 endevent

event 62253-b-g1 multiple 300 none sandomierz_b_s7 sandomierz_g1_s9 randomdelay 30 endevent

event 2620-wyjazd-sem1 multiple 90 none sandomierz_n_s9 2620-wyjazd-sem2 endevent

event 2620-wyjazd-sem2 multiple 5 none sandomierz_n_s7 sandomierz_f2_s6 randomdelay 20 endevent

event tor1443:event2 putvalues 5 none 1.0 1.0 1.0 Timetable:linia053_wrzosy/rj_2620/roj23451 -0.1 0 endevent 

node -1 0 422119_pawlon eventlauncher 1.0 1.0 1.0 -1 none 0930 422119_przeloty none end

event 422119_przeloty multiple 0 none posterunek1_b_s2 posterunek2_b_s2 przejazd09_zamykaj randomdelay 120 endevent 

event 2620_prz_skwarki multiple 240 none przejazd43_zamykaj skwarki_d_s2 endevent 

event tor1104:event1 multiple 5 none
losujze_ruch ze_ruch
endevent 

node -1 0 memze_ruch memcell 1.0 1.0 1.0 * 0 0 none endmemcell
 event upze_ruch updatevalues 0.0 memze_ruch * 1 1 endevent
 event losujze_ruch multiple 0.0 none upze_ruch condition probability 0.3 endevent
 event ze_ruch multiple 200.0 none mul1ze_ruch mul2ze_ruch randomdelay 20 endevent
 event mul1ze_ruch multiple 0.0 memze_ruch 422119_krzyzowanie manewry1_zerniki condition memcompare * 0 0 endevent //70%, przelot
 event mul2ze_ruch multiple 0.0 memze_ruch 422119_wjazd manewry1_zerniki condition memcompare * 1 1 endevent //30%, stoimy i czekamy aż wjedzie towar

event 422119_krzyzowanie multiple 0 none
przejazd11_zamykaj zerniki_n_s2 zerniki_e_s2 //przelot dla 2620
endevent

event 422119_wjazd multiple 0 none 
test_zwr01_old- test_zwr02_old- test_zwr04a- test_zwr06_old- zerniki_b_s13 //wjazd dla 422119 na bok
zerniki_n_s5 przejazd11_zamykaj //wjazd dla 2620
endevent

event tor0808:event2 multiple 10 memze_ruch //pojedzie 422119 jeśli nie dostał wjazdu
test_zwr01_old- test_zwr02_old- test_zwr04a- test_zwr06_old- zerniki_b_s13
condition memcompare * 0 0 endevent

event tor0799:event1 multiple 30 memze_ruch //pojedzie 2620 jeśli nie dostał przelotu
test_zwr01_old+ test_zwr02_old+ test_zwr04a+ test_zwr06_old+ zerniki_e_s2 
condition memcompare * 1 1 endevent

event manewry1_zerniki multiple 40 none
test_zwr08_old- zerniki_tm9_ms2
endevent

event tor0705:event2 multiple 0 none
6dg_sprz
manewry2_zerniki
endevent

event 6dg_sprz putvalues 0 none 1.0 1.0 1.0 Shunt -2 -3 endevent

event manewry2_zerniki multiple 30 none
test_zwr09_old- anglik_test9250ad zerniki_tm1_ms2
endevent

event tor0819:event2 multiple 5 none
losujpa_wygas
2620_posterunki
losujru_wyj
endevent

event 2620_posterunki multiple 10 none 2620_posterunek1 2620_posterunek2 randomdelay 30 endevent //przelot 2620, przez Z. Male i Pawłon

event 2620_posterunek1 multiple 5 none posterunek1_f_s2 endevent

event 2620_posterunek2 multiple 10 none posterunek2_d_s2 przejazd09_zamykaj endevent

node -1 0 62125_brzeziny eventlauncher 1.0 1.0 1.0 -1 none 0940 62125_przeloty none end

event 62125_przeloty multiple 30 none brzeziny_h_s2 odstep2b_s2 randomdelay 180 endevent //losowo 3 minuty spóźnienia 

node -1 0 mempa_wygas memcell 1.0 1.0 1.0 * 0 0 none endmemcell
 event uppa_wygas updatevalues 0.0 mempa_wygas * 1 1 endevent
 event losujpa_wygas multiple 0.0 none uppa_wygas condition probability 0.15 endevent
 event tor0952:event1 multiple 0.0 none mul1pa_wygas mul2pa_wygas endevent
 event mul1pa_wygas multiple 0.0 mempa_wygas  condition memcompare * 0 0 endevent //85% na S2
 event mul2pa_wygas multiple 10.0 mempa_wygas posterunek2_d-s5 posterunek1_f_s1 pa_podaj_sz1 condition memcompare * 1 1 endevent //15% na Sz
 
event pa_podaj_sz1 multiple 40 none posterunek1_f_sz1 randomdelay 12 endevent

event tor0496:event2 multiple 0 none
rudawa_b_s5
endevent

event tor0648:event1 multiple 20 none
upru_control_2
rudawa_m_s5
sprawdzenie_ru
randomdelay 15
endevent

event tor0448:event2 multiple 10 none
upru_control_1 
anglik18ad zwr50-
sprawdzenie_ru
62125_wyj_ru
endevent

event tor1670:event1 multiple 10 none
upru_control_3
ru_wyj_sz1_1
endevent

node -1 0 memru_wyj memcell 1.0 1.0 1.0 * 0 0 none endmemcell
 event upru_wyj updatevalues 0.0 memru_wyj * 1 1 endevent
 event losujru_wyj multiple 0.0 none upru_wyj condition probability 0.25 endevent 
 event mul1ru_wyj multiple 5.0 memru_wyj rudawa_e_s10 rudawa_e_w24 radio_wyj condition memcompare * 0 0 endevent //75% na S10
 event mul2ru_wyj multiple 0.0 memru_wyj ru_podaj_sz1 r3_rudawa3 condition memcompare * 1 1 endevent //25% na Sz

event ru_podaj_sz1 multiple 20 none rudawa_e_sz1 rudawa_e_w24 r3_rudawa5 randomdelay 12 endevent

event radio_wyj multiple 0 memru_control_3 r3_rudawa2 condition memcompare * 1 1 endevent

node -1 0 memru_control_1 memcell 1.0 1.0 1.0 * 0 0 none endmemcell
 event upru_control_1 updatevalues 0.0 memru_control_1 * 1 1 endevent
 
node -1 0 memru_control_2 memcell 1.0 1.0 1.0 * 0 0 none endmemcell
 event upru_control_2 updatevalues 0.0 memru_control_2 * 1 1 endevent

node -1 0 memru_control_3 memcell 1.0 1.0 1.0 * 0 0 none endmemcell
 event upru_control_3 updatevalues 0.0 memru_control_3 * 1 1 endevent

event sprawdzenie_ru multiple 0 none sprawdzenie_1_1 sprawdzenie_1_2 endevent //sprawdzenie, czy jedzie 2620

event sprawdzenie_1_1 multiple 0 memru_control_2  condition memcompare * 0 0 endevent
event sprawdzenie_1_2 multiple 0 memru_control_2 sprawdzenie_2_1 sprawdzenie_2_2 condition memcompare * 1 1 endevent //sprawdzenie, czy jedzie 62125

event sprawdzenie_2_1 multiple 0 memru_control_1 r3_rudawa1 condition memcompare * 0 0 endevent 
event sprawdzenie_2_2 multiple 0 memru_control_1 mul1ru_wyj 2620_prz_ru_1 ru_wyj_sz1_1 condition memcompare * 1 1 endevent

event 62125_wyj_ru multiple 40 none rudawa_j_s2 endevent

event 2620_prz_ru_1 multiple 0 memru_wyj ru_m_s4 condition memcompare * 0 0 endevent

event ru_m_s4 multiple 0 memru_control_3 rudawa_m_s4 r3_rudawa4 condition memcompare * 0 0 endevent //podanie pełnego przelotu przez Rudawe

event ru_wyj_sz1_1 multiple 0 memru_control_1 ru_wyj_sz1_2 condition memcompare * 1 1 endevent
event ru_wyj_sz1_2 multiple 0 memru_control_3 mul2ru_wyj condition memcompare * 1 1 endevent

event tor0427:event1 multiple 0 none
losujlimek_ruch
losujtunel_ruch
losujtunel_wyj_z_boku
endevent

node -1 0 memlimek_ruch memcell 1.0 1.0 1.0 * 0 0 none endmemcell
 event uplimek_ruch updatevalues 0.0 memlimek_ruch * 1 1 endevent
 event losujlimek_ruch multiple 0.0 none uplimek_ruch condition probability 0.3 endevent
 event tor0549:event1 multiple 0.0 none mul1limek_ruch mul2limek_ruch 2620_prz_brz  endevent
 event mul1limek_ruch multiple 0.0 memlimek_ruch limek_prz condition memcompare * 0 0 endevent //70% na S10
 event mul2limek_ruch multiple 0.0 memlimek_ruch limek_sz condition memcompare * 1 1 endevent //30% na Sz

event limek_prz multiple 0 none zwr100- zwr99- odstep02_e_s10 randomdelay 10 endevent
event limek_sz multiple 50 none zwr100- zwr99- odstep02_e_sz1 randomdelay 12 endevent

event 2620_prz_brz multiple 0 none
brzeziny_n_s2 brzeziny_f_s2 przejazd501_zamykaj
23502_wj_tunel
endevent

event 23502_wj_tunel multiple 180 memtunel_ruch tunel_m_s5 tos_lcd_23502 condition memcompare * 1 1 endevent //wjazd osobowego jeśli wjeżdżamy na tor 4

event tor0314:event2 multiple 0 none
tunel_ruch
losujpp_prz losujpp_wygas
losujkrap_prz
endevent

node -1 0 memtunel_ruch memcell 1.0 1.0 1.0 * 0 0 none endmemcell
 event uptunel_ruch updatevalues 0.0 memtunel_ruch * 1 1 endevent
 event losujtunel_ruch multiple 0.0 none uptunel_ruch condition probability 0.5 endevent
 event tunel_ruch multiple 30.0 none mul1tunel_ruch mul2tunel_ruch randomdelay 12 endevent
 event mul1tunel_ruch multiple 0.0 memtunel_ruch 2620_wj_tun_t2 r3_turow1 condition memcompare * 0 0 endevent //wjazd na tor 2
 event mul2tunel_ruch multiple 0.0 memtunel_ruch 2620_wj_tun_t4 r3_turow2 condition memcompare * 1 1 endevent //wjazd na tor 4

event 2620_wj_tun_t2 multiple 0 none zwr81- anglik14bc tunel_o_s13 tos_lcd_2620_p2t2 endevent

event 2620_wj_tun_t4 multiple 0 none zwr79- zwr78- tunel_o_s13 tos_lcd_2620_p3t4 endevent

event tor0094:event1 multiple 40 memtunel_ruch przejazd45_zamykaj tunel_wyj_prosto condition memcompare * 0 0 endevent

event tunel_wyj_prosto multiple 25 none tunel_e_s2 randomdelay 12 endevent

event tor0097:event1 multiple 0 memtunel_ruch tunel_manewry endevent

event tunel_manewry multiple 160 none zwr73- anglik11bc tunel_e_ms2 randomdelay 12 endevent

event tor0065:event2 multiple 10 memtunel_ruch przejazd45_zamykaj anglik11ad zwr73+ zwr72- tunel_wyj_z_boku condition memcompare * 1 1 endevent

node -1 0 memtunel_wyj_z_boku memcell 1.0 1.0 1.0 * 0 0 none endmemcell
 event uptunel_wyj_z_boku updatevalues 0.0 memtunel_wyj_z_boku * 1 1 endevent
 event losujtunel_wyj_z_boku multiple 0.0 none uptunel_wyj_z_boku condition probability 0.15 endevent
 event tunel_wyj_z_boku multiple 5.0 none mul1tunel_wyj_z_boku mul2tunel_wyj_z_boku endevent
 event mul1tunel_wyj_z_boku multiple 0.0 memtunel_wyj_z_boku tunel_f_s10 condition memcompare * 0 0 endevent
 event mul2tunel_wyj_z_boku multiple 0.0 memtunel_wyj_z_boku tunel_podaj_sz1 r3_turow3 r5_turow3 condition memcompare * 1 1 endevent
 
event tunel_podaj_sz1 multiple 10 none tunel_f_sz1 randomdelay 20 endevent

//Psie Pole: wjazd na prosto lub na bok
node -1 0 mempp_prz memcell 1.0 1.0 1.0 * 0 0 none endmemcell
 event uppp_prz updatevalues 0.0 mempp_prz * 1 1 endevent
 event losujpp_prz multiple 0.0 none uppp_prz condition probability 0.2 endevent
 event tor0062:event1 multiple 180.0 none mul1pp_prz mul2pp_prz przejazd06_zamykaj przejazd05_zamykaj randomdelay 20 endevent
 event mul1pp_prz multiple 0.0 mempp_prz psiepole_k_s2 psiepole_e_s2 condition memcompare * 0 0 endevent //80% po właściwym
 event mul2pp_prz multiple 0.0 mempp_prz psiepole_k_s10 psiepole_d_s2 psiepole_d_w24  test_zwr08- test_zwr07_1- condition memcompare * 1 1 endevent //20% po niewłaściwym

  //komorka dla swoszowic:
node -1 0 mem_swo memcell 1 1 1 swo 0 0 none endmemcell
event swo_up1 updatevalues 0.0 mem_swo * * 1 endevent //wartość * * 1 jeśli jedziemy po prawym
  
  
event tor2890:event1 multiple 15 none przejazd44_zamykaj pp-sw-p odstep_c_s2 swo_up1 losujswo1_wyj losujkrap_wygas 62255_wyj_debica endevent //prawy
event tor2751:event1 multiple 15 none przejazd44_zamykaj pp-sw-n odstep_c_s5 losujswo1_wyj losujkrap_wygas 62255_wyj_debica endevent //lewy
   
//prawy:
event pp-sw-p multiple 10 none 
swoszowice_o_s2 swoszowice_e_s5 ic_53151_go
randomdelay 35 endevent
      
event ic_53151_go multiple 17 none
swoszowice_b_s2 swoszowice_k_s2 swoszzwr03+ swoszzwr04+ 
randomdelay 20 endevent

event ic_53151_go_2 multiple 3 none
swoszowice_b_s2 swoszowice_k_s2 swoszzwr03+ swoszzwr04+ r5_sw2b 
randomdelay 5 endevent	  
   
//lewy:
event pp-sw-n multiple 10 none
swoszowice_n_s5 swoszzwr03- swoszzwr04- swo1_wyj 
randomdelay 35 endevent   
   
//losowanie wyjazdu z Swo (semafor S13 lub zastępczy)
node -1 0 memswo1_wyj memcell 1.0 1.0 1.0 * 0 0 none endmemcell
 event upswo1_wyj updatevalues 0.0 memswo1_wyj * 1 1 endevent
 event losujswo1_wyj multiple 0.0 none upswo1_wyj condition probability 0.15 endevent
 event swo1_wyj multiple 0.0 none mul1swo1_wyj mul2swo1_wyj randomdelay 35 endevent
 event mul1swo1_wyj multiple 0.0 memswo1_wyj swoszowice_n_s4 swoszowice_d_s13 condition memcompare * 0 0 endevent
 event mul2swo1_wyj multiple 0.0 memswo1_wyj swo1_sz1 condition memcompare * 1 1 endevent
 
 event swo1_sz1 multiple 30 none swoszowice_d_sz1 randomdelay 12 endevent

event tor2366:event1 multiple 15 mem_swo ic_53151_go_2 condition memcompare * * 0 endevent

//podg. Krapikowik losowe wygaszenie semafora 15% szansy

event tor2325:event1 multiple 15 none mul1krap_prz losujdebica_wjazd endevent
event tor2324:event1 multiple 90 none mul1krap_prz losujdebica_wjazd endevent

event tor2246:event1 multiple 20 none mul2krap_prz endevent

node -1 0 memkrap_prz memcell 1.0 1.0 1.0 * 0 0 none endmemcell
 event upkrap_prz updatevalues 0.0 memkrap_prz * 1 1 endevent
 event losujkrap_prz multiple 0.0 none upkrap_prz condition probability 0.1 endevent
 event mul1krap_prz multiple 0.0 memkrap_prz odstep_e_s2 wyj_swo_1 r5_krap2 condition memcompare * 0 0 endevent //90% normalnie
 event mul2krap_prz multiple 0.0 memkrap_prz r5_krap1 kr_do_dt condition memcompare * 1 1 endevent //10% objazdem

 event kr_do_dt multiple 85 none
 odszwr18- odszwr02- odstep_e_s10
 endevent
 
 event wyj_swo_1 multiple 0 mem_swo wyj_swo_2 condition memcompare * * 1 endevent
 event wyj_swo_2 multiple 0 memkrap_prz swoszowice_e_s2 condition * 0 0 endevent
   
node -1 0 memkrap_wygas memcell 1.0 1.0 1.0 * 0 0 none endmemcell
 event upkrap_wygas updatevalues 0.0 memkrap_wygas * 1 1 endevent
 event losujkrap_wygas multiple 0.0 none upkrap_wygas condition probability 0.15 endevent
 event tor2361:event1 multiple 5.0 none mul1krap_wygas mul2krap_wygas endevent
 event mul1krap_wygas multiple 0.0 memkrap_wygas  condition memcompare * 0 0 endevent
 event mul2krap_wygas multiple 0.0 memkrap_wygas odstep_e_s1 krap_mrugaj r5_krap3 condition memcompare * 1 1 endevent
 
 event krap_mrugaj multiple 10 memkrap_prz odstep_e_sz1 condition memcompare * 0 0 endevent

node -1 0 323407_dtowarowa eventlauncher 1.0 1.0 1.0 -1 none 1005 323407_dt none end

event 323407_dt multiple 0 none 323407_dt_na_bok 323407_dt_prz randomdelay 30 endevent

event 323407_dt_prz multiple 0 memkrap_prz dtowarowa_n_s2 dtow_d_s2 condition memcompare * 0 0 endevent
event 323407_dt_na_bok multiple 0 memkrap_prz andebtow07bc andebtow05ad dtowarowa_n_s13 condition memcompare * 1 1 endevent

event tor2534:event1 multiple 20 none andebtow07ac andebtow05ac dtowarowa_n_s5 randomdelay 20 endevent

event tor2555:event1 multiple 0 none andebtow02ad przejazdt1_zamykaj dtowarowa_a_s13 endevent

event tor2460:event2 multiple 15 none andebtow02ac przejazdt1_zamykaj dtow_d_s2 randomdelay 12 endevent

event 62255_wyj_debica multiple 0 none 62255_wyj_do_kr 62255_wyj_do_dt randomdelay 30 endevent
 
event 62255_wyj_do_kr multiple 20 memkrap_prz debica_l_s2 condition memcompare * 0 0 endevent
event 62255_wyj_do_dt multiple 300 memkrap_prz zwr020- zwr019- zwr018- zwr014- debica_l_s10 condition memcompare * 1 1 endevent

 //Debica Osobowa: wjazd na tor nr 1 lub 2:
node -1 0 memdebica_wjazd memcell 1.0 1.0 1.0 * 0 0 none endmemcell
 event updebica_wjazd updatevalues 0.0 memdebica_wjazd * 1 1 endevent
 event losujdebica_wjazd multiple 0.0 none updebica_wjazd condition probability 0.5 endevent
 event tor2150:event1 multiple 0.0 memkrap_prz mul1debica_wjazd mul2debica_wjazd db_wjazd_kontenery randomdelay 20 condition memcompare * 0 0 endevent
 event tor2143:event1 multiple 0.0 memkrap_prz mul1debica_wjazd_obj mul2debica_wjazd_obj randomdelay 20 condition memcompare * 1 1 endevent
 event mul1debica_wjazd multiple 0.0 memdebica_wjazd debica_nawprost condition memcompare * 0 0 endevent	//express na wprost:	* 0 0
 event mul2debica_wjazd multiple 0.0 memdebica_wjazd debica_nabok condition memcompare * 1 1 endevent	//express na bok: 		* 1 1
 event mul1debica_wjazd_obj multiple 0.0 memdebica_wjazd debica_nawprost_obj condition memcompare * 0 0 endevent	//express na wprost:	* 0 0
 event mul2debica_wjazd_obj multiple 0.0 memdebica_wjazd debica_nabok_obj condition memcompare * 1 1 endevent	//express na bok: 		* 1 1
 
 event debica_nawprost multiple 6 memkrap_prz 
 debica_p_s5
 condition memcompare * 0 0 endevent
 
 event debica_nabok multiple 6 memkrap_prz 
 zwr019- zwr020- zwr015+ debica_p_s13 
 condition memcompare * 0 0 endevent
 
 event debica_nawprost_obj multiple 10 memkrap_prz
 zwr019+ zwr020+ debica_o_s13 
 condition memcompare * 1 1 endevent

 event debica_nabok_obj multiple 10 memkrap_prz
 debica_o_s13
 condition memcompare * 1 1 endevent
 
 event db_wjazd_kontenery multiple 0 none
 test_zwr26- rkpd_tpd-oil2bd test_zwr29+ debica_o_s13 
 endevent
 
 //Lokalizacja pociągu expresowego
 //Express_Prosto:
 event tor2008:event1 multiple 0 none 62100_wjazd endevent
 
 //Express_Bok:
 event tor2014:event2 multiple 0 none 62100_wjazd endevent
 
 event 62100_wjazd multiple 5 none
 62100_prosto 		//62100 jedzie na wprost, express tez na wprost
 62100_bok 			//62100 jedzie na bok, express na bok
 endevent
 
 event 62100_prosto multiple 0 memdebica_wjazd 
 debica_b_s5
 condition me 	mcompare * 0 0 endevent
 
 event 62100_bok multiple 0 memdebica_wjazd 
 debica_b_s13 test_zwr43- test_zwr48- test_zwr31- test_zwr32- dos_lcd_62100 
 condition memcompare * 1 1 endevent
 
 //wyjazd: po wjeździe 62100
 event tor2040:event1 multiple 70 none
 db_normal
 db_objazd
 losujwrzosy_przelot
 endevent

 event db_normal multiple 10 memkrap_prz
 db_wyj_posp_bok
 db_wyj_posp_prosto
 db_wyj_exp_bok 
 db_wyj_exp_prosto
 condition memcompare * 0 0 endevent
 
 event db_objazd multiple 10 memkrap_prz
 db_wyj_posp_bok_obj
 db_wyj_posp_prosto_obj
 db_wyj_exp_bok 
 db_wyj_exp_prosto
 condition memcompare * 1 1 endevent

 //Normalnie:

 //Obydwa na boku: 		* 1	1
 event db_wyj_posp_bok multiple 10 memdebica_wjazd
 debica_m_s10 zwr033- zwr030- zwr015- zwr020+ zwr019+ 
 condition memcompare * 1 1 endevent
 
 event db_wyj_exp_bok multiple 10 memdebica_wjazd
 debica_c_s2 debica_c_w24 test_zwr43+ test_zwr52+ 
 condition memcompare * 1 1 endevent
 
//Obydwa na wprost:		* 0 0
 event db_wyj_posp_prosto multiple 10 memdebica_wjazd
 debica_l_s2 zwr015+ zwr020+ zwr019+ 
 condition memcompare * 0 0 endevent
 
 event db_wyj_exp_prosto multiple 20 memdebica_wjazd
 debica_d_s10 debica_d_w24 zwr052+ zwr053- zwr050- test_zwr54+ 
 condition memcompare * 0 0 endevent

 //Objazdem:
 
 //Pośpieszny na wprost:
 event db_wyj_posp_prosto_obj multiple 20 memdebica_wjazd 
 debica_l_s10 zwr020- zwr019-
 condition memcompare * 0 0 endevent
 
 //Pośpieszny na boku:
 event db_wyj_posp_bok_obj multiple 20 memdebica_wjazd 
 debica_m_s10 zwr033- zwr030- zwr015- 
 condition memcompare * 1 1 endevent

//Wrzosy: przelot z wjazdem na sem lub sz1
 node -1 0 memwrzosy_przelot memcell 1.0 1.0 1.0 * 0 0 none endmemcell
 event upwrzosy_przelot updatevalues 0.0 memwrzosy_przelot * 1 1 endevent
 event losujwrzosy_przelot multiple 0.0 none upwrzosy_przelot condition probability 0.3 endevent
 event wrzosy_przelot multiple 0.0 none mul1wrzosy_przelot mul2wrzosy_przelot endevent
 event mul1wrzosy_przelot multiple 0.0 memwrzosy_przelot ter_b_s10 ter_l_s2 condition memcompare * 0 0 endevent
 event mul2wrzosy_przelot multiple 0.0 memwrzosy_przelot wrzosy_sz1 ter_l_s2 condition memcompare * 1 1 endevent
 
 event wrzosy_sz1 multiple 15 none r2_wrzosy1 wrz_mrugaj endevent
 event wrz_mrugaj multiple 5 none ter_b_sz1 randomdelay 20 endevent
 
 event tor4162:event2 multiple 0 none 
 t_zwr1- t_zwr003- t_zwr005+ man1_wrzosy
 wrzosy_przelot 560120_ryc_hip
 randomdelay 10 endevent
 
 event man1_wrzosy multiple 10 none
 ter_tm9_ms2 wk_1o t_zwr016- wk_2o t_zwr011- man1_wrzosy_stop endevent
 event man1_wrzosy_stop trackvel 0 track_wr126 0 endevent
 
 event wrz_tor140:event1 multiple 10 none
 t_zwr1+ t_zwr003+ t_zwr005+ ter_h_s2 
 hipolit_a_s2
 losujkujacin_wygas
 randomdelay 15 endevent
 
 event 560120_ryc_hip multiple 0 none 
 ryciny_d_s2 hipolit_c_s2
 endevent
  
  //Ryciny:
 event wrz_tor1180:event2 multiple 0 none ryciny_a_s5 ryciny_semy_dalej randomdelay 20 endevent
 
 event ryciny_semy_dalej multiple 5 none ryciny_k_s2 ryciny_a_s2 kujacin_a_s2 kujacin_h_s2 ic_ruszaj randomdelay 12 endevent
 
 //Kujacin: losowe wygaśnięcie semafora 5%
 event wrz_tor1693:event2 multiple 5 none kujacin_wygas endevent
 
 node -1 0 memkujacin_wygas memcell 1.0 1.0 1.0 * 0 0 none endmemcell
 event upkujacin_wygas updatevalues 0.0 memkujacin_wygas * 1 1 endevent
 event losujkujacin_wygas multiple 0.0 none upkujacin_wygas condition probability 0.05 endevent
 event kujacin_wygas multiple 0.0 none mul1kujacin_wygas mul2kujacin_wygas endevent
 event mul1kujacin_wygas multiple 0.0 memkujacin_wygas r2_kuj1 condition memcompare * 0 0 endevent 			//nie wygasza
 event mul2kujacin_wygas multiple 0.0 memkujacin_wygas kujacin_a_s1 kuj_mrugaj condition memcompare * 1 1 endevent		//wygasza wjazd 5% szanzy
 
 event kuj_mrugaj multiple 10 none kujacin_a_sz1 randomdelay 25 endevent
 
 event ic_ruszaj multiple 45 none je_l2_s2 kujacin_s_s5 endevent

 //Jerzynianka: jazda na wprost lub bokiem (bo SM42 manewruje z roboczym)
event wrz_tor2338:event2 multiple 5 none losujje_wjazd je_wjazd endevent

event je_sm42_roboczy_ruszaj multiple 30 none
je_t_ms2 je_43- je_44- je_man1_update endevent

event je_man1_update trackvel 0 wrz_tor2998 0 endevent //zatrzymanie na rozjazdach poc. ROB

node -1 0 memje_wjazd memcell 1.0 1.0 1.0 * 0 0 none endmemcell
 event upje_wjazd updatevalues 0.0 memje_wjazd * 1 1 endevent
 event losujje_wjazd multiple 0.0 none upje_wjazd condition probability 0.6 endevent
 event je_wjazd multiple 5.0 none mul1je_wjazd mul2je_wjazd ir_go_nowaruda 69404_nu_rak randomdelay 10 endevent
 event mul1je_wjazd multiple 0.0 memje_wjazd je_prosto condition memcompare * 0 0 endevent 					   //prosto 40%
 event mul2je_wjazd multiple 0.0 memje_wjazd je_bok je_sm42_roboczy_ruszaj condition memcompare * 1 1 endevent //bok 60%
 
 event je_prosto multiple 0 none
 je_e_s2 je_u_s5 je_24+ je_37+ je_45+ endevent
 
 event je_bok multiple 0 none
 je_e_s13 je_1- je_2- je_5+ je_6+ je_9- je_8- je_14+ je_13- je_12- losujje_bok_dalej 
 je_34+ je_35+ je_33+ je_39+ je_58+ je_47+  endevent
 
 
 //Dalej BOK: drogowskaz na S5 lub Sz1
node -1 0 memje_bok_dalej memcell 1.0 1.0 1.0 * 0 0 none endmemcell
 event upje_bok_dalej updatevalues 0.0 memje_bok_dalej * 1 1 endevent
 event losujje_bok_dalej multiple 0.0 none upje_bok_dalej condition probability 0.3 endevent
 event wrz_tor2683:event2 multiple 0.0 none mul1je_bok_dalej mul2je_bok_dalej randomdelay 15 endevent
 event mul1je_bok_dalej multiple 0.0 memje_bok_dalej je_r_s5 condition memcompare * 0 0 endevent			//70% na S5
 event mul2je_bok_dalej multiple 0.0 memje_bok_dalej je_bok_dalejsz condition memcompare * 1 1 endevent		//30% na sz
 
 event je_bok_dalejsz multiple 5 none je_r_sz1 endevent
 
 //Interregio: jak wjedzie to dopiero mamy wyjazd EIC2620
 event ir_go_nowaruda multiple 0 none
 nr_sklady_a_s2 nr_d_s2 endevent
 
 //Express na wprost - IR też na wprost:
 event wrz_tor3114:event1 multiple 20 none
 je_a_s5 je_53+ je_ex_wyj endevent
 
 event wrz_tor3036:event1 multiple 35 none
 je_ir_wyj randomdelay 30 endevent
 
 event je_ex_wyj multiple 30 none
 je_g4_s2 randomdelay 20 endevent
 
  event je_ir_wyj multiple 0 none
 je_j_s12 je_40+ je_38- je_37- je_24+ je_l3_s10 je_7- je_6- je_2+ randomdelay 2 endevent
 
 //Express na bok - IR też na bok
 event wrz_tor3081:event1 multiple 0 none je_a_s13 je_53- je_54- je_55- endevent
 event wrz_tor3162:event1 multiple 35 none je_ex_bok_wyj je_ir_bok_wyj randomdelay 30 endevent
 
 event je_ex_bok_wyj multiple 6 none je_g2_s10 je_54+ je_53- je_61- je_60- je_62+ je_63+
 randomdelay 10 endevent
 
 event je_ir_bok_wyj multiple 0 none je_h_s12 je_48- je_47- je_41+ je_33+ je_k2_s10 je_13- je_12- je_8- je_9- je_2+ je_1+ endevent
 
//Nowa Ruda: losowe wygaszenie semafora 25%, Rakowice - Nurzec - Mokra i wyjazd do Groszexu:
event track_wr550:event1 multiple 0 none nr_a_s10a nr_1- nr_2- nr_6- nr_101- randomdelay 20 endevent
 
event track_wr583:event2 multiple 10 none nr_a_uszk nr_sz1_dalej condition probability 0.25 endevent
event nr_sz1_dalej multiple 15 none nr_a_sz1 randomdelay 20 endevent

event track_wr639:event2 multiple 5 none rakowice_2+ rakowice_e_s2 rakowice_c_s2 randomdelay 10 endevent

event 1t_track045:event1 multiple 10 none rakowice_1- rakowice_b_s10 nr_e_s10a 2620_wj_nu endevent //wyjazd dla 69404 i wjazd do Nurzca 

event 69404_nu_rak multiple 0 none nurzec_r1- nu_d_sr3 rakowice_2- ra rakowice_f_s13 endevent

event 2620_wj_nu multiple 60 none nurzec_r1+ nu_a_sr2 nu_spa_sp2 nu_toa_os2 randomdelay 20 endevent

node -1 0 go_eszelon eventlauncher 1.0 1.0 1.0 -1 none 1055 eszelon_go none end

event eszelon_go multiple 0 none m_c_s2 nu_b_sr3 nu_spb_sp4 nu_tob_os4 nu_toe_os1 nurzec_r4- nu_tof_os1 endevent //eszelon wjezdza na bok

event 1t_track223i4-izo:free multiple 17 none //eszelon wjechał, jedziemy z Nurzca do Mokrej
nurzec_r4+ nurzec_r3+ nu_f_sr2 nu_tof_os2
randomdelay 20 endevent

event 1t_track288:event2 multiple 10 none //przelot przez Mokrą
m_a_s2 m_f_s2
randomdelay 20 endevent

event 1t_track448:event2 multiple 5 none groszex_a_s2 groszex_r1+ groszex_r2+ 	//wjazd Grx
randomdelay 12 endevent

//Arkadia i Dalej do Wolicy:
event 1t_track605:event2 multiple 0 none zdroj_c_s2 losujarkadia_ruch losujwolica_wjazd randomdelay 20 endevent  //24000 rusza ze zdrojowej jak dojezdzamy do Bytnicy

//Albo my pierwsi albo 24000 pierwszy
node -1 0 memarkadia_ruch memcell 1.0 1.0 1.0 * 0 0 none endmemcell
 event uparkadia_ruch updatevalues 0.0 memarkadia_ruch * 1 1 endevent
 event losujarkadia_ruch multiple 0.0 none uparkadia_ruch condition probability 0.3 endevent
 event 1t_track615:event2 multiple 20.0 none mul1arkadia_ruch mul2arkadia_ruch zdroj_a_s2 randomdelay 30 endevent
 event mul1arkadia_ruch multiple 0.0 memarkadia_ruch 24000_krzyzowanie condition memcompare * 0 0 endevent		//pospieszny stoi 70%
 event mul2arkadia_ruch multiple 0.0 memarkadia_ruch 24000_przelot condition memcompare * 1 1 endevent			//express stoi 30%

event 24000_przelot multiple 0 none //przelot od razu dla TLK24000 od Zdrojowej do Portalu
ar_e_s2 arkadia_z2+ arkadia_z1+ dek_f_s2 do_portalu- endevent

event 24000_krzyzowanie multiple 0 none //droga dla EIC2620 + wjezdza TLK24000 ze Zdrojowej
ar_c_s10a
arkadia_z2- arkadia_z1- arkadia_z4- arkadia_z5- 
endevent

//Ruch po przejeździe pociągów:
event arkadia023:event2 multiple 8 memarkadia_ruch  //pojedzie 24000 jeśli wcześniej nie dostał przelotu
ar_e_s2 arkadia_z2+ arkadia_z1+ arkadia_z4+ arkadia_z5+ dek_f_s2 do_portalu- 
condition memcompare * 0 0 endevent

event arkadia004:event2 multiple 15 memarkadia_ruch	//pojedzie 2620 jeśli wcześniej nie dostał przelotu
ar_c_s10a
arkadia_z2- arkadia_z1- arkadia_z4- arkadia_z5-
condition memcompare * 1 1 endevent

event final_2t008:event2 multiple 0 none //wyjazd dla KS63804 do Zdrojowej
wp_c_s2 63804_semy_dalej 
randomdelay 20 endevent

event 63804_semy_dalej multiple 180 none //droga dla KS43804 od Zdrojowej do Mokrej
ar_e_s10a arkadia_z2- arkadia_z1- arkadia_z4+ arkadia_z5+ zdroj_c_s2
endevent 

//Wolica: wjazd na wprost lub wjazd na bok

event final_2t341:event2 multiple 0 none
wp_a_s9 wolica_zwr1+ wolica_zwr2+ losujwolica_wjazd randomdelay 25 endevent

event final_2t400:event2 multiple 0 none wolica_wjazd 5400_wyjazd randomdelay 12 endevent

//Droga dla EIC5400 od WoA do Arkadii:
event 5400_wyjazd multiple 300 none
wolica_p_s2 wob_f_s2 wp_c_s2 zdroj_c_s2 46120_potok_woa 
randomdelay 25 endevent

node -1 0 memwolica_wjazd memcell 1.0 1.0 1.0 * 0 0 none endmemcell
 event upwolica_wjazd updatevalues 0.0 memwolica_wjazd * 1 1 endevent
 event losujwolica_wjazd multiple 0.0 none upwolica_wjazd condition probability 0.4 endevent
 event wolica_wjazd multiple 0.0 none mul1wolica_wjazd mul2wolica_wjazd endevent
 event mul1wolica_wjazd multiple 0.0 memwolica_wjazd wol_nabok_1 r1_wolica1 condition memcompare * 0 0 endevent
 event mul2wolica_wjazd multiple 0.0 memwolica_wjazd wol_nabok_2 r1_wolica2 condition memcompare * 1 1 endevent
  
//Wjazd na wprost i potem na tor 5:
event wol_nabok_1 multiple 0 none
woa_zwr101- wp_a_s2 wp_wyg_pas wob_a_s4 wob_m_s13a
endevent

//Wjazd na wprost i potem na tor 4:
event wol_nabok_2 multiple 0 none 
woa_zwr101- woa_zwr113- woa_zwr114- wp_a_s2 wp_wyg_pas wob_a_s4 wob_m_s13
endevent

event wp_wyg_pas lights 0 wp_as 0 0 0 0 endevent

event final_2t721:event2 multiple 0 none r1_wolica3 endevent

//Kontrola manewrów:
node -1 0 mem2620_w_peronach memcell 1.0 1.0 1.0 * 0 0 none endmemcell
 event up2620_w_peronach updatevalues 20.0 mem2620_w_peronach * 1 1 endevent

event woa_peron067:event2 multiple 60 mem2620_w_peronach manewry_wolica_z_5 up2620_w_peronach condition memcompare * 0 0 endevent
event woa_peron078:event2 multiple 60 mem2620_w_peronach manewry_wolica_z_4 up2620_w_peronach condition memcompare * 0 0 endevent

event manewry_wolica_z_5 multiple 0 memwolica_wjazd odl_sprz 2620_manewry_z_5 condition memcompare * 0 0 endevent
event manewry_wolica_z_4 multiple 0 memwolica_wjazd odl_sprz 2620_manewry_z_4 condition memcompare * 1 1 endevent 

event odl_sprz putvalues 0 none 1.0 1.0 1.0 Shunt 0 0 endevent

event 2620_manewry_z_5 multiple 15 none woa_zwr117- wolica_s2_ms2 stonka_po_wagony randomdelay 12 endevent
event 2620_manewry_z_4 multiple 15 none woa_zwr119- woa_zwr118- woa_zwr117- wolica_t4_ms2 stonka_po_wagony randomdelay 12 endevent

event stonka_po_wagony multiple 30 none woa_wk2o woa_zwr112- woa_depo_tm103_ms2 randomdelay 12 endevent

event 46120_potok_woa multiple 60 none potok_d_s2 woa_z1_s5 endevent

event final_2t862:event1 multiple 0 none zm_kab 2620_po_4_5 endevent

event zm_kab putvalues 0 none 1.0 1.0 1.0 Change_direction 0 0 endevent

event 2620_po_4_5 multiple 15 none 2620_po_4 2620_po_5 randomdelay 12 endevent

event 2620_po_4 multiple 0 memwolica_wjazd woa_zwr118- woa_zwr119- woa_tm33_ms2 condition memcompare * 0 0 endevent 
event 2620_po_5 multiple 0 memwolica_wjazd woa_zwr118+ woa_zwr119+ woa_tm33_ms2 condition memcompare * 1 1 endevent

event woa_tory022:event2 multiple 0 mem2620_w_peronach stonka_sprz 69411_manewry condition memcompare * 1 1 endevent
event woa_tory023:event2 multiple 0 mem2620_w_peronach stonka_sprz 69411_manewry condition memcompare * 1 1 endevent

event stonka_sprz putvalues 0 none 1.0 1.0 1.0 Shunt -2 -3 endevent
 
event 69411_manewry multiple 10 none lokom_zwr108- woa_wk2o woa_zwr112- woa_zwr113- woa_zwr114+ woa_depo_tm107_ms2 woa_depo_tm103_ms2 losujlok_manewry endevent

event woa_peron091:event2 multiple 0 none 69411_rozklad woa_manewry endevent

event 69411_rozklad putvalues 15 none 1.0 1.0 1.0 Timetable:linia053_wrzosy/rj_2620/roj69411 -0.1 0 endevent

node -1 0 memwoa_manewry memcell 1.0 1.0 1.0 * 0 0 none endmemcell
 event upwoa_manewry updatevalues 0.0 memwoa_manewry * 1 1 endevent
 event losujwoa_manewry multiple 0.0 none upwoa_manewry condition probability 0.5 endevent
 event woa_manewry multiple 0.0 none mul1woa_manewry mul2woa_manewry endevent
 event mul1woa_manewry multiple 0.0 memwoa_manewry lok_manewry condition memcompare * 0 0 endevent //50% my pierwsi na depo
 event mul2woa_manewry multiple 0.0 memwoa_manewry wagony_na_depo condition memcompare * 1 1 endevent //50% manewrówka z wagonami pierwsza na depo 

event lok_woa012:event2 multiple 10 memwoa_manewry wagony_na_depo condition memcompare * 0 0 endevent //pojedzie manewrówka po nas

event woa_odst015:event1 multiple 0 memwoa_manewry lok_manewry condition memcompare * 1 1 endevent //pojedziemy po manewrówce

event lok_manewry multiple 5 none lok_z_4 lok_z_5 randomdelay 12 endevent

event lok_z_4 multiple 0 memwolica_wjazd woa_zwr114- woa_zwr113- woa_zwr112- woa_wk2o lokom_zwr108- lokom_zwr1- lokom_zwr101+ wolica_t1_ms2 woa_depo_tm102_ms2 woa_depo_tm109_ms2 r1_wolica4 condition memcompare * 0 0 endevent
event lok_z_5 multiple 0 memwolica_wjazd woa_zwr114- woa_zwr113+ woa_zwr112- woa_wk2o lokom_zwr108- lokom_zwr1- lokom_zwr101+ wolica_s_ms2 woa_depo_tm102_ms2 woa_depo_tm109_ms2 r1_wolica4 condition memcompare * 1 1 endevent

event wagony_na_depo multiple 0 none wagony_na_depo_z_5 wagony_na_depo_z_4 randomdelay 12 endevent

event wagony_na_depo_z_5 multiple 0 memwolica_wjazd woa_zwr113+ woa_zwr112- woa_wk2o lokom_zwr108- lokom_zwr1- lokom_zwr101- wolica_s_ms2 woa_depo_tm102_ms2 woa_depo_tm109_ms2 r1_wolica5 condition memcompare * 0 0 endevent
event wagony_na_depo_z_4 multiple 0 memwolica_wjazd woa_zwr114- woa_zwr113- woa_zwr112- woa_wk2o lokom_zwr108- lokom_zwr1- lokom_zwr101- wolica_t1_ms2 woa_depo_tm102_ms2 woa_depo_tm109_ms2 r1_wolica5 condition memcompare * 1 1 endevent

event woa_odst010:event1 multiple 0 none stonka_odl_sprz endevent

event stonka_odl_sprz putvalues 0 none 1.0 1.0 1.0 Shunt 0 0 endevent

event final_2t833:event2 multiple 10 memwoa_manewry woa_wk2z condition memcompare * 0 0 endevent

event lok_woa039:event2 multiple 0 memwoa_manewry woa_wk2z r1_wolica6 endevent