Responsible for controlling and queuing network signals and managing train movements. More...
#include <netsignalgroupcontrollerwithqueuing.h>
Public Member Functions | |
NetSignalGroupControllerWithQueuing (std::set< std::shared_ptr< NetNode > > nodes, double timeStep) | |
Constructor. | |
Vector< std::shared_ptr< NetSignal > > | getControllerSignals () |
Get the signals this controller is managing. | |
void | addNode (std::shared_ptr< NetNode > node) |
Clear Movements. | |
void | addTrain (std::shared_ptr< Train > train, double simulatorTime) |
Add Train. | |
void | sendPassRequestToControlTo (std::shared_ptr< Train > train, std::shared_ptr< NetSignal > networkSignal, double &simulatorTime, Vector< std::shared_ptr< NetSignal > > &sameDirectionSignals) |
Send Pass Request to Control. | |
void | clearTimeoutTrains (double simulatorTime) |
void | updateTimeStep (std::shared_ptr< Train > train, std::shared_ptr< NetSignal > networkSignal, double &simulatorTime, Vector< std::shared_ptr< NetSignal > > &sameDirectionSignals) |
Update Time Step. | |
std::pair< Vector< std::shared_ptr< NetSignal > >, Vector< std::shared_ptr< NetSignal > > > | getFeedback () |
Get Feedback. | |
void | turnOffSignals (Vector< std::shared_ptr< NetSignal > > turnOffSignals) |
Turn off signal. | |
Responsible for controlling and queuing network signals and managing train movements.
NetSignalGroupControllerWithQueuing::NetSignalGroupControllerWithQueuing | ( | std::set< std::shared_ptr< NetNode > > | nodes, |
double | timeStep | ||
) |
Constructor.
nodes | Set of shared pointers to NetNode. |
timeStep | Time step for the signal controller. |
void NetSignalGroupControllerWithQueuing::addNode | ( | std::shared_ptr< NetNode > | node | ) |
Clear Movements.
void NetSignalGroupControllerWithQueuing::addTrain | ( | std::shared_ptr< Train > | train, |
double | simulatorTime | ||
) |
void NetSignalGroupControllerWithQueuing::clearTimeoutTrains | ( | double | simulatorTime | ) |
Vector< std::shared_ptr< NetSignal > > NetSignalGroupControllerWithQueuing::getControllerSignals | ( | ) |
Get the signals this controller is managing.
void NetSignalGroupControllerWithQueuing::turnOffSignals | ( | Vector< std::shared_ptr< NetSignal > > | turnOffSignals | ) |
Turn off signal.
networkSignals | The network signals to be turned off. |