Document
DocName Project Version FullName ShortDescription
TestCases RailwayCrossing
TestCases
ModelName Track 
Layout
Situation Test 
Parameters
Expected 
Behavior
Observed 
Behavior
 Testcase A The opening time of the gate is greater than the time a regular speed train needs for the way between the first sensor and the gate. There are no trains between the sensors, and the controller triggers the opening of the gate. Then, a train passes the first sensor. 
  • initially no trains on track
  • strategy: "trains take precedence"
  • 1 slow track with durations (20, 30, 45, 5, 10)
  • a single train is created at 130s
  • The opening of the gate is aborted, and the controller triggers its closing.
  • MSC
  • PostScript-File
  • Complete Trace-File
  • Testcase B The stopping signal is in front of the gate. The stopping signal is set, while a train approaches. Its breaking distance is longer than the interval between the train and the signal. 
  •  initially no trains on trac
  • strategy: "trains take precedence"
  • 1 slow track with durations (20, 30, 45, 20, 40)
  • a single train is created at 100s, which leaves the crossing area at xxx (this sets the signal to 'stop')
  • a second train is created 55s later and arrives at the signal when the signal  is changed to red (through a modification of the "opern gate and keep opened" strategy)
  • The train passes the signal. Note: Our strategies will only set the stopping signal, if no train is between the approaching sensor (ts1) and the leaving sensor (ts2). Further, the strategies assume that the distance between ts1 and the signal is longer than the breaking duration, i.e. the first train breaks after it has passed ts1. Therefore, this test case cannot be executed with the complete system.

    However, the environment side of our system realizes the behavior as expected from this test-case and was used to create the traces (the gate is not closed, as this unexpected bahvior of the trains is avoided in the complete system!)
     

  • MSC
  • PostScript-File
  • Complete Trace-File

  •  
    Testcase C There are several trains on all tracks between the sensors, and new ones are approaching from time to time. As there are too many cars waiting at the gate, it has to be opened, therefore, all stopping signals have to be set. 
  • initially some trains on track (strategy: "trains take precedence")
  • 2 slow tracks with durations (120, 30, 45, 5, 10) 
  •  slow trains are created in 90s intervals, with an offset of 40 seconds between the two tracks 
  • 1 fast track with durations (90, 15, 30, 5, 10)
  • fast trains are created in  210s intervals 
  • car gate leaving duration = 5s, 
  • car arriving duration  := 2s, therefore, there will always be cars waiting!
  • at 320s the strategy is changed to "cars take precedence"
  • The controller sets the stopping signal  on EACH track as soon as there are no trains between the sensors, and
    opens the gate after ALL stopping signals have been set.
  • MSC
  • PostScript-File
  • Complete Trace-File

  •  
    Testcase D 1 fast track and 2 slow tracks; slow trains take at least 6 time units to reach the gate. The following trains enter the system:
      at time 0: a slow train on track slow1
      at time 1: a slow train on track slow2
      at time 2: a slow train on track slow1
      at time 3: a slow train on track slow1
      at time 4: a fast train on track fast
      at time 5: a slow train on track slow1
      at time 6: too many cars are waiting
      at time 7: a slow train on track slow1
      at time 8: a slow train on track slow1
      at time 9: a slow train on track slow2
      at time 10: a fast train on track fast
  • 2 slow tracks with durations (90, 20, 10, 5, 10) 
  •  slow trains are created according to the given situation 
  • 1 fast track with durations (45, 10, 5, 5, 10)
  • car gate leaving duration = 9999s, 
  • car arriving duration  := 9999s, i.e. cars will be created on request
  • strategy: "trains take precedence"

    -> gate will not open while trains are on the tracks

    strategy: "fast trains, then cars take precedence"

    -> gate will open after first fast train has left and no slow train is between the sensors, gate will close again when second fast train arrives

    strategy: "cars take precedence"

    -> gate will open as soon as no trains are between ts1 and ts2, and will never close again

    strategy: "trains take precedence"
     
  • MSC
  • PostScript-File
  • Complete Trace-File

  • strategy: "fast trains, then cars take precedence"
     

  • MSC
  • PostScript-File
  • Complete Trace-File

  • strategy: "cars take precedence"
     

  • MSC
  • PostScript-File
  • Complete Trace-File

  •  
    Testcase E 1 fast track and 2 slow tracks; slow trains take at least 6 time units to reach the gate. The following trains enter the system:
      at time 0: a slow train on track slow1
      at time 1: a slow train on track slow1
      at time 2: too many cars are waiting
      at time 4: not many cars waiting
      at time 5: a slow train on track slow2
    Testcase F 1 fast track and 2 slow tracks; slow trains take at least 6 time units to reach the gate. The following trains enter the system:
      at time 0: a slow train on track slow1
      at time 2: too many cars are waiting
      at time 3: a slow train on track slow2
      at time 4: not many cars waiting
      at time 5: too many cars are waiting
      at time 7: a fast train on track fast
      at time 8: not many cars waiting