ObjectType
Document
DocName Project Version FullName ShortDescription
JavaPanel RailwayCrossing V1
 
Description
This panel is intended for interacting with the RailwayCrossing Environment and the Gate Controller.

Therefore, the panel allows

  • the initialization of a specific number of regular and fast tracks with the respective params (at system start)

  •  
  • the manual setting of the signals and the gate

  •  
  • the display of statistics about the tracks and trains (e.g. average waiting duration of the trains, ...)

  •  
  • a graphical view of the environment (the tracks, trains, cars, signals and the gate)

  •  
  • further, the sending of arbitrary signals
 
Tasks
ModelName Description Strategy Assigned Tab/Window
initTracks Initialize a specific number of regular and fast tracks (at system start). After pressing the buttonInit, for each track type send the signal setTrackParams(trackType, ts1Dur, ts1Sig1Dur, sig1Ts2Dur, breakDur, minDistDur) for setting the concrete values for the respective type (taken from textFieldRTP1 (trackType = 'regular'); and textFieldFTP1 (trackType ='fast')).

Then, send signal initTracks(nbrRegTracks, nbrFastTracks),  (taken from textFieldRT and  textFieldFT).

The, send signal setCarPeriod and setTrainPeriod as described below.

After these initialization data have been transmitted, open a separate window (Visualization) that shows the railway crossing in a graphical manner.

Init
manualGateControl Set the gate to a specific state. If buttonCloseGate is pushed, send signal setGate(close); If buttonOpenGate is pushed, send signal setGate(open). Ctrl
manualSignalControl Set one (or all) signal(s) to a specific state. If buttonGreenSignal is pushed, send the signal setSignal(track, green), where track is taken from textFieldTrack; If buttonRedSignal is pushed, send signal setSignal(track, red). The textFieldTrack should contain the instanceName of the respective track, or the keyword all, if all tracks are to be controlled. Ctrl
displayStatistics Display the statistics for the railway crossing (the number of trains, the average waiting duration per track, etc.). Upon reception of the newTrackStatistics(trackName, ...) signal, display the data for the respective track in the tableStats depending on the trackName parameter. Stats
controlCarCreation Set the periods for arriving and leaving cars, or create cars manually. If buttonSetCarPeriod is pushed, send the signal setCarPeriod(p1,p2), where p1 is taken from textFieldCP1, and p2 is taken from textFieldCP2.

If buttonCreateCar is pushed, send the signal createCar().

Env
controlTrainCreation Set the period for creating trains, or create trains manually. If buttonSetTrainPeriod is pushed, send the signal setTrainPeriod(trackName, p1). Parameter trackName is taken from textFieldTrack2 and can be 'all', 'fast', 'regular' or the instanceName of the track. Param p1 is taken from textFieldCT1.

If buttonCreateTrain is pushed, send the signal createTrain(trackName), where trackName is taken from TextFieldTrack2.

Env
visualizeRWCrossing Visualize all elements of the railway crossing in a dynamic manner (i.e. show the trains moving, the gate opening and closing, ...). In a separate window, update the graphical information upon the reception of on of the following signals:

- newGate(position); position = opened/closed

- newSignal(trackName, status); status = red/greed

- newTrainPos(trackName, position)

Visualization
sendArbitrarySignals Send an arbitrary signal. Upon pressing the buttonSend, send the signal and parameters to the system as entered in textFieldG1. Generic
 
Attributes
ModelName FullName Type Value Description
 
Signals
ModelName FullName Type Components Parameters Description