public interface BraveDriverContext
Modifier and Type | Interface and Description |
---|---|
static class |
BraveDriverContext.APISignalState |
Modifier and Type | Method and Description |
---|---|
void |
driveTrain(double speed,
double distanceTravelled,
double currentSpeed,
double targetSpeed,
double energy) |
APIKinematicsResult |
getKinematics(double speed,
double targetSpeed,
boolean backwards,
double gradient,
double throttle)
Call to the train's kinematics.
|
double |
getNextPlannedStopDistance()
Gets the distance along the trainpath that the train is due to make its next stop.
|
java.lang.String |
getNextSignalName()
Gets the name of the next signal on the trainpath only if a sighting distance marker is not met between the
specified distance and the next signal.
|
BraveDriverContext.APISignalState |
getNextSignalState()
Gets the state of the next signal on the trainpath only if a sighting distance marker is not met between the
specified distance and the next signal.
|
int |
getSecondsIntoDay()
Gets the number of seconds into the day that the simulation time is set to.
|
double |
getSpeedLimitAtDistance(double distance)
Gets the speed limit at the specified distance.
|
APISpeedProfileResult |
getSpeedProfileSpeed(double distance,
boolean dispatch,
double slowDownOffset,
boolean ignoreSignals,
boolean determineDriverStatus,
double trainLength,
boolean onlySignals)
Slowdown offset should be current speed * deltaT, so the speed profile speed returned is the one at the next timestep in the future.
|
java.lang.String |
getTrainTypeName()
Gets the name of the traintype for the train represented by this context.
|
boolean |
isTrainDispatched() |
boolean |
isTrainDwelling() |
void |
setSpad(java.lang.String spadNode)
Sets the spad node in the train to the node with the specified name.
|
boolean isTrainDwelling()
boolean isTrainDispatched()
APISpeedProfileResult getSpeedProfileSpeed(double distance, boolean dispatch, double slowDownOffset, boolean ignoreSignals, boolean determineDriverStatus, double trainLength, boolean onlySignals)
distance
- dispatch
- slowDownOffset
- ignoreSignals
- determineDriverStatus
- trainLength
- onlySignals
- double getSpeedLimitAtDistance(double distance)
distance
- APIKinematicsResult getKinematics(double speed, double targetSpeed, boolean backwards, double gradient, double throttle)
void driveTrain(double speed, double distanceTravelled, double currentSpeed, double targetSpeed, double energy)
speed
- distanceTravelled
- currentSpeed
- targetSpeed
- energy
- Energy used in last timestep in Joules.void setSpad(java.lang.String spadNode)
spadNode
- double getNextPlannedStopDistance()
BraveDriverContext.APISignalState getNextSignalState()
java.lang.String getNextSignalName()
int getSecondsIntoDay()
java.lang.String getTrainTypeName()