Logging - BP2022-AP1/bp2022-ap1 GitHub Wiki

On this page all available logging functions should be explained and when they need to be used.

Log Creator

Train spawn

This function should be called when a train is being spawned. This should include a train identifier.

Train removal

This function should be called when a train is being removed. This should include a train identifier.

Train arrives at station

This function should be called when a train arrives at a station. This should include a train identifier and the station identifier.

Train departs from station

This function should be called when a train departs from a station. This should include a train identifier and the station identifier.

Create Fahrstrasse

This function should be called when a Fahrstrasse is being formed. This should include the definition of the Fahrstrasse.

Remove Fahrstrasse

This function should be called when a Fahrstrasse is being dissolved. This should include the definition of the Fahrstrasse.

Set signal

This function is being called when setting a signal or changing its state. This should include the signal identifier, the state before and the state after the change.

Fault injection

These functions should be called when injecting a fault into the simulation. This should include the fault configuration, the affected element, the value before and the value after the fault. For each fault type, there exists a seperate function.

Fault removal

This function should be called when injecting a platform blocked fault into the simulation. This should reference the fault configuration of the fault. For each fault type, there exists a seperate function.

Log Collector

Here are all functions listet, that can may be used by the DataScience component.

get_departures_arrivals_of_train(run_id, train_id)

Returns a Dataframe containing all departures and arrivals of the given train in the given run.

get_departures_arrivals_all_trains(run_id)

Returns a Dataframe containing all departures and arrivals of all trains in the given run.

get_edge_times_of_train(run_id, train_id)

Returns a Dataframe containing all edge times of the given train in the given run.

get_edge_times_all_trains(run_id)

Returns a Dataframe containing all edge times of all trains in the given run.

get_train_spawn_times(run_id)

Returns a Dataframe containing all spawn events of trains in the given run.

get_faults(run_id)

Returns a Dataframe containing all faults in the given run.