public abstract class PHDAlgorithmImpl extends Analysis implements APISignaller
| Constructor and Description |
|---|
PHDAlgorithmImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
initialise(BraveSignallerContext context,
java.lang.String simId,
java.lang.String scenarioId,
java.util.List<java.lang.String> tdSections,
java.util.List<java.lang.String> signals,
java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>> routeDescriptions,
java.util.HashMap<java.lang.String,java.lang.String> trainTypes)
Initialise the junction, route descriptions and scenario.
|
void |
notifyArrival(java.lang.String arrivingTrain,
java.util.Date time,
java.lang.String stopId)
Debug analysis of arrivals.
|
void |
notifyRouteInfo(java.lang.String serviceName,
java.util.HashMap<java.lang.String,java.lang.String> signalRouteMap,
java.util.HashMap<java.lang.String,java.lang.Double> tdSectionDistances,
java.util.HashMap<java.lang.String,java.lang.Double> signalDistances,
java.util.HashMap<java.lang.Integer,java.lang.Double> stopTimes,
java.util.HashMap<java.lang.Double,java.lang.String> stopNames,
java.util.ArrayList<SpeedLimit> speedLimits,
java.util.ArrayList<Gradient> gradients)
Notifies route info.
|
void |
notifyTDSectionOccupation(java.lang.String tdSection,
java.lang.String occupyingTrain)
Response to the events that we registered for in initialise.
|
void |
notifyTrain(java.lang.String trainId,
double distance,
double speed)
Notify plugin of the exact location and speed of a train.
|
void |
notifyTrainServices(java.lang.String trainName,
java.lang.String serviceName)
Notify that the train has started to operate the specified service
|
void |
update(double elapsedTime,
java.util.Date simTime)
Update method called once per time step
|
initialisepublic void initialise(BraveSignallerContext context, java.lang.String simId, java.lang.String scenarioId, java.util.List<java.lang.String> tdSections, java.util.List<java.lang.String> signals, java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.String>> routeDescriptions, java.util.HashMap<java.lang.String,java.lang.String> trainTypes)
initialise in interface APISignallertdSections - TDSections in this junctionsignals - Signals in this junctionrouteDescriptions - HashMap of RouteName and ArrayList of public void notifyTDSectionOccupation(java.lang.String tdSection,
java.lang.String occupyingTrain)
notifyTDSectionOccupation in interface APISignallerpublic void notifyTrainServices(java.lang.String trainName,
java.lang.String serviceName)
APISignallernotifyTrainServices in interface APISignallerpublic void notifyRouteInfo(java.lang.String serviceName,
java.util.HashMap<java.lang.String,java.lang.String> signalRouteMap,
java.util.HashMap<java.lang.String,java.lang.Double> tdSectionDistances,
java.util.HashMap<java.lang.String,java.lang.Double> signalDistances,
java.util.HashMap<java.lang.Integer,java.lang.Double> stopTimes,
java.util.HashMap<java.lang.Double,java.lang.String> stopNames,
java.util.ArrayList<SpeedLimit> speedLimits,
java.util.ArrayList<Gradient> gradients)
APISignallernotifyRouteInfo in interface APISignallerserviceName - The name of the trainsignalRouteMap - A signal and the corresponding route the train requires.tdSectionDistances - A list of TDSections on the train's journey, with distances along the journey.signalDistances - A list of Signals on the train's journey, with distances along the journey.stopNames - A list of stop IDs indexed by distance.public void notifyTrain(java.lang.String trainId,
double distance,
double speed)
APISignallernotifyTrain in interface APISignallerpublic void update(double elapsedTime,
java.util.Date simTime)
APISignallerupdate in interface APISignallerpublic void notifyArrival(java.lang.String arrivingTrain,
java.util.Date time,
java.lang.String stopId)
notifyArrival in interface APISignallernotifyArrival in class Analysis