Changes for page Basic design
Last modified by nfl on 2025/01/30 12:05
Summary
-
Page properties (2 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. krat1 +XWiki.sna - Content
-
... ... @@ -43,894 +43,511 @@ 43 43 44 44 The train controller is composed of several //Station-2-Station// controllers. These are combined to form a complete schedule. Additionally, the cleanup signal has to be watched to abort the schedule and return back to the initial position. 45 45 46 -== St ation-2-Stationcontroller==46 +=== Structure === 47 47 48 -Each Station-2-Station controller realizes the movement from one of the stations (IC,OC,KH) to another station. All controllers using IC or OC parts have to respect the traveling directions. For the Kicking Horse Pass two separate controllers, forwards and backwards, are used. 48 +{{code linenumbers="true" language="sct"}} 49 +// 50 +// Structure of a train controller based on test case 2 51 +// 52 +scchart Test2 "Test of IC_JCT" { 53 +  // Set of request variables for all tracks for 11 trains 54 + bool IC_JCT_0_req[11], IC_LN_0_req[11], IC_LN_1_req[11], IC_LN_2_req[11]; 55 + bool IC_LN_3_req[11], IC_LN_4_req[11], IC_LN_5_req[11], IC_ST_0_req[11]; 56 + bool IC_ST_1_req[11], IC_ST_2_req[11], IC_ST_3_req[11], IC_ST_4_req[11]; 57 + bool IO_LN_0_req[11], IO_LN_1_req[11], IO_LN_2_req[11], KH_LN_0_req[11]; 58 + bool KH_LN_1_req[11], KH_LN_2_req[11], KH_LN_3_req[11], KH_LN_4_req[11]; 59 + bool KH_LN_5_req[11], KH_LN_6_req[11], KH_LN_7_req[11], KH_LN_8_req[11]; 60 + bool KH_ST_0_req[11], KH_ST_1_req[11], KH_ST_2_req[11], KH_ST_3_req[11]; 61 + bool KH_ST_4_req[11], KH_ST_5_req[11], KH_ST_6_req[11], KIO_LN_0_req[11]; 62 + bool KIO_LN_1_req[11], OC_JCT_0_req[11], OC_LN_0_req[11], OC_LN_1_req[11]; 63 + bool OC_LN_2_req[11], OC_LN_3_req[11], OC_LN_4_req[11], OC_LN_5_req[11]; 64 + bool OC_ST_0_req[11], OC_ST_1_req[11], OC_ST_2_req[11], OC_ST_3_req[11]; 65 + bool OC_ST_4_req[11], OI_LN_0_req[11], OI_LN_1_req[11], OI_LN_2_req[11]; 49 49 50 -The controllers starting from Kicking Horse Pass Station make an assumption of the direction of the train. These are dependent on the directions of the inner or outer circle, e.g. the KHIC controller starts backwards because this is the only valid direction to travel this path. To drive a train from the Kicking Horse Station (facing forward) to the Inner Circle we have to combine the KHOC and OCIC controllers. 67 + // Set of permission variables for all tracks 68 +  bool req_in_R, req_out_R, req_in_L, req_out_L, perm_in_R, perm_out_R, perm_in_L, perm_out_L; 69 + int IC_JCT_0_perm, IC_LN_0_perm, IC_LN_1_perm, IC_LN_2_perm; 70 + int IC_LN_3_perm, IC_LN_4_perm, IC_LN_5_perm, IC_ST_0_perm; 71 + int IC_ST_1_perm, IC_ST_2_perm, IC_ST_3_perm, IC_ST_4_perm; 72 + int IO_LN_0_perm, IO_LN_1_perm, IO_LN_2_perm, KH_LN_0_perm; 73 + int KH_LN_1_perm, KH_LN_2_perm, KH_LN_3_perm, KH_LN_4_perm; 74 + int KH_LN_5_perm, KH_LN_6_perm, KH_LN_7_perm, KH_LN_8_perm; 75 + int KH_ST_0_perm, KH_ST_1_perm, KH_ST_2_perm, KH_ST_3_perm; 76 + int KH_ST_4_perm, KH_ST_5_perm, KH_ST_6_perm, KIO_LN_0_perm; 77 + int KIO_LN_1_perm, OC_JCT_0_perm, OC_LN_0_perm, OC_LN_1_perm; 78 + int OC_LN_2_perm, OC_LN_3_perm, OC_LN_4_perm, OC_LN_5_perm; 79 + int OC_ST_0_perm, OC_ST_1_perm, OC_ST_2_perm, OC_ST_3_perm; 80 + int OC_ST_4_perm, OI_LN_0_perm, OI_LN_1_perm, OI_LN_2_perm; 81 + 82 + // Debug flag for additional output 83 + bool debug = false; 84 + // Cleanup flag for halting the trains at home station tracks 85 +  bool cleanup = false; 86 +  // Variable, that gives the number of trains to C-Controller for stability check 87 + int trainCount; 88 + 89 + // Set of constants for binding to referenced SCCharts 90 + const int c_EINS = 1; 91 + const int c_ZWEI = 2; 92 + const int c_DREI = 3; 93 + const int c_VIER = 4; 94 + const int c_FUENF = 5; 95 + 96 + // State initializing the trains on corresponding tracks 97 + initial state init references initRailway11Trains 98 + --> run; 99 + 100 + // State handling the train schedules 101 + state run { 102 + // Regions handling the mutual exclusion on the track segments 103 + region Mutexes: 104 +  // State referenced to the MutexController for 11 Trains 105 + initial state Mutexes references mutexRailway11Trains; 106 + 107 + region KH_Mutexes: 108 +  // State referenced to additional MutexController for KH 109 + initial state KH_Mutexes references kh_mutex; 110 + 111 + // Regions that contain the schedules for individual trains 112 + //-------------------------------------------------------------------------------------- 51 51 52 -[[image:attach:ICIC.png]] 114 + // Region with schedule for train 4 115 + region Train4 : 116 +  // State with the schedule for train 4 117 + initial state train4 { 118 + 119 + // Annotation for replacing following constant in the hostcode of referenced SCChart 120 + @alterHostcode 121 + // Number of the train for identifying on track segments 122 + const int trainNum = 4; 123 +  // Variable specifying the track, where the train arrives at, 124 + // and for transmitting the track number to next Station-2-Station controller 125 + int arrivalTrack = 3; 126 + 127 + // Schedule of train 4: train drives only in the IC, should use station track 3 128 + // State Round referenced to ICIC Station-2-Station controller 129 + initial state Round references ICIC 130 + bind depTrack to arrivalTrack, 131 + destTrack to c_DREI, 132 + arrTrack to arrivalTrack 133 +  // Transition to checking state 134 + >-> Choice; 135 + 136 + // State for checking, when the train should halt and if the train is on corresponding track 137 + state Choice 138 + // Transition for driving additional circle, if cleanup = false or wrong track used 139 + --> Round with !cleanup | !(arrivalTrack == 3) 140 + // Transition to final state 141 + --> Done; 142 + 143 + final state Done; 144 + }; 53 53 54 -When arriving on a station the train controller **must** first call the function //void railArrival(int train, int station)//. This starts the waiting timer for the train. 55 -Next the train **must** wait for// int railDeparture(int train)// to return 1. 56 -After the waiting has finished the controller can reach a final state and pass the control back to the train controller. 57 57 58 -=== Structure  === 147 + // Region with schedule for train 5, identical to region above 148 +  region Train5 : 149 + initial state train5 { 150 + 151 + @alterHostcode 152 + const int trainNum = 5; 153 + int arrivalTrack = 2; 154 + 155 + initial state Round references ICIC 156 + bind depTrack to arrivalTrack, 157 + destTrack to c_ZWEI, 158 + arrTrack to arrivalTrack 159 + >-> Choice; 160 + 161 + state Choice 162 + --> Round with !cleanup | !(arrivalTrack == 2) 163 + --> Done; 164 + 165 + final state Done; 166 + 167 + }; 168 + 59 59 60 -|=((( 61 -{{{input int *_perm;}}} 170 + // Region with schedule for train 9, identical to region above 171 + region Train9 : 172 + initial state train9 { 173 + 174 + @alterHostcode 175 + const int trainNum = 9; 176 + int arrivalTrack = 1; 177 + 178 + initial state Round references ICIC 179 + bind depTrack to arrivalTrack, 180 + destTrack to c_EINS, 181 + arrTrack to arrivalTrack 182 + >-> Choice; 183 + 184 + state Choice 185 + --> Round with !cleanup | !(arrivalTrack == 1) 186 + --> Done; 187 + 188 + final state Done; 189 + }; 62 62 63 -{{{output bool *_req[11];}}} 64 64 65 -{{{input int trainNum;}}} 192 + // Region with schedule for train 7 193 + region Train7 : 194 + initial state train7 { 195 + 196 + @alterHostcode 197 + const int trainNum = 7; 198 + int arrivalTrack = 1; 199 + 200 + // Schedule of train 7: train drives from OC-Station track 1 to IC-Station track 2 and back 201 + // arrivalTrack used for transmitting the number of station track where train arrived on 202 + // to next controller where the train starts on 203 + initial state OCtoIC references OCIC 204 + bind depTrack to arrivalTrack, 205 + destTrack to c_ZWEI, 206 + arrTrack to arrivalTrack 207 +  // Transition to next Station-2-Station controller 208 + >-> ICtoOC; 209 + 210 + state ICtoOC references ICOC 211 + bind depTrack to arrivalTrack, 212 + destTrack to c_EINS, 213 + arrTrack to arrivalTrack 214 +  // Transition to checking state because train at home station 215 + >-> Choice; 216 + 217 + // State for checking, when the train should halt and if the train is on corresponding track 218 + state Choice 219 + // Transition for driving additional circle, if cleanup = false or wrong track used 220 +  --> OCtoIC with !cleanup | !(arrivalTrack == 1) 221 + // Transition to final state 222 + --> Done; 223 + 224 + final state Done; 225 + }; 226 + }; 227 +} 228 +{{/code}} 66 66 67 -{{{input int depTrack;}}} 68 - 69 -{{{input int destTrack;}}} 70 - 71 -{{{input bool cleanup;}}} 72 - 73 -{{{input bool debug;}}} 74 - 75 -{{{output int arrTrack;}}} 76 - 77 -{{{int i_arrOnTrack;}}} 78 - 79 -{{{ }}} 80 - 81 -{{{initial state *_ST {}}} 82 - 83 -{{{   entry debug / 'println([trainNum][ST-ST] ... )';}}} 84 - 85 -{{{ }}} 86 - 87 -{{{   initial state waitForPerm {}}} 88 - 89 -{{{       entry / *_ST_4_req[trainNum] = true;}}} 90 - 91 -{{{       entry / *_LN_0_req[trainNum] = true;}}} 92 - 93 -{{{   }}}} 94 - 95 -{{{   --> gotPerm with (*_ST_4_perm == trainNum) & (*_LN_0_perm == trainNum)}}} 96 - 97 -{{{   --> backOff with (*_ST_4_perm == trainNum) | (*_LN_0_perm == trainNum);}}} 98 - 99 -{{{ }}} 100 - 101 -{{{   state backOff}}} 102 - 103 -{{{   --> backOff1;}}} 104 - 105 -{{{ }}} 106 - 107 -{{{   state backOff1 {}}} 108 - 109 -{{{ entry / *_ST_4_req[trainNum] = false;}}} 110 - 111 -{{{ entry / *_LN_0_req[trainNum] = false;}}} 112 - 113 -{{{   }}}} 114 - 115 -{{{   --> waitForPerm;}}} 116 - 117 -{{{ }}} 118 - 119 -{{{ final state gotPerm;}}} 120 - 121 -{{{}}}} 122 - 123 -{{{>-> Dep_*_ST;}}} 124 - 125 -{{{ }}} 126 - 127 -{{{state Dep_*_ST {}}} 128 - 129 -{{{   entry / 'railPoint(*,STRAIGHT)';}}} 130 - 131 -{{{   entry / 'railSignal(*_LN_0, FWD, RED)';}}} 132 - 133 -{{{   entry / 'railTrack(*_LN_0,FWD,trainNum,NORMAL)';}}} 134 - 135 -{{{   entry / 'railTrack(*_ST_4,FWD,trainNum,NORMAL)';}}} 136 - 137 -{{{   entry depTrack == 1 / 'railSignal(*_ST_1, FWD, GREEN)';}}} 138 - 139 -{{{   entry depTrack == 2 / 'railSignal(*_ST_2, FWD, GREEN)';}}} 140 - 141 -{{{   entry depTrack == 3 / 'railSignal(*_ST_3, FWD, GREEN)';}}} 142 - 143 -{{{   ..........}}} 144 - 145 -{{{ } --> *_LN_0 with 'railContact(*_LN_0,0)';}}} 146 - 147 -{{{ }}} 148 - 149 -{{{ state *_LN_0 {}}} 150 - 151 -{{{   entry / 'println("[trainNum][ST-ST] Entering *_LN_0")';}}} 152 - 153 -{{{   entry debug / 'println("[trainNum][ST-ST] Requesting permission for *_LN_1")';}}} 154 - 155 -{{{   entry depTrack == 1 / 'railSignal(*_ST_1, FWD, RED)';}}} 156 - 157 -{{{   entry depTrack == 2 / 'railSignal(*_ST_2, FWD, RED)';}}} 158 - 159 -{{{   entry depTrack == 3 / 'railSignal(*_ST_3, FWD, RED)';}}} 160 - 161 -{{{   entry / *_LN_1_req[trainNum] = true;}}} 162 - 163 -{{{ }}} 164 - 165 -{{{   region Travel:}}} 166 - 167 -{{{     initial state Entry}}} 168 - 169 -{{{     --> Continue with 'railContact(*_LN_0,0)' & (*_LN_1_perm == trainNum)}}} 170 - 171 -{{{     --> Slowdown with 'railContact(*_LN_0,0)';}}} 172 - 173 -{{{ }}} 174 - 175 -{{{     state Slowdown {}}} 176 - 177 -{{{       entry debug / 'println("[trainNum][ST-ST] Slowing down on *_LN_0")';}}} 178 - 179 -{{{       entry / 'railTrack(*_LN_0,FWD,trainNum,CAUTION)';}}} 180 - 181 -{{{     }}}} 182 - 183 -{{{     --> Waiting with 'railContact(*_LN_0,1)'}}} 184 - 185 -{{{     --> Continue with *_LN_1_perm == trainNum;}}} 186 - 187 -{{{ }}} 188 - 189 -{{{     state Waiting {}}} 190 - 191 -{{{       entry debug / 'println("[trainNum][ST-ST] Stopping on *_LN_0")';}}} 192 - 193 -{{{       entry / 'railTrackBrake(*_LN_0)';}}} 194 - 195 -{{{     }}}} 196 - 197 -{{{     --> Continue with *_LN_1_perm == trainNum;}}} 198 - 199 -{{{ }}} 200 - 201 -{{{     final state Continue {}}} 202 - 203 -{{{       entry debug / 'println("[trainNum][ST-ST] Continuing on *_LN_0")';}}} 204 - 205 -{{{       entry / 'railSignal(*_LN_0,FWD,GREEN)';}}} 206 - 207 -{{{       entry / 'railTrack(*_LN_0,FWD,trainNum,NORMAL)';}}} 208 - 209 -{{{       entry / 'railTrack(*_LN_1,FWD,trainNum,NORMAL)';}}} 210 - 211 -{{{       entry / 'railSignal(*_LN_1, FWD, RED)';}}} 212 - 213 -{{{     };}}} 214 - 215 -{{{ }}} 216 - 217 -{{{   region Cleanup:}}} 218 - 219 -{{{     initial state Entry}}} 220 - 221 -{{{     --> cleanup with 'railContact(*_LN_0,0)';}}} 222 - 223 -{{{ }}} 224 - 225 -{{{     final state cleanup {}}} 226 - 227 -{{{     entry debug / 'println("[trainNum][ST-ST] Entered *_LN_0 completely")';}}} 228 - 229 -{{{     entry / 'railTrackOff(*_ST_4)';}}} 230 - 231 -{{{     entry / *_ST_4_req[trainNum] = false;}}} 232 - 233 -{{{     };}}} 234 - 235 -{{{ }>-> *_LN_0_*_LN_1;}}} 236 - 237 -{{{ }}} 238 - 239 -{{{ state *_LN_0_*_LN_1}}} 240 - 241 -{{{ --> *_LN_1 with 'railContact(*_LN_1,0)';}}} 242 - 243 -{{{ }}} 244 - 245 -{{{// ...................}}} 246 - 247 -{{{// Set of track segment controlling states such as before}}} 248 - 249 -{{{// ...................}}} 250 - 251 -{{{ }}} 252 - 253 -{{{state *_LN_5 {}}} 254 - 255 -{{{   int perm_all_next_segments = false;}}} 256 - 257 -{{{   entry / 'println("[trainNum][ST-ST] Entering *_LN_5")';}}} 258 - 259 -{{{   entry / 'railSignal(*_LN_4, FWD, RED)';}}} 260 - 261 -{{{ }}} 262 - 263 -{{{   region Travel:}}} 264 - 265 -{{{     initial state Entry}}} 266 - 267 -{{{     --> Continue with 'railContact(*_LN_5,0)' & perm_all_next_segments}}} 268 - 269 -{{{     --> Slowdown with 'railContact(*_LN_5,0)';}}} 270 - 271 -{{{ }}} 272 - 273 -{{{     state Slowdown {}}} 274 - 275 -{{{       entry debug / 'println("[trainNum][ST-ST] Slowing down on *_LN_5")';}}} 276 - 277 -{{{       entry / 'railTrack(*_LN_5,FWD,trainNum,CAUTION)';}}} 278 - 279 -{{{     }}}} 280 - 281 -{{{     --> Waiting with 'railContact(*_LN_5,1)'}}} 282 - 283 -{{{     --> Continue with perm_all_next_segments;}}} 284 - 285 -{{{ }}} 286 - 287 -{{{     state Waiting {}}} 288 - 289 -{{{       entry debug / 'println("[trainNum][ST-ST] Stopping on *_LN_5")';}}} 290 - 291 -{{{       entry / 'railTrackBrake(*_LN_5)';}}} 292 - 293 -{{{     }}}} 294 - 295 -{{{     --> Continue with perm_all_next_segments;}}} 296 - 297 -{{{ }}} 298 - 299 -{{{     final state Continue {}}} 300 - 301 -{{{       entry debug / 'println("[trainNum][ST-ST] Continuing on *_LN_5")';       }}} 302 - 303 -{{{       entry i_arrOnTrack == 1 / 'railTrack(*_ST_1,FWD,trainNum,NORMAL)';}}} 304 - 305 -{{{       entry i_arrOnTrack == 2 / 'railTrack(*_ST_2,FWD,trainNum,NORMAL)';}}} 306 - 307 -{{{       entry i_arrOnTrack == 3 / 'railTrack(*_ST_3,FWD,trainNum,NORMAL)';}}} 308 - 309 -{{{       ----------}}} 310 - 311 -{{{       entry / arrTrack = i_arrOnTrack;}}} 312 - 313 -{{{     };}}} 314 - 315 -{{{ }}} 316 - 317 -{{{   region Cleanup:}}} 318 - 319 -{{{     initial state Entry}}} 320 - 321 -{{{     --> cleanup with 'railContact(*_LN_5,0)';}}} 322 - 323 -{{{ }}} 324 - 325 -{{{     final state cleanup {}}} 326 - 327 -{{{       entry debug / 'println("[trainNum][ST-ST] Entered *_LN_5 completely")';}}} 328 - 329 -{{{       entry / 'railTrackOff(*_LN_4)';}}} 330 - 331 -{{{       entry / *_LN_4_req[trainNum] = false;}}} 332 - 333 -{{{     };}}} 334 - 335 -{{{ }}} 336 - 337 -{{{   region Permissions:}}} 338 - 339 -{{{     initial state checking {}}} 340 - 341 -{{{       entry / *_ST_0_req[trainNum] = true;}}} 342 - 343 -{{{       entry destTrack == 1 | !cleanup / *_ST_1_req[trainNum] = true;}}} 344 - 345 -{{{       entry destTrack == 2 | !cleanup / *_ST_2_req[trainNum] = true;}}} 346 - 347 -{{{       entry destTrack == 3 | !cleanup / *_ST_3_req[trainNum] = true;}}} 348 - 349 -{{{     }}}} 350 - 351 -\\ 352 - 353 -{{{     --> success with destTrack == 1 & *_ST_0_perm == trainNum & *_ST_1_perm == trainNum / i_arrOnTrack = 1}}} 354 - 355 -\\ 356 - 357 -{{{     --> success with destTrack == 2 & *_ST_0_perm == trainNum & *_ST_2_perm == trainNum / i_arrOnTrack = 2}}} 358 - 359 -\\ 360 - 361 -{{{     --> success with destTrack == 3 & *_ST_0_perm == trainNum & *_ST_3_perm == trainNum / i_arrOnTrack = 3}}} 362 - 363 -{{{     --> success with *_ST_0_perm == trainNum & *_ST_1_perm == trainNum / i_arrOnTrack = 1}}} 364 - 365 -{{{     --> success with *_ST_0_perm == trainNum & *_ST_2_perm == trainNum / i_arrOnTrack = 2}}} 366 - 367 -{{{     --> success with *_ST_0_perm == trainNum & *_ST_3_perm == trainNum / i_arrOnTrack = 3}}} 368 - 369 - 370 -\\ 371 - 372 -{{{     --> resolving with *_ST_0_perm == trainNum | *_ST_3_perm == trainNum | *_ST_2_perm == trainNum | *_ST_1_perm == trainNum;}}} 373 - 374 -{{{ }}} 375 - 376 -{{{     state resolving}}} 377 - 378 -{{{     --> resolving1;}}} 379 - 380 -{{{ }}} 381 - 382 -{{{     state resolving1 {}}} 383 - 384 -{{{       entry / *_ST_0_req[trainNum] = false;}}} 385 - 386 -{{{       entry / *_ST_1_req[trainNum] = false;}}} 387 - 388 -{{{       entry / *_ST_2_req[trainNum] = false;}}} 389 - 390 -{{{       entry / *_ST_3_req[trainNum] = false;}}} 391 - 392 -{{{     }}}} 393 - 394 -{{{     --> checking;}}} 395 - 396 -{{{ }}} 397 - 398 -{{{     state success}}} 399 - 400 -{{{     --> success1;}}} 401 - 402 -{{{ }}} 403 - 404 -{{{     final state success1 {}}} 405 - 406 -{{{       entry !(i_arrOnTrack == 1) / *_ST_1_req[trainNum] = false;     }}} 407 - 408 -{{{       entry !(i_arrOnTrack == 2) / *_ST_2_req[trainNum] = false;}}} 409 - 410 -{{{       entry !(i_arrOnTrack == 3) / *_ST_3_req[trainNum] = false;}}} 411 - 412 -{{{       entry / perm_all_next_segments = true;}}} 413 - 414 -{{{     };}}} 415 - 416 -{{{ }>-> *_LN_5_*_ST;}}} 417 - 418 -{{{ }}} 419 - 420 -{{{ state *_LN_5_*_ST}}} 421 - 422 -{{{ --> Arr_*_ST with i_arrOnTrack == 1 & 'railContact(*_ST_1,0)'}}} 423 - 424 -{{{ --> Arr_*_ST with i_arrOnTrack == 2 & 'railContact(*_ST_2,0)'}}} 425 - 426 -{{{ --> Arr_*_ST with i_arrOnTrack == 3 & 'railContact(*_ST_3,0)';}}} 427 - 428 -{{{ }}} 429 - 430 -{{{ state Arr_*_ST {}}} 431 - 432 -{{{   entry / 'railSignal(*_LN_5, FWD, RED)';}}} 433 - 434 -{{{   entry / 'railTrackOff(*_LN_5)';}}} 435 - 436 -{{{   entry / 'railTrack(*_ST_0,FWD,trainNum,SLOW)';}}} 437 - 438 -{{{   entry i_arrOnTrack == 1 / 'railTrack(*_ST_1,FWD,trainNum,SLOW)';}}} 439 - 440 -{{{   entry i_arrOnTrack == 2 / 'railTrack(*_ST_2,FWD,trainNum,SLOW)';}}} 441 - 442 -{{{   entry i_arrOnTrack == 3 / 'railTrack(*_ST_3,FWD,trainNum,SLOW)';}}} 443 - 444 -{{{   entry / *_LN_5_req[trainNum] = false;}}} 445 - 446 -{{{ }}} 447 - 448 -{{{   initial state SlowEntry}}} 449 - 450 -{{{   --> Slow with i_arrOnTrack == 1 & 'railContact(*_ST_1,0)'}}} 451 - 452 -{{{   --> Slow with i_arrOnTrack == 2 & 'railContact(*_ST_2,0)'}}} 453 - 454 -{{{   --> Slow with i_arrOnTrack == 3 & 'railContact(*_ST_3,0)';}}} 455 - 456 -{{{ }}} 457 - 458 -{{{   state Slow {}}} 459 - 460 -{{{     entry / 'railTrackOff(*_ST_0)';}}} 461 - 462 -{{{     entry / *_ST_0_req[trainNum] = false;}}} 463 - 464 -{{{   }}}} 465 - 466 -{{{   --> Halt with i_arrOnTrack == 1 & 'railContact(*_ST_1,1)'}}} 467 - 468 -{{{   --> Halt with i_arrOnTrack == 2 & 'railContact(*_ST_2,1)'}}} 469 - 470 -{{{   --> Halt with i_arrOnTrack == 3 & 'railContact(*_ST_3,1)';}}} 471 - 472 -{{{ }}} 473 - 474 -{{{   final state Halt {}}} 475 - 476 -{{{     entry i_arrOnTrack == 1 / 'railTrackBrake(*_ST_1)';}}} 477 - 478 -{{{     entry i_arrOnTrack == 2 / 'railTrackBrake(*_ST_2)';}}} 479 - 480 -{{{     entry i_arrOnTrack == 3 / 'railTrackBrake(*_ST_3)';}}} 481 - 482 -{{{     entry i_arrOnTrack == 1 / 'railArrival(trainNum, *_ST_1)';}}} 483 - 484 -{{{     entry i_arrOnTrack == 2 / 'railArrival(trainNum, *_ST_2)';}}} 485 - 486 -{{{     entry i_arrOnTrack == 3 / 'railArrival(trainNum, *_ST_3)';}}} 487 - 488 -{{{   };}}} 489 - 490 -{{{ }}}} 491 - 492 -{{{ >-> done;}}} 493 - 494 -{{{ }}} 495 - 496 -{{{ state done}}} 497 - 498 -{{{ --> reallyDone with 'railDeparture(trainNum)';}}} 499 - 500 -{{{ }}} 501 - 502 -{{{ final state reallyDone;}}} 503 -)))|=((( 504 -~/~/ All permissions variables 505 - 506 -~/~/ All request variables 507 - 508 -~/~/ Train number 509 - 510 -~/~/ Departure track number 511 - 512 -~/~/ Destination track number 513 - 514 -~/~/ Cleanup flag for selecting the destination track 515 - 516 -~/~/ Debug flag for additional output 517 - 518 -~/~/ Arrival track 519 - 520 -~/~/ Variable (arrival track) for selecting correct station elements 521 - 522 522 523 523 524 - ~/~/Handles departing from a station232 +== Station-2-Station controller == 525 525 526 - ~/~/Additional outputfordebugging234 +Each Station-2-Station controller realizes the movement from one of the stations (IC,OC,KH) to another station. All controllers using IC or OC parts have to respect the traveling directions. For the Kicking Horse Pass two separate controllers, forwards and backwards, are used. 527 527 528 - 236 +The controllers starting from Kicking Horse Pass Station make an assumption of the direction of the train. These are dependent on the directions of the inner or outer circle, e.g. the KHIC controller starts backwards because this is the only valid direction to travel this path. To drive a train from the Kicking Horse Station (facing forward) to the Inner Circle we have to combine the KHOC and OCIC controllers. 529 529 530 - ~/~/ State, which sets requests for needed tracks238 +[[image:attach:ICIC.png]] 531 531 532 - 240 +When arriving on a station the train controller **must** first call the function //void railArrival(int train, int station)//. This starts the waiting timer for the train. 241 +Next the train **must** wait for// int railDeparture(int train)// to return 1. 242 +After the waiting has finished the controller can reach a final state and pass the control back to the train controller. 533 533 534 - 244 +=== Structure === 535 535 536 - 246 +{{code linenumbers="true" language="sct"}} 247 +// 248 +// Structure of a Station-2-Station controller from Station * to Station * 249 +// 250 +scchart STST " * to * Controller " { 537 537 538 -~/~/ Transition is taken, if all permissions are received 252 + // Set of permission variables for required tracks 253 + input int *_perm; 539 539 540 -~/~/ Transition is taken, if some (not all) permissions are received 255 + // Set of request variables for required tracks for 11 trains 256 + output bool *_req[11]; 541 541 542 - 258 + // Train number 259 + input int trainNum; 543 543 544 -~/~/ State for waiting an additional Tick 261 + // Number of the departure track in a station 262 + input int depTrack; 545 545 546 - 264 + // Number of the destination track in a station 265 + input int destTrack; 547 547 548 - 267 + // Cleanup flag for selecting the destination track 268 + input bool cleanup; 549 549 550 -~/~/ State, which releases the requests for needed tracks 270 + // Debug flag for additional output 271 + input bool debug; 551 551 552 - 273 + // Arrival track 274 + output int arrTrack; 553 553 276 + // Variable with value for arrTrack for selecting correct station elements 277 + int i_arrOnTrack; 554 554 555 - 279 + // Handles departing from a station * 280 + initial state *_ST { 281 + // hostcode call for additional output when debug 282 + entry debug / 'println([trainNum][ST-ST] ... )'; 556 556 557 - 558 -~/~/ Transition to repeat requesting permissions procedure 559 - 284 + // State, which sets requests for needed tracks 285 + initial state waitForPerm { 286 + entry / *_ST_4_req[trainNum] = true; 287 + entry / *_LN_0_req[trainNum] = true; 288 + } 289 + // Transition is taken, if all permissions are received 290 + --> gotPerm with (*_ST_4_perm == trainNum) & (*_LN_0_perm == trainNum) 291 + // Transition is taken, if some (not all) permissions are received 292 + --> backOff with (*_ST_4_perm == trainNum) | (*_LN_0_perm == trainNum); 560 560 561 - 294 + // State for waiting an additional tick when not all permissions are received 295 + state backOff 296 + --> backOff1; 562 562 563 - 298 + // State, which releases the requests for needed tracks 299 + state backOff1 { 300 + entry / *_ST_4_req[trainNum] = false; 301 + entry / *_LN_0_req[trainNum] = false; 302 + } 303 + // Transition to repeat requesting permissions procedure 304 + --> waitForPerm; 564 564 565 - 566 -~/~/ Transition to the departure state 567 - 306 + final state gotPerm; 307 + } 308 + // Transition to the departure state 309 + >-> Dep_*_ST; 568 568 569 - 570 -~/~/ State, which handles the train departure 571 - 572 -~/~/ Set of entry-Actions to set tracks, points and signals according to depTrack 573 - 311 + // State, which handles the departure of a train 312 + state Dep_*_ST { 313 + // Set of entry-Actions with hostcode calls to set tracks, points and signals according to depTrack 314 + entry / 'railPoint(*,STRAIGHT)'; 315 + entry / 'railSignal(*_LN_0, FWD, RED)'; 316 + entry / 'railTrack(*_LN_0,FWD,trainNum,NORMAL)'; 317 + entry / 'railTrack(*_ST_4,FWD,trainNum,NORMAL)'; 318 + entry depTrack == 1 / 'railSignal(*_ST_1, FWD, GREEN)'; 319 + entry depTrack == 2 / 'railSignal(*_ST_2, FWD, GREEN)'; 320 + entry depTrack == 3 / 'railSignal(*_ST_3, FWD, GREEN)'; 321 + //... 322 + // Transition to next track segment, if contact is triggered 323 + } --> *_LN_0 with 'railContact(*_LN_0,0)'; 574 574 575 575 576 576 327 + // ---------------------------------------------------------------------------------------------------------------- 328 + // Set of track segment controlling states such as follows 329 + // ---------------------------------------------------------------------------------------------------------------- 577 577 578 - 331 + // Transition to next track segment, if contact is triggered 332 + state *_LN_0 { 333 + // Hostcode calls for outputs 334 + entry / 'println("[trainNum][ST-ST] Entering *_LN_0")'; 335 + entry debug / 'println("[trainNum][ST-ST] Requesting permission for *_LN_1")'; 336 + // Entry-Actions with hostcode calls to set previous signal according to depTrack to RED 337 + entry depTrack == 1 / 'railSignal(*_ST_1, FWD, RED)'; 338 + entry depTrack == 2 / 'railSignal(*_ST_2, FWD, RED)'; 339 + entry depTrack == 3 / 'railSignal(*_ST_3, FWD, RED)'; 340 + // Requesting the next track segment 341 + entry / *_LN_1_req[trainNum] = true; 579 579 580 - 343 + // Region for handling train driving 344 + region Travel: 345 + initial state Entry 346 + // Transition to continuing state, if permitted 347 + --> Continue with 'railContact(*_LN_0,0)' & (*_LN_1_perm == trainNum) 348 + // Transition to slowing down else 349 + --> Slowdown with 'railContact(*_LN_0,0)'; 581 581 582 - 351 + // State for slowing down the train 352 + state Slowdown { 353 + entry debug / 'println("[trainNum][ST-ST] Slowing down on *_LN_0")'; 354 + // Entry-Action with hostcode calls for slowing down the train 355 + entry / 'railTrack(*_LN_0,FWD,trainNum,CAUTION)'; 356 + } 357 + // Transition to waiting state 358 + --> Waiting with 'railContact(*_LN_0,1)' 359 + // Transition to continuing state, if permitted 360 + --> Continue with *_LN_1_perm == trainNum; 583 583 584 - 362 + // State for train waiting on permission 363 + state Waiting { 364 + entry debug / 'println("[trainNum][ST-ST] Stopping on *_LN_0")'; 365 + // Entry-Action with hostcode call for stopping the train 366 + entry / 'railTrackBrake(*_LN_0)'; 367 + } 368 + --> Continue with *_LN_1_perm == trainNum; 585 585 586 - 587 -~/~/ Transition to next track segment, if contact is triggered 588 - 370 + // State to continuing driving on the track 371 + final state Continue { 372 + entry debug / 'println("[trainNum][ST-ST] Continuing on *_LN_0")'; 373 + // Entry-Actions with hostcode calls to set tracks and signals for driving 374 + entry / 'railSignal(*_LN_0,FWD,GREEN)'; 375 + entry / 'railTrack(*_LN_0,FWD,trainNum,NORMAL)'; 376 + entry / 'railTrack(*_LN_1,FWD,trainNum,NORMAL)'; 377 + entry / 'railSignal(*_LN_1, FWD, RED)'; 378 + }; 589 589 590 - 591 - ~/~/Stateforhandlingthe trainontrack *_LN_0592 - 593 - ~/~/Outputsfordebugging594 - 380 + // Region for handling cleanup functionalities 381 + region Cleanup: 382 + initial state Entry 383 + // Transition to cleanup state 384 + --> cleanup with 'railContact(*_LN_0,0)'; 595 595 596 - 597 -~/~/ Entry-Actions to set the previous signals to RED 598 - 386 + // State for cleaning up the previous track segments 387 + final state cleanup { 388 + entry debug / 'println("[trainNum][ST-ST] Entered *_LN_0 completely")'; 389 + // Entry-Action with hostcode call to switching off the previous track 390 + entry / 'railTrackOff(*_ST_4)'; 391 + // Entry-Action to release the previous track 392 + entry / *_ST_4_req[trainNum] = false; 393 + }; 394 + // Transition to transitional state 395 + }>-> *_LN_0_*_LN_1; 599 599 600 - 397 + state *_LN_0_*_LN_1 398 + // Transition to next track segment, if contact is triggered 399 + --> *_LN_1 with 'railContact(*_LN_1,0)'; 601 601 401 + // ---------------------------------------------------------------------------------------------------------------- 602 602 603 -~/~/ Requesting the next segment 604 604 605 - 606 606 607 -~/~/ Region for handling train driving 608 - 405 + // State for entering a station 406 + state *_LN_5 { 407 + // Variable for checking all needed permissions 408 + int perm_all_next_segments = false; 409 + entry / 'println("[trainNum][ST-ST] Entering *_LN_5")'; 410 + entry / 'railSignal(*_LN_4, FWD, RED)'; 609 609 610 - 611 -~/~/ Transition to continuing state, if permitted 612 - 613 -~/~/ Transition to slowing down else 614 - 412 + // Region for handling train driving such as above, 413 + // only with perm_all_next_segments for permitting more than one track 414 + region Travel: 415 + initial state Entry 416 + --> Continue with 'railContact(*_LN_5,0)' & perm_all_next_segments 417 + --> Slowdown with 'railContact(*_LN_5,0)'; 615 615 616 - 617 -~/~/ State for slowing down 618 - 619 -~/~/ Addtitional output for debugging 620 - 621 -~/~/ Entry-Action for slowing down the train 622 - 419 + state Slowdown { 420 + entry debug / 'println("[trainNum][ST-ST] Slowing down on *_LN_5")'; 421 + entry / 'railTrack(*_LN_5,FWD,trainNum,CAUTION)'; 422 + } 423 + --> Waiting with 'railContact(*_LN_5,1)' 424 + --> Continue with perm_all_next_segments; 623 623 624 - 625 - ~/~/Transition towaitingstate626 - 627 - ~/~/Transitiontocontinuingstate,ifpermitted628 - 426 + state Waiting { 427 + entry debug / 'println("[trainNum][ST-ST] Stopping on *_LN_5")'; 428 + entry / 'railTrackBrake(*_LN_5)'; 429 + } 430 + --> Continue with perm_all_next_segments; 629 629 630 - 631 -~/~/ Waiting state 632 - 633 -~/~/ Addtitional output for debugging 634 - 635 -~/~/ Entry-Action for stopping the train 636 - 432 + final state Continue { 433 + entry debug / 'println("[trainNum][ST-ST] Continuing on *_LN_5")'; 434 + entry i_arrOnTrack == 1 / 'railTrack(*_ST_1,FWD,trainNum,NORMAL)'; 435 + entry i_arrOnTrack == 2 / 'railTrack(*_ST_2,FWD,trainNum,NORMAL)'; 436 + entry i_arrOnTrack == 3 / 'railTrack(*_ST_3,FWD,trainNum,NORMAL)'; 437 + //... 438 + entry / arrTrack = i_arrOnTrack; 439 + }; 637 637 638 - 639 -~/~/ Tranisition to continuing state 640 - 441 + // Region for handling cleanup-functionalities such as above 442 + region Cleanup: 443 + initial state Entry 444 + --> cleanup with 'railContact(*_LN_5,0)'; 641 641 642 - 643 -~/~/ State to continuing driving on the track 644 - 645 -~/~/ Addtitional output for debugging 646 - 647 -~/~/ Entry-Actions to set tracks and signals for driving 648 - 446 + final state cleanup { 447 + entry debug / 'println("[trainNum][ST-ST] Entered *_LN_5 completely")'; 448 + entry / 'railTrackOff(*_LN_4)'; 449 + entry / *_LN_4_req[trainNum] = false; 450 + }; 649 649 650 - 452 + // Region for handling permissions of all needed tracks 453 + region Permissions: 454 + // State for requesting all needed tracks according to destination track and cleanup-Flag 455 + initial state checking { 456 + entry / *_ST_0_req[trainNum] = true; 457 + entry destTrack == 1 | !cleanup / *_ST_1_req[trainNum] = true; 458 + entry destTrack == 2 | !cleanup / *_ST_2_req[trainNum] = true; 459 + entry destTrack == 3 | !cleanup / *_ST_3_req[trainNum] = true; 460 + } 461 + // Transitions for permitted tracks match wished tracks 462 + --> success with destTrack == 1 & *_ST_0_perm == trainNum & *_ST_1_perm == trainNum / i_arrOnTrack = 1 463 + --> success with destTrack == 2 & *_ST_0_perm == trainNum & *_ST_2_perm == trainNum / i_arrOnTrack = 2 464 + --> success with destTrack == 3 & *_ST_0_perm == trainNum & *_ST_3_perm == trainNum / i_arrOnTrack = 3 465 + // Transitions for permitted tracks don't match wished tracks 466 + --> success with *_ST_0_perm == trainNum & *_ST_1_perm == trainNum / i_arrOnTrack = 1 467 + --> success with *_ST_0_perm == trainNum & *_ST_2_perm == trainNum / i_arrOnTrack = 2 468 + --> success with *_ST_0_perm == trainNum & *_ST_3_perm == trainNum / i_arrOnTrack = 3 469 + // Transition for not all tracks permitted 470 + --> resolving with *_ST_0_perm == trainNum | *_ST_3_perm == trainNum | *_ST_2_perm == trainNum | *_ST_1_perm == trainNum; 651 651 652 - 472 + // State for waiting an additional tick 473 + state resolving 474 + --> resolving1; 475 + 476 + // State for releasing track requests 477 + state resolving1 { 478 + entry / *_ST_0_req[trainNum] = false; 479 + entry / *_ST_1_req[trainNum] = false; 480 + entry / *_ST_2_req[trainNum] = false; 481 + entry / *_ST_3_req[trainNum] = false; 482 + } 483 + // Transition for trying the requesting again 484 + --> checking; 653 653 486 + // State for waiting an additional tick 487 + state success 488 + --> success1; 654 654 490 + // State for releasing not used track requests 491 + final state success1 { 492 + entry !(i_arrOnTrack == 1) / *_ST_1_req[trainNum] = false; 493 + entry !(i_arrOnTrack == 2) / *_ST_2_req[trainNum] = false; 494 + entry !(i_arrOnTrack == 3) / *_ST_3_req[trainNum] = false; 495 + // Settting perm_all_next_segments to true 496 + entry / perm_all_next_segments = true; 497 + }; 498 + // Transition to station entry states 499 + }>-> *_LN_5_*_ST; 655 655 656 - 501 + // State waiting for station entry 502 + state *_LN_5_*_ST 503 + --> Arr_*_ST with i_arrOnTrack == 1 & 'railContact(*_ST_1,0)' 504 +  --> Arr_*_ST with i_arrOnTrack == 2 & 'railContact(*_ST_2,0)' 505 + --> Arr_*_ST with i_arrOnTrack == 3 & 'railContact(*_ST_3,0)'; 657 657 658 - 659 -~/~/ Region for handling cleanup-functionalities 660 - 507 + // State for setting tracks, points and signals according to i_arrOnTrack 508 + // and releasing previous track request 509 + state Arr_*_ST { 510 + entry / 'railSignal(*_LN_5, FWD, RED)'; 511 + entry / 'railTrackOff(*_LN_5)'; 512 + entry / 'railTrack(*_ST_0,FWD,trainNum,SLOW)'; 513 + entry i_arrOnTrack == 1 / 'railTrack(*_ST_1,FWD,trainNum,SLOW)'; 514 + entry i_arrOnTrack == 2 / 'railTrack(*_ST_2,FWD,trainNum,SLOW)'; 515 + entry i_arrOnTrack == 3 / 'railTrack(*_ST_3,FWD,trainNum,SLOW)'; 516 + entry / *_LN_5_req[trainNum] = false; 661 661 662 - 663 -~/~/ Transition to cleanup state 664 - 518 + initial state SlowEntry 519 + --> Slow with i_arrOnTrack == 1 & 'railContact(*_ST_1,0)' 520 + --> Slow with i_arrOnTrack == 2 & 'railContact(*_ST_2,0)' 521 + --> Slow with i_arrOnTrack == 3 & 'railContact(*_ST_3,0)'; 665 665 666 - 667 - ~/~/Cleanupstate668 - 669 - ~/~/Addtitional outputfordebugging670 - 671 - ~/~/Entry-Action to switchingofftheprevioustrack672 - 673 - ~/~/Entry-Actiontoreleasetheprevioustrack674 - 523 + // State for switching off previous track and releasing the request 524 + state Slow { 525 + entry / 'railTrackOff(*_ST_0)'; 526 + entry / *_ST_0_req[trainNum] = false; 527 + } 528 + // Transitions to halt state, when train is at second contact of a track segment 529 + --> Halt with i_arrOnTrack == 1 & 'railContact(*_ST_1,1)' 530 + --> Halt with i_arrOnTrack == 2 & 'railContact(*_ST_2,1)' 531 + --> Halt with i_arrOnTrack == 3 & 'railContact(*_ST_3,1)'; 675 675 676 - 677 -~/~/ Transition to transitional state 678 - 533 + 534 + final state Halt { 535 + // Entry-Actions for braking the train on correct track 536 + entry i_arrOnTrack == 1 / 'railTrackBrake(*_ST_1)'; 537 + entry i_arrOnTrack == 2 / 'railTrackBrake(*_ST_2)'; 538 + entry i_arrOnTrack == 3 / 'railTrackBrake(*_ST_3)'; 539 + // Entry-Actions for waiting for timer on correct track 540 + entry i_arrOnTrack == 1 / 'railArrival(trainNum, *_ST_1)'; 541 + entry i_arrOnTrack == 2 / 'railArrival(trainNum, *_ST_2)'; 542 + entry i_arrOnTrack == 3 / 'railArrival(trainNum, *_ST_3)'; 543 + }; 544 + } 545 + >-> done; 679 679 680 - 681 -~/~/ Transitional state 682 - 683 -~/~/ Transition to next track segment, if contact is triggered 684 - 547 + state done 548 + // Transition to final state, if timer is ready 549 + --> reallyDone with 'railDeparture(trainNum)'; 685 685 686 - 687 - 688 - 689 - 690 - 691 - 692 - 693 - 694 - 695 -~/~/ State for entering a station 696 - 697 -~/~/ Variable for checking all needed permissions 698 - 699 -~/~/ Output 700 - 701 -~/~/ Setting signal to RED 702 - 703 - 704 - 705 -~/~/ Region for handling train driving 706 - 707 - 708 - 709 -~/~/ Transition to continuing state, if permitted 710 - 711 -~/~/ Transition to slowing down else 712 - 713 - 714 - 715 -~/~/ State for slowing down 716 - 717 -~/~/ Addtitional output for debugging 718 - 719 -~/~/ Entry-Action for slowing down the train 720 - 721 - 722 - 723 -~/~/ Transition to waiting state 724 - 725 -~/~/ Transition to continuing state, if permitted 726 - 727 - 728 - 729 -~/~/ Waiting state 730 - 731 -~/~/ Addtitional output for debugging 732 - 733 -~/~/ Entry-Action for stopping the train 734 - 735 - 736 - 737 -~/~/ Tranisition to continuing state 738 - 739 - 740 - 741 -~/~/ State to continuing driving on the track 742 - 743 -~/~/ Addtitional output for debugging 744 - 745 -~/~/ Set of entry-Actions for setting tracks, points and signals according to i_arrOnTrack 746 - 747 - 748 - 749 - 750 - 751 -~/~/ Setting the arrival track (output) 752 - 753 - 754 - 755 - 756 - 757 -~/~/ Region for handling cleanup-functionalities 758 - 759 - 760 - 761 -~/~/ Transition to cleanup state 762 - 763 - 764 - 765 -~/~/ Cleanup state 766 - 767 -~/~/ Addtitional output for debugging 768 - 769 -~/~/ Entry-Action to switching off the previous tracks 770 - 771 -~/~/ Entry-Action to release the previous tracks 772 - 773 - 774 - 775 - 776 - 777 -~/~/ Region for handling permissions of all needed tracks 778 - 779 -~/~/ State for requesting all needed tracks according to destination track and cleanup-Flag 780 - 781 - 782 - 783 - 784 - 785 - 786 - 787 - 788 - 789 - 790 - 791 -~/~/ Transitions for permitted tracks match wished tracks 792 - 793 - 794 - 795 - 796 - 797 - 798 - 799 - 800 - 801 -~/~/ Transitions for permitted tracks don't match wished tracks 802 - 803 - 804 - 805 - 806 - 807 -~/~/ Transition for not all tracks permitted 808 - 809 - 810 - 811 - 812 - 813 -~/~/ State for waiting an additional tick 814 - 815 - 816 - 817 - 818 - 819 -~/~/ State for releasing track requests 820 - 821 - 822 - 823 - 824 - 825 - 826 - 827 - 828 - 829 - 830 - 831 -~/~/ Transition for trying the requesting again 832 - 833 - 834 - 835 -~/~/ State for waiting an additional tick 836 - 837 - 838 - 839 - 840 - 841 -~/~/ State for releasing not used track requests 842 - 843 - 844 - 845 - 846 - 847 - 848 - 849 -~/~/ Settting perm_all_next_segments to true 850 - 851 - 852 - 853 -~/~/ Transition to station entry states 854 - 855 - 856 - 857 -~/~/ State waiting for station entry 858 - 859 - 860 - 861 - 862 - 863 - 864 - 865 - 866 - 867 -~/~/ State for setting tracks, points and signals according to i_arrOnTrack 868 - 869 -~/~/ and releasing previous track request 870 - 871 - 872 - 873 - 874 - 875 - 876 - 877 - 878 - 879 - 880 - 881 - 882 - 883 - 884 - 885 -~/~/ State for slowing down, if train completely on track 886 - 887 - 888 - 889 - 890 - 891 - 892 - 893 - 894 - 895 -~/~/ State for switching off previous track and releasing the request 896 - 897 - 898 - 899 - 900 - 901 - 902 - 903 -~/~/ Transitions to halt states, if train at second contact of a track 904 - 905 - 906 - 907 - 908 - 909 - 910 - 911 - 912 - 913 -~/~/ Entry-Actions for braking the train on correct track 914 - 915 - 916 - 917 - 918 - 919 -~/~/ Entry-Actions for waiting for timer on correct track 920 - 921 - 922 - 923 - 924 - 925 - 926 - 927 - 928 - 929 - 930 - 931 - 932 - 933 - 934 - 935 -~/~/ Transition to final state, if timer is ready 936 -))) 551 + final state reallyDone; 552 +} 553 +{{/code}}
- Confluence.Code.ConfluencePageClass[0]
-
- Id
-
... ... @@ -1,1 +1,1 @@ 1 -94716 601 +9471746 - URL
-
... ... @@ -1,1 +1,1 @@ 1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/SS14Railway/pages/94716 60/Basic design1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/SS14Railway/pages/9471746/Basic design