public class FCFS extends PHDAlgorithmImpl implements APISignaller
| Constructor and Description |
|---|
FCFS() |
| 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 |
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 |
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
|
notifyArrival, notifyTraininitialiseequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnotifyArrival, notifyTrainpublic 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)
PHDAlgorithmImplinitialise in interface APISignallerinitialise in class PHDAlgorithmImpltdSections - 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 APISignallernotifyTDSectionOccupation in class PHDAlgorithmImplpublic void notifyTrainServices(java.lang.String trainName,
java.lang.String serviceName)
APISignallernotifyTrainServices in interface APISignallernotifyTrainServices in class PHDAlgorithmImplpublic 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 APISignallernotifyRouteInfo in class PHDAlgorithmImplserviceName - 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 update(double elapsedTime,
java.util.Date simTime)
APISignallerupdate in interface APISignallerupdate in class PHDAlgorithmImpl