public class Loop extends Block
Modifier and Type | Field and Description |
---|---|
static java.util.ArrayList<java.lang.Integer> |
AllLoops |
static java.util.HashMap<java.lang.Integer,java.lang.String> |
loopNumToDirType |
static java.util.HashMap<java.lang.Integer,java.lang.String> |
loopNumToStn |
java.util.ArrayList<LoopTrainScheduleData> |
loopTrainScheduleDataList |
java.lang.String |
stationName |
int |
whetherMainLine
whetherMainLine
|
blockNo, defaultOverlapDistance, direction, downLinks, minimumBlockLength, speedRestrictionList, upLinks
endMilePost, maximumPossibleSpeed, startMilePost
BLOCK_ENTITY, LINK_ENTITY, LOOP_ENTITY
Constructor and Description |
---|
Loop() |
Loop(double startMilePost,
double endMilePost) |
Loop(java.io.StreamTokenizer st,
boolean isWarner) |
Modifier and Type | Method and Description |
---|---|
void |
forwardLoopTrainScheduleDataList() |
int |
getCrossMainLine() |
Train |
getLoopNextTrainToBeScheduled() |
java.lang.String |
getLoopTrainType() |
java.lang.String |
getLoopType() |
double |
getLoopVelocity() |
Loop |
getNextReferenceLoop(java.util.ArrayList<ReferenceTableEntry> referenceTables)
Get the loop number of the next reference entry of a scheduled train.
|
double |
getNextTrainToBeScheduledDepartureTime() |
java.lang.String |
getPlatformName() |
Station |
getStation() |
java.lang.String |
getStationName() |
int |
getWhetherMainLine() |
static int |
getWhetherMainLineFromType(java.lang.String loopType) |
boolean |
hasError() |
int |
inWhichInterval(double time) |
boolean |
isFreightLoop() |
boolean |
isLocked() |
boolean |
isPassengerLoop() |
void |
lock(double lockTime,
int trainNo) |
void |
setCrossMainLine(int crossMainLine) |
void |
setDirectEndMilePost(double endMilePost) |
void |
setEndMilePost(double endMilePost) |
void |
setLoopTrainType(java.lang.String loopType) |
void |
setLoopType(java.lang.String loopType) |
void |
setPlatformName(java.lang.String platformName) |
void |
setStation(Station station) |
void |
setWhetherMainLine(int whetherMainLine) |
StatusTraverseBlock |
traverseBlock(Train currTrain,
double arrivalTime,
double deptTime,
double startVelocity,
Link previousLink,
Link nextFastestLink,
double profileStartingMilePost,
SimulationInstance simulationInstance,
int nextReferenceLoopNumber)
Loop: StatusTraverseBlock traverseBlock((Train currTrain, double arrivalTime,
double deptTime, double startVelocity) 1) creates an instance of the
blockScheduler for this loop as the currentBlock and the currTrain 2) goes to
blockScheduler.traverseBlock(arrivalTime, deptTime, startVelocity)
(non-Javadoc)
|
void |
undoLoopTrainScheduleDataList() |
void |
unlock() |
boolean |
waitingPermitted()
(non-Javadoc)
|
addTinyBlocksToEmptyBlock, allowsTrain, calculateWarnerVelocityProfile, checkLastBlock, getBlockDirectionInInterval, getBlockName, getBlockNo, getBlockSignal, getDepartureTimeFromTrainNo, getDownDirectionOverlapDistance, getEarliestArrivalTime, getEarliestArrivalTime, getEmptyBlockWithTinyBlocksAdded, getEndMilePost, getGradientList, getGradientsString, getHasPathToBlockMap, getLastIntervalByTrain, getLinkCrossoversString, getLinkLengthsString, getLinkListString, getLinkPrioritiesString, getLogger, getMilePostsByNextLink, getMilePostsByPreviousLink, getNextBlock, getNextBlockByDirection, getNextLink, getNextLinks, getNextLinks, getNightsfsr, getNonOverlappingRunTimeReturn, getNonOverlappingRunTimeSignal, getOccupancyTimeByTrain, getOnlyActualOccupancies, getOverlapDistance, getOverlappingRunTimeReturn, getPath, getPreviousLinks, getRunTimeVelocity, getSfsr, getSignal, getSignalFailFlag, getSignalFailure, getSpeedLimitEndMilePostsString, getSpeedLimitsString, getSpeedLimitStartMilePostsString, getSpeedRestrictionList, getSpeedRestrictionsString, getStartMilePost, getTrainNoFromOccupancy, getUpDirectionOverlapDistance, getVelocityProfileArray, hasPath, hasPathTo, isDirectionOk, isFree, isLoop, isSignalFailed, isSignalRed, isWarner, printOccupancies, readCommonBlockLoopProperties, readSpeedRes, reserve, returnGradientFormat, returnMaxSpeedBetweenMilePosts, setBlockDirectionInInterval, setBlockName, setBlockNo, setBlockSignal, setEndMilePost, setEndMilePostDirectly, setGradientList, setLogger, setNextLinks, setNightsfsr, setPreviousLinks, setSfsr, setSignalFailFlag, setSignalFailure, setSpeedRestrictionList, setStartMilePost, setWarner, splitBlock, splitProfileForWarnerDistance, whenFree
getDirection, getEndMilePost, getLength, getMaximumPossibleSpeed, getOccupanciesToDisplay, getOccupy, getStartMilePost, getTinyBlockList, isFree, isFree, setDirection, setLength, setMaximumPossibleSpeed, setOccupied, setOccupied, setOccupy, setStartMilePost, setTinyBlockList
getEntityType, isBlock, isLink, setEntityType
public java.util.ArrayList<LoopTrainScheduleData> loopTrainScheduleDataList
public static java.util.ArrayList<java.lang.Integer> AllLoops
public static java.util.HashMap<java.lang.Integer,java.lang.String> loopNumToDirType
public static java.util.HashMap<java.lang.Integer,java.lang.String> loopNumToStn
public int whetherMainLine
public java.lang.String stationName
public Loop()
public Loop(double startMilePost, double endMilePost)
public Loop(java.io.StreamTokenizer st, boolean isWarner)
st
- isWarner
- public void setEndMilePost(double endMilePost)
setEndMilePost
in class Block
public void setDirectEndMilePost(double endMilePost)
public double getLoopVelocity()
public void setLoopType(java.lang.String loopType)
public void setLoopTrainType(java.lang.String loopType)
public boolean isFreightLoop()
isFreightLoop
in class Block
public boolean isPassengerLoop()
public java.lang.String getLoopType()
public java.lang.String getLoopTrainType()
public Station getStation()
public void setStation(Station station)
public int inWhichInterval(double time)
time
- public boolean waitingPermitted()
waitingPermitted
in class Block
Block.waitingPermitted()
public StatusTraverseBlock traverseBlock(Train currTrain, double arrivalTime, double deptTime, double startVelocity, Link previousLink, Link nextFastestLink, double profileStartingMilePost, SimulationInstance simulationInstance, int nextReferenceLoopNumber)
traverseBlock
in class Block
StatusTraverseBlock
Block#traverseBlock(Train, double, double, double)
public Loop getNextReferenceLoop(java.util.ArrayList<ReferenceTableEntry> referenceTables)
referenceTables
- public int getCrossMainLine()
public void setCrossMainLine(int crossMainLine)
public int getWhetherMainLine()
public void setWhetherMainLine(int whetherMainLine)
public java.lang.String getStationName()
public java.lang.String getPlatformName()
public void setPlatformName(java.lang.String platformName)
public boolean isLocked()
public void unlock()
public void lock(double lockTime, int trainNo)
public void forwardLoopTrainScheduleDataList()
public void undoLoopTrainScheduleDataList()
public Train getLoopNextTrainToBeScheduled()
public double getNextTrainToBeScheduledDepartureTime()
public static int getWhetherMainLineFromType(java.lang.String loopType)