1#ifndef NETSIGNALGROUPCONTROLLERWITHQUEUING_H
2#define NETSIGNALGROUPCONTROLLERWITHQUEUING_H
5#include "../util/map.h"
6#include "../util/vector.h"
27 std::deque<std::pair<std::shared_ptr<Train>,
double>> waitingTrains;
73 void addNode(std::shared_ptr<NetNode> node);
84 void addTrain(std::shared_ptr<Train> train,
double simulatorTime);
98 std::shared_ptr<NetSignal> networkSignal,
99 double& simulatorTime,
100 Vector<std::shared_ptr<NetSignal>> &sameDirectionSignals);
115 std::shared_ptr<NetSignal> networkSignal,
116 double& simulatorTime,
117 Vector<std::shared_ptr<NetSignal>> &sameDirectionSignals);
127 std::pair<Vector<std::shared_ptr<NetSignal> >,
150 void setOpenSignals(
Vector<std::shared_ptr<NetSignal>>& sameDirectionSignals);
158 void clearMovements();
A map.
Definition map.h:26
The NetLink class represents a network link in a simulation.
Definition netlink.h:36
The NetNode class represents a network node in a simulation.
Definition netnode.h:35
Responsible for controlling and queuing network signals and managing train movements.
Definition netsignalgroupcontrollerwithqueuing.h:21
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.
Definition netsignalgroupcontrollerwithqueuing.cpp:100
std::pair< Vector< std::shared_ptr< NetSignal > >, Vector< std::shared_ptr< NetSignal > > > getFeedback()
Get Feedback.
Definition netsignalgroupcontrollerwithqueuing.cpp:179
void clearTimeoutTrains(double simulatorTime)
Definition netsignalgroupcontrollerwithqueuing.cpp:153
void updateTimeStep(std::shared_ptr< Train > train, std::shared_ptr< NetSignal > networkSignal, double &simulatorTime, Vector< std::shared_ptr< NetSignal > > &sameDirectionSignals)
Update Time Step.
Definition netsignalgroupcontrollerwithqueuing.cpp:59
void turnOffSignals(Vector< std::shared_ptr< NetSignal > > turnOffSignals)
Turn off signal.
Definition netsignalgroupcontrollerwithqueuing.cpp:208
void addNode(std::shared_ptr< NetNode > node)
Clear Movements.
Definition netsignalgroupcontrollerwithqueuing.cpp:37
void addTrain(std::shared_ptr< Train > train, double simulatorTime)
Add Train.
Definition netsignalgroupcontrollerwithqueuing.cpp:86
Vector< std::shared_ptr< NetSignal > > getControllerSignals()
Get the signals this controller is managing.
Definition netsignalgroupcontrollerwithqueuing.cpp:221
The NetSignal class represents a network signal in a simulation.
Definition netsignal.h:35
A train.
Definition train.h:42
A vector.
Definition vector.h:24