Uses of Class
com.amalgamasimulation.graphagent.GeometricGraphPosition
Packages that use GeometricGraphPosition
-
Uses of GeometricGraphPosition in com.amalgamasimulation.graphagent
Methods in com.amalgamasimulation.graphagent that return GeometricGraphPositionModifier and TypeMethodDescriptionGeometricGraphArcRecord.beginPosition()Returns the value of thebeginPositionrecord component.GeometricGraphArcRecord.endPosition()Returns the value of theendPositionrecord component.GeometricGraphPosition.getArcBeginPosition()Returns the instance ofGeometricGraphPositionpointing to the very beginning of the arc of this position, ornullif this position points to a nodeGeometricGraphPosition.getArcEndPosition()Returns the instance ofGeometricGraphPositionpointing to the very end of the arc of this position, ornullif this position points to a nodeLongAgent.getCurrentHeadPosition()Returns aGeometricGraphPositionwhere the head of this long agent is currently located, ornullif this agent is not in a graph.GraphAgent.getCurrentPosition()Returns current position of this agent in form ofGeometricGraphPosition, ornullif this agent is not currently in graphLongAgent.getCurrentTailPosition()Returns aGeometricGraphPositionwhere the tail of this long agent is currently located, ornullif this agent is not in a graph.GeometricGraphPath.getDestPosition()Returns the destination position of this path.AgentGraphPath.getFinalDestPosition()Returns the position representing the final destination position of an agent moving along this path, i.e.AgentGraphPath.getInitialSourcePosition()Returns the position representing the initial source position of an agent moving along this path, i.e.GeometricGraphPath.getPositionAtOffset(double absoluteOffset) Returns aGeometricGraphPositionpointing to the position at the specified absolute offset from the beginning of this path.GeometricGraphPosition.getReverse(Graph<N, A> graph) Returns the position pointing to the corresponding point of the reverse arcGeometricGraphPath.getSourcePosition()Returns the source position of this path.static <N extends GeometricGraphNode,A extends GeometricGraphArc>
GeometricGraphPosition<N, A> Returns an instance ofGeometricGraphPositionpointing to the point on the specified arc located at the specified absolute offset from arc's beginning.static <N extends GeometricGraphNode,A extends GeometricGraphArc>
GeometricGraphPosition<N, A> Returns an instance ofGeometricGraphPositionpointing to the specified graph node.Methods in com.amalgamasimulation.graphagent that return types with arguments of type GeometricGraphPositionModifier and TypeMethodDescriptionGeometricGraphPosition.getAdjacent(Graph<N, A> graph) Returns the list of positions that are adjacent to this position, including this same position.List<GeometricGraphPosition<?, ?>> AgentGraphArc.getCallbackPositions()Returns an unmodifiable list of all callback positions belonging to this arc.List<GeometricGraphPosition<?, ?>> AgentGraphArcImpl.getCallbackPositions()AgentGraphNode.getCallbackPositions()Returns an unmodifiable list of all callback positions belonging to this node.AgentGraphNodeImpl.getCallbackPositions()GraphEnvironment.getDestsAndWeights(GeometricGraphPosition<N, A> destPosition, K weightKey) LongAgent.getPositionInsideAgent(List<GeometricGraphPosition<N, A>> destPositions) GraphEnvironment.getSourcesAndWeights(GeometricGraphPosition<N, A> sourcePosition, K weightKey) Methods in com.amalgamasimulation.graphagent with parameters of type GeometricGraphPositionModifier and TypeMethodDescriptionvoidAgentGraphArc.addCallbackPosition(GeometricGraphPosition<?, ?> position) Adds the specified callback position to this arc.voidAgentGraphArcImpl.addCallbackPosition(GeometricGraphPosition<?, ?> position) voidAgentGraphNode.addCallbackPosition(GeometricGraphPosition position) Adds the specified callback position to this node.voidAgentGraphNodeImpl.addCallbackPosition(GeometricGraphPosition position) voidGraphAgent.addCallbackPosition(GeometricGraphPosition<N, A> position) Adds a callback position that will initiate callingGraphAgent.onCallbackPositionReached(GeometricGraphPosition, boolean)method when this agent reaches the specified position.booleanGeometricGraphPath.containsPosition(GeometricGraphPosition<N, A> position) Checks whether this path contains the specified position, i.e.booleanGeometricGraphPath.containsPositionOrReverse(GeometricGraphPosition<N, A> position, Graph<N, A> graph) Checks whether this path contains the specified position, i.e.protected AgentGraphPath<N, A> LongAgent.createPathForTailAgent(GraphPath<N, A> path, GeometricGraphPosition<N, A> destPosition, GeometricGraphPosition<N, A> actualDestPosition) booleanGeometricGraphPosition.equalsOrAdjacent(GeometricGraphPosition<N, A> otherPosition, Graph<N, A> graph) Returnstrueif this position is equal to or adjacent with the specified position,falseotherwise.booleanGeometricGraphPosition.equalsOrReverse(GeometricGraphPosition<N, A> otherPosition, Graph<N, A> graph) Returnstrueif this position is equal to either the specified position or the reverse position of the specified one, andfalseotherwiseGraphEnvironment.getClosestNodes(GeometricGraphPosition<N, A> sourcePosition, Predicate<Graph<N, A>.Node> destNodeIndicator, double range) GraphEnvironment.getClosestNodes(GeometricGraphPosition<N, A> sourcePosition, Predicate<Graph<N, A>.Node> destNodeIndicator, double range, int maxNodesCount) GraphEnvironment.getDestsAndWeights(GeometricGraphPosition<N, A> destPosition, K weightKey) protected AgentGraphPath<N, A> GraphEnvironment.getSameOrReverseArcPath(GeometricGraphPosition<N, A> sourcePosition, GeometricGraphPosition<N, A> destPosition, GraphAgent<N, A> agent) protected AgentGraphPath<N, A> GraphAgent.getShortestPath(GeometricGraphPosition<N, A> destPosition) GraphEnvironment.getShortestPath(GeometricGraphPosition<N, A> sourcePosition, GeometricGraphPosition<N, A> destPosition) GraphEnvironment.getShortestPath(GeometricGraphPosition<N, A> sourcePosition, GeometricGraphPosition<N, A> destPosition, GraphAgent<N, A> agent) Returns the shortest path from the specified source position to the specified destination position for the specified agent, ornullif no such path exists.GraphEnvironment.getShortestPath(GeometricGraphPosition<N, A> sourcePosition, Predicate<Graph<N, A>.Node> destNodeIndicator) GraphEnvironment.getShortestPath(GeometricGraphPosition<N, A> sourcePosition, Predicate<Graph<N, A>.Node> destNodeIndicator, GraphAgent<N, A> agent) Returns the shortest path from the specified source position to the closest node on which the specified predicate returnstrue, ornullif no such path exists or the predicate returnsfalsefor all nodes reachable from the source position.protected AgentGraphPath<N, A> LongAgent.getShortestPath(GeometricGraphPosition<N, A> destPosition) LongAgentsEnvironment.getShortestPath(GeometricGraphPosition<N, A> sourcePosition, GeometricGraphPosition<N, A> destPosition, GraphAgent<N, A> agent) GraphEnvironment.getShortestPathToClosest(GeometricGraphPosition<N, A> sourcePosition, List<GeometricGraphPosition<N, A>> destPositions, GraphAgent<N, A> agent) Returns the shortest path from the specified source position to the closest one of the specified destination positions for the specified agent, ornullif neither of the specified destination positions is reachable from the source position.GraphEnvironment.getSourcesAndWeights(GeometricGraphPosition<N, A> sourcePosition, K weightKey) booleanGeometricGraphPosition.isOnSameOrReverseArc(GeometricGraphPosition<N, A> otherPosition, Graph<N, A> graph) Returnstrueif this position points to a place on the same or reverse arc with the specified arc.GraphAgent.jumpTo(GeometricGraphPosition<N, A> position) Jumps this agent to the specified position.LongAgent.jumpTo(GeometricGraphPosition<N, A> position) voidJumps this agent to the specified position and places it on the specified list of previous arcs.GraphAgent.moveTo(GeometricGraphPosition<N, A> destPosition, double velocity) Starts moving this agent to the specified destination position in the graph with the specified velocity along the shortest path from agent's current position.LongAgent.moveTo(GeometricGraphPosition<N, A> destPosition, double velocity) protected voidGraphAgent.moveToInternal(GeometricGraphPosition<N, A> destPosition, double velocity) static <N extends GeometricGraphNode,A extends GeometricGraphArc>
GeometricGraphPath<N, A> GeometricGraphPath.of(GeometricGraphPosition<N, A> position) Creates a new zero-length path consisting only of the specified position.voidAgentGraphArc.onAgentReachedPosition(GraphAgent<?, ?> graphAgent, GeometricGraphPosition<?, ?> position) Callback method called when an agent reaches the specified callback position belonging to this arc.voidAgentGraphArcImpl.onAgentReachedPosition(GraphAgent<?, ?> graphAgent, GeometricGraphPosition<?, ?> position) voidAgentGraphNode.onAgentReachedPosition(GraphAgent graphAgent, GeometricGraphPosition position) Callback method called when an agent reaches a callback position belonging to this node.voidAgentGraphNodeImpl.onAgentReachedPosition(GraphAgent graphAgent, GeometricGraphPosition position) voidGraphAgent.onCallbackPositionReached(GeometricGraphPosition<N, A> postition, boolean isAgentCallback) Callback method called when this agent reaches a callback position.voidGraphAgent.onDestinationReached(GeometricGraphPosition<N, A> destPosition) Callback method called after this agent reaches its destination, i.e.voidLongAgent.onDestinationReached(GeometricGraphPosition<N, A> destPosition) voidAgentGraphArc.removeCallbackPosition(GeometricGraphPosition<?, ?> position) Removes the specified callback position previously added byAgentGraphArc.addCallbackPosition(GeometricGraphPosition)method from this arc.voidAgentGraphArcImpl.removeCallbackPosition(GeometricGraphPosition<?, ?> position) voidAgentGraphNode.removeCallbackPosition(GeometricGraphPosition position) Removes the specified callback position previously added byAgentGraphNode.addCallbackPosition(GeometricGraphPosition)method, from this node.voidAgentGraphNodeImpl.removeCallbackPosition(GeometricGraphPosition position) voidGraphAgent.removeCallbackPosition(GeometricGraphPosition<N, A> position) Removes a callback position previously added byGraphAgent.addCallbackPosition(GeometricGraphPosition)method.protected AgentGraphPath<N, A> GraphEnvironment.tryGetZeroLengthPathBetweenAdjacentPositions(GeometricGraphPosition<N, A> sourcePosition, GeometricGraphPosition<N, A> destPosition) Tries to find and return a zero-length path between the two adjacent positions.Method parameters in com.amalgamasimulation.graphagent with type arguments of type GeometricGraphPositionModifier and TypeMethodDescriptionprotected voidLongAgent.checkPositionsInsideAgent(List<GeometricGraphPosition<N, A>> destPositions) LongAgent.getPositionInsideAgent(List<GeometricGraphPosition<N, A>> destPositions) protected AgentGraphPath<N, A> LongAgent.getShortestHeadTailPath(Function<GeometricGraphPosition<N, A>, AgentGraphPath<N, A>> pathFunction) protected AgentGraphPath<N, A> GraphAgent.getShortestPathToClosest(List<GeometricGraphPosition<N, A>> destPositions) GraphEnvironment.getShortestPathToClosest(GeometricGraphPosition<N, A> sourcePosition, List<GeometricGraphPosition<N, A>> destPositions, GraphAgent<N, A> agent) Returns the shortest path from the specified source position to the closest one of the specified destination positions for the specified agent, ornullif neither of the specified destination positions is reachable from the source position.protected AgentGraphPath<N, A> LongAgent.getShortestPathToClosest(List<GeometricGraphPosition<N, A>> destPositions) GraphAgent.moveToClosest(List<GeometricGraphPosition<N, A>> destPositions, double velocity) Starts moving this agent to the closest one of the specified destination positions in the graph with the specified velocity along the shortest path from this agent's current position.LongAgent.moveToClosest(List<GeometricGraphPosition<N, A>> destPositions, double velocity) protected voidGraphAgent.moveToClosestInternal(List<GeometricGraphPosition<N, A>> destPositions, double velocity) voidGraphAgent.onPathNotFound(List<GeometricGraphPosition<N, A>> possibleDestinationPositions) Callback method called when no path can be found from this agent's position to the destination specified in one of the overloads ofmoveToormoveToClosestmethod.Constructors in com.amalgamasimulation.graphagent with parameters of type GeometricGraphPositionModifierConstructorDescriptionGeometricGraphArcRecord(int arcIndex, Graph<N, A>.Arc arc, Interval arcAbsOffsets, Interval pathAbsOffsets, GeometricGraphPosition<N, A> beginPosition, GeometricGraphPosition<N, A> endPosition) Creates an instance of aGeometricGraphArcRecordrecord class.GeometricGraphPath(GraphPath<N, A> path, GeometricGraphPosition<N, A> sourcePosition, GeometricGraphPosition<N, A> destPosition) Creates a new instance of graph path by the specifiedGraphPathGeometricGraphPath(GeometricGraphPosition<N, A> position) Creates a trivial zero-length graph path consisting of single position and a trajectory of one point. -
Uses of GeometricGraphPosition in com.amalgamasimulation.trains
Fields in com.amalgamasimulation.trains with type parameters of type GeometricGraphPositionModifier and TypeFieldDescriptionprotected Map<GeometricGraphPosition<?, ?>, BiConsumer<Train, Boolean>> RailArc.callbacksMethods in com.amalgamasimulation.trains that return GeometricGraphPositionModifier and TypeMethodDescriptionTrainRoute.getDestPosition()Returns the dest position of this route.RailDestination.getGeometricGraphPosition(double trainLength) Returns an instance ofGeometricGraphPositionwhich represents this position in the underlying rail graph considering which side of the train should arrive at the destination.TrainRoute.getSourcePosition()Returns the source position of this route.Methods in com.amalgamasimulation.trains with parameters of type GeometricGraphPositionModifier and TypeMethodDescriptionvoidRailArc.addCallbackPosition(GeometricGraphPosition<?, ?> position, BiConsumer<Train, Boolean> callback) 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.Train.calculateRouteTo(GeometricGraphPosition<RailNode, RailArc> destPosition, boolean considerBookedTracks, boolean considerTrainsPredicate, double velocity) Calculates a route for this train from a head or a tail to destination position.Train.calculateRouteTo(GeometricGraphPosition<RailNode, RailArc> destPosition, boolean considerBookedTracks, boolean considerTrainsPredicate, List<RailNode> visitNodes, double velocity) Calculates a route for this train from a head or a tail to destination position.Train.calculateRouteTo(TrainsEnvironment.TrainDirection movementStartTrainDirection, GeometricGraphPosition<RailNode, RailArc> destPosition, boolean considerBookedTracks, boolean considerTrainsPredicate, double velocity) Calculates a route for this train from a head or a tail to destination position.Train.calculateRouteTo(TrainsEnvironment.TrainDirection movementStartTrainDirection, GeometricGraphPosition<RailNode, RailArc> destPosition, boolean considerBookedTracks, boolean considerTrainsPredicate, List<RailNode> visitNodes, double velocity) Calculates a route for this train from a head or a tail to destination position.Train.calculateRouteTo(TrainsEnvironment.TrainDirection movementStartTrainDirection, GeometricGraphPosition<RailNode, RailArc> destPosition, boolean considerBookedTracks, boolean considerTrainsPredicate, List<RailNode> visitNodes, Set<RailArc> prohibitedArcs, double velocity) Calculates a route for this train from a head or a tail to 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.TrainsEnvironment.getShortestPath(GeometricGraphPosition<RailNode, RailArc> sourcePosition, GeometricGraphPosition<RailNode, RailArc> destPosition) TrainsEnvironment.getShortestPath(GeometricGraphPosition<RailNode, RailArc> sourcePosition, Predicate<Graph<RailNode, RailArc>.Node> destNodeIndicator) Train.jumpTo(GeometricGraphPosition<RailNode, RailArc> position, boolean shouldBookArcs) Jumps this agent to the specified position.Train.moveTo(GeometricGraphPosition<RailNode, RailArc> destPosition, double velocity) static RailDestinationRailDestination.of(GeometricGraphPosition<RailNode, RailArc> geometricGraphPosition) Creates a new instance of the rail destination by the specifiedGeometricGraphPosition.static RailDestinationRailDestination.of(GeometricGraphPosition<RailNode, RailArc> geometricGraphPosition, TrainsEnvironment.TrainDirection movementEndTrainDirection) Creates a new instance of the rail destination by the specifiedGeometricGraphPositionand information about which side of the train should arrive at the destination.voidRailArc.onAgentReachedPosition(GraphAgent<?, ?> graphAgent, GeometricGraphPosition<?, ?> position) voidTrain.onDestinationReached(GeometricGraphPosition<RailNode, RailArc> destPosition) Method parameters in com.amalgamasimulation.trains with type arguments of type GeometricGraphPositionModifier and TypeMethodDescriptionTrain.moveToClosest(List<GeometricGraphPosition<RailNode, RailArc>> destPositions, double velocity) Constructors in com.amalgamasimulation.trains with parameters of type GeometricGraphPositionModifierConstructorDescriptionRailDestination(GeometricGraphPosition<RailNode, RailArc> geometricGraphPosition) Creates a new instance of the rail destination by the specifiedGeometricGraphPosition.RailDestination(GeometricGraphPosition<RailNode, RailArc> geometricGraphPosition, TrainsEnvironment.TrainDirection movementEndTrainDirection) Creates a new instance of the rail destination by the specifiedGeometricGraphPositionand information about which side of the train should arrive at the destination.