Uses of Class
com.amalgamasimulation.trains.Train
Packages that use Train
-
Uses of Train in com.amalgamasimulation.trains
Fields in com.amalgamasimulation.trains declared as TrainFields in com.amalgamasimulation.trains with type parameters of type TrainModifier and TypeFieldDescriptionprotected Map<GeometricGraphPosition<?, ?>, BiConsumer<Train, Boolean>> RailArc.callbacksTrainsEnvironment.considerTrainsPredicateMethods in com.amalgamasimulation.trains that return TrainModifier and TypeMethodDescriptionCouples this train with another train to form a new combined train.TrainsEnvironment.createNewTrain(List<? extends RailCar> cars) Creates a newTraincomposed of the specified list of rail cars.RailCar.getTrain()Returns theTrainthis railcar is assigned to.Methods in com.amalgamasimulation.trains that return types with arguments of type TrainModifier and TypeMethodDescriptionRailTrack.getTrains()Returns the list of trains occupying (maybe partially) this track.Train.split(int carsFromHead) Splits this train into two separate trains at the specified number of cars from the head.Train.split(int carsFromHead) Splits this train into two separate trains at the specified number of cars from the head.Methods in com.amalgamasimulation.trains with parameters of type TrainModifier and TypeMethodDescriptionprotected voidRailTrack.afterHeadEntered(Train train) Callback that is called immediately after head of a train enters this track.protected voidRailTrack.beforeTailExited(Train train) Callback that is called right before tail of a train exits this track.TrainsEnvironment.calculateRoute(GeometricGraphPosition<RailNode, RailArc> sourcePosition, GeometricGraphPosition<RailNode, RailArc> destPosition, Train train, boolean considerBookedTracks, boolean considerTrainsPredicate, Set<RailArc> prohibitedArcs, double beginTime, double velocity) Calculates a route for the specifiedTrainfrom a source position to a destination position.TrainsEnvironment.calculateRoute(GeometricGraphPosition<RailNode, RailArc> sourcePosition, GeometricGraphPosition<RailNode, RailArc> destPosition, Train train, boolean considerBookedTracks, boolean considerTrainsPredicate, Set<RailArc> prohibitedArcs, List<RailNode> visitNodes, double beginTime, double velocity) Calculates a route for the specifiedTrainfrom a source position to a destination position.TrainsEnvironment.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.TrainsEnvironment.calculateRouteOrBarrierArcs(GeometricGraphPosition<RailNode, RailArc> sourcePosition, GeometricGraphPosition<RailNode, RailArc> destPosition, Train train, boolean considerBookedTracks, boolean considerTrainsPredicate, Set<RailArc> prohibitedArcs, double beginTime, double velocity) Calculates a route and barriers arcs for the specifiedTrainfrom a source position to a destination position.TrainsEnvironment.calculateRouteOrBarrierArcs(GeometricGraphPosition<RailNode, RailArc> sourcePosition, GeometricGraphPosition<RailNode, RailArc> destPosition, Train train, boolean considerBookedTracks, boolean considerTrainsPredicate, Set<RailArc> prohibitedArcs, List<RailNode> visitNodes, double beginTime, double velocity) Calculates a route and barriers arcs for the specifiedTrainfrom a source position to a destination position.Couples this train with another train to form a new combined train.doubleTrainRoute.getEndMovementTime(Train train, double beginTime, double trainVelocity, GeometricGraphPath<RailNode, RailArc> sourceSelfPath, boolean considerBookedTracks, boolean considerTrainsPredicate) Returns the earliest possible end time for movement along this route, taking into account other trains standing on the tracks and booked tracks.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.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) Checks whether this route is available for the specifiedTrainto start moving.booleanTrainRoute.isAvailableFor(Train train, double beginTime, double trainVelocity, GeometricGraphPath<RailNode, RailArc> sourceSelfPath, boolean considerBookedTracks, boolean considerTrainsPredicate) Checks whether this route is available for the specifiedTrainto start moving.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.voidAssigns this railcar to aTrainand defines its position within the train.Method parameters in com.amalgamasimulation.trains with type arguments of type TrainModifier and TypeMethodDescriptionvoidRailArc.addCallbackPosition(GeometricGraphPosition<?, ?> position, BiConsumer<Train, Boolean> callback) doubleTrainsEnvironment.calculatePartialArcWeight(RailArc arcValue, double startAbsOffset, double endAbsOffset, Set<RailArc> prohibitedArcs, Predicate<Train> considerTrainsPredicate) Calculates the weight of a partial arc segment between the specified absolute offsets.TrainsEnvironment.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.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.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.