Uses of Class
com.amalgamasimulation.trains.RailTrack
Packages that use RailTrack
-
Uses of RailTrack in com.amalgamasimulation.trains
Fields in com.amalgamasimulation.trains declared as RailTrackFields in com.amalgamasimulation.trains with type parameters of type RailTrackMethods in com.amalgamasimulation.trains that return RailTrackModifier and TypeMethodDescriptionTrainsEnvironment.addRailTrack(RailNode sourceNode, RailNode destNode, String name, Polyline forwardPolyline) TrainsEnvironment.createNewRailTrack(String name, Graph<RailNode, RailArc>.Arc forwardArc, Graph<RailNode, RailArc>.Arc backwardArc) Creates a newRailTrackwith the specified name and connecting arcs.Train.getCurrentTrack()Returns the track where the head of the train is currently located.RailArc.getTrack()Returns the track which this rail arc belongs to.RailDestination.getTrack()Returns the track which this position points to.Methods in com.amalgamasimulation.trains that return types with arguments of type RailTrackModifier and TypeMethodDescriptionTrain.getCurrentTracks()Returns the track where the head of the train is currently located.TrainRoute.getTracks()Returns an unmodifiable view of allRailTracks in this route.Methods in com.amalgamasimulation.trains with parameters of type RailTrackModifier and TypeMethodDescriptionvoidTrain.afterEnteredTrack(RailTrack track) Called immediately after the head of the train enters the specified track.
Can be overridden in subclasses.voidTrain.beforeExitedTrack(RailTrack track) Called right before the tail of the train exits the specified track.
Can be overridden in subclasses.Method parameters in com.amalgamasimulation.trains with type arguments of type RailTrackModifier and TypeMethodDescriptionTrainsEnvironment.calculateRoute(GeometricGraphPosition<RailNode, RailArc> sourcePosition, GeometricGraphPosition<RailNode, RailArc> destPosition, Train train, BiPredicate<RailTrack, Object> considerBookedTracks, Predicate<Train> considerTrainsPredicate, Set<RailArc> prohibitedArcs, List<RailNode> visitNodes, double beginTime, double velocity) Calculates a route for the specifiedTrainfrom a source position to a destination position.Train.calculateRouteTo(TrainsEnvironment.TrainDirection movementStartTrainDirection, GeometricGraphPosition<RailNode, RailArc> destPosition, BiPredicate<RailTrack, Object> considerBookedTracks, Predicate<Train> considerTrainsPredicate, List<RailNode> visitNodes, Set<RailArc> prohibitedArcs, double beginTime, double velocity) Calculates a route for this train from a head or a tail to destination position.RailTrack.getBookingSlots(BiPredicate<RailTrack, Object> considerBookedTracks) Returns a list ofBookingSlots that satisfy the specified condition.doubleTrainRoute.getEndMovementTime(Train train, double beginTime, double trainVelocity, GeometricGraphPath<RailNode, RailArc> sourceSelfPath, BiPredicate<RailTrack, Object> considerBookedTracks, Predicate<Train> considerTrainsPredicate, Set<RailArc> prohibitedArcs) Returns the earliest possible end time for movement along this route, taking into account other trains standing on the tracks and booked tracks.RailTrack.getFreeMovementGaps(BiPredicate<RailTrack, Object> considerBookedTracks) Returns anIntervalSetrepresenting the time intervals during which this track is not booked (i.e., free for movement).doubleTrainRoute.getStartMovementTime(Train train, double beginTime, double trainVelocity, GeometricGraphPath<RailNode, RailArc> sourceSelfPath, BiPredicate<RailTrack, Object> considerBookedTracks, Predicate<Train> considerTrainsPredicate, Set<RailArc> prohibitedArcs) Returns the earliest possible start time for movement along this route, taking into account other trains standing on the tracks and booked tracks.booleanTrainRoute.isAvailableFor(Train train, double beginTime, double trainVelocity, GeometricGraphPath<RailNode, RailArc> sourceSelfPath, BiPredicate<RailTrack, Object> considerBookedTracks, Predicate<Train> considerTrainsPredicate, Set<RailArc> prohibitedArcs) Checks whether this route is available for the specifiedTrainto start moving.Train.tryMoveTo(TrainsEnvironment.TrainDirection movementStartTrainDirection, List<RailDestination> railDestinations, BiPredicate<RailTrack, Object> considerBookedTracks, Predicate<Train> considerTrainsPredicate, List<RailNode> visitNodes, Set<RailArc> prohibitedArcs, double beginTime, double velocity) Attempts to move the train to one of the specified rail destinations along the best available route.