Uses of Class
com.amalgamasimulation.graphagent.GraphAgent
Packages that use GraphAgent
-
Uses of GraphAgent in com.amalgamasimulation.graphagent
Subclasses of GraphAgent in com.amalgamasimulation.graphagentModifier and TypeClassDescriptionclassLongAgent<N extends LongAgentGraphNode,A extends LongAgentGraphArc> Class representing a long agent that lives and moves inside aLongAgentsEnvironment.classLongAgentTail<N extends LongAgentGraphNode,A extends LongAgentGraphArc> Class representing a tail of aLongAgent.Fields in com.amalgamasimulation.graphagent with type parameters of type GraphAgentMethods in com.amalgamasimulation.graphagent that return types with arguments of type GraphAgentModifier and TypeMethodDescriptionList<GraphAgent<?, ?>> AgentGraphArc.getAgents()Returns an unmodifiable list of agents that are currently on this arc.List<GraphAgent<?, ?>> AgentGraphArcImpl.getAgents()AgentGraphNode.getAgents()Returns an unmodifiable list of agents that are currently at this node.AgentGraphNodeImpl.getAgents()List<GraphAgent<N, A>> GraphEnvironment.getAgents()Returns an unmodifiable list of all agents currently living in this environment.Methods in com.amalgamasimulation.graphagent with parameters of type GraphAgentModifier and TypeMethodDescriptionvoidAgentGraphArc.addAgent(GraphAgent<?, ?> graphAgent) Adds the specified agent to this arc, e.g.voidAgentGraphArcImpl.addAgent(GraphAgent<?, ?> graphAgent) voidAgentGraphNode.addAgent(GraphAgent graphAgent) Adds the specified agent to this node, e.g.voidAgentGraphNodeImpl.addAgent(GraphAgent graphAgent) protected voidGraphEnvironment.addAgentInternal(GraphAgent<N, A> agent) voidAgentGraphArc.afterAgentEntered(GraphAgent<?, ?> graphAgent) Callback method called after an agent enters this arc.voidAgentGraphArcImpl.afterAgentEntered(GraphAgent<?, ?> graphAgent) voidAgentGraphNode.afterAgentEntered(GraphAgent graphAgent) Callback method called after an agent enters this node.voidAgentGraphNodeImpl.afterAgentEntered(GraphAgent graphAgent) voidAgentGraphArc.beforeAgentExited(GraphAgent<?, ?> graphAgent) Callback method called before an agent exits this arc.voidAgentGraphArcImpl.beforeAgentExited(GraphAgent<?, ?> graphAgent) voidAgentGraphNode.beforeAgentExited(GraphAgent graphAgent) Callback method called before an agent exits this node.voidAgentGraphNodeImpl.beforeAgentExited(GraphAgent graphAgent) protected doubleGraphEnvironment.calculatePathWeight(GraphPath<N, A> path, GraphAgent<N, A> agent) booleanAgentGraphArc.containsAgent(GraphAgent<?, ?> graphAgent) Checks whether the specified agent is currently on this arc.booleanAgentGraphArcImpl.containsAgent(GraphAgent<?, ?> graphAgent) booleanAgentGraphNode.containsAgent(GraphAgent graphAgent) Checks whether the specified agent is at this node.booleanAgentGraphNodeImpl.containsAgent(GraphAgent graphAgent) GraphEnvironment.getClosestNodes(Graph<N, A>.Node sourceNode, Predicate<Graph<N, A>.Node> destNodeIndicator, double range, GraphAgent<N, A> agent) Returns the nodes for which the specified predicate returnstruelocated within the specified range from the specified source node.GraphEnvironment.getClosestNodes(Graph<N, A>.Node sourceNode, Predicate<Graph<N, A>.Node> destNodeIndicator, double range, GraphAgent<N, A> agent, BiFunction<A, K, Double> arcWeighter, BiFunction<N, K, Double> nodeWeighter) GraphEnvironment.getClosestNodes(Graph<N, A>.Node sourceNode, Predicate<Graph<N, A>.Node> destNodeIndicator, double range, GraphAgent<N, A> agent, BiFunction<A, K, Double> arcWeighter, BiFunction<N, K, Double> nodeWeighter, int maxNodesCount) GraphEnvironment.getClosestNodes(Graph<N, A>.Node sourceNode, Predicate<Graph<N, A>.Node> destNodeIndicator, double range, GraphAgent<N, A> agent, Map<Graph<N, A>.Node, Double> outNodeWeights, Set<Graph<N, A>.Arc> outArcsVisited) protected AgentGraphPath<N, A> GraphEnvironment.getSameOrReverseArcPath(GeometricGraphPosition<N, A> sourcePosition, GeometricGraphPosition<N, A> destPosition, GraphAgent<N, A> agent) GraphEnvironment.getShortestPath(Graph<N, A>.Node sourceNode, Graph<N, A>.Node destNode, GraphAgent<N, A> agent) Returns the shortest path from the specified source node to the specified destination node for the specified agent, ornullif no such path exists.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, 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.GraphEnvironment.getShortestPath(N sourceNodeValue, N destNodeValue, GraphAgent<N, A> agent) Returns the shortest path from the specified source node to the specified destination node for the specified agent, ornullif no such path exists.LongAgentsEnvironment.getShortestPath(GeometricGraphPosition<N, A> sourcePosition, GeometricGraphPosition<N, A> destPosition, GraphAgent<N, A> agent) GraphEnvironment.getShortestPathBetweenNodesInternal(Graph<N, A> graph, Graph<N, A>.Node sourceNode, Graph<N, A>.Node destNode, Function<Graph<N, A>.Arc, Double> arcWeighter, Function<Graph<N, A>.Node, Double> nodeWeighter, Map<Graph<N, A>.Node, Double> nodeWeights, Set<Graph<N, A>.Arc> arcsVisited, 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.protected booleanGraphAgent.isOtherAgentInNodeHavingSameDirection(GraphAgent<?, ?> otherAgent) protected booleanLongAgent.isOtherAgentInNodeHavingSameDirection(GraphAgent<?, ?> otherAgent) 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) voidAgentGraphArc.onAgentVelocityChanged(GraphAgent<?, ?> graphAgent) Callback method called immediately after velocity of the specified agent located on this arc changes.voidAgentGraphArcImpl.onAgentVelocityChanged(GraphAgent<?, ?> graphAgent) voidLongAgent.onCollidedWithOtherAgent(GraphAgent<N, A> otherAgent, boolean isMovingInSameDirection) Callback method called when this agent сollides another agent and further movement will have to a non-zero overlay, i.e.voidGraphAgent.onOtherAgentReached(GraphAgent<N, A> otherAgent, boolean isMovingInSameDirection) Callback method called when this agent reaches another agent, i.e.voidLongAgent.onOtherAgentReached(GraphAgent<N, A> otherAgent, boolean isMovingInSameDirection) voidAgentGraphArc.recalculateAgents(GraphAgent<?, ?> exceptAgent, boolean recalculateReverseArc) Recalculates the internal events (specifically, events of reaching other agents) for all agents on this arc, except for the specified one.voidAgentGraphArcImpl.recalculateAgents(GraphAgent<?, ?> exceptAgent, boolean recalculateReverseArc) voidAgentGraphArc.removeAgent(GraphAgent<?, ?> graphAgent) Removes the specified agent from this arc, e.g.voidAgentGraphArcImpl.removeAgent(GraphAgent<?, ?> graphAgent) voidAgentGraphNode.removeAgent(GraphAgent graphAgent) Removes the specified agent from this node, e.g.voidAgentGraphNodeImpl.removeAgent(GraphAgent graphAgent) protected voidGraphEnvironment.removeAgentInternal(GraphAgent<N, A> agent) GraphEnvironment.weightKey(GraphAgent<N, A> agent) Returns the key that is used as additional parameter when calculating weights of nodes and arcs for the purposes of shortest paths calculation for the specified agent.LongAgentsEnvironment.weightKey(GraphAgent<N, A> agent) -
Uses of GraphAgent in com.amalgamasimulation.trains
Subclasses of GraphAgent in com.amalgamasimulation.trainsModifier and TypeClassDescriptionclassRepresents a train consisting a sequence of rail cars.Methods in com.amalgamasimulation.trains with parameters of type GraphAgentModifier and TypeMethodDescriptionvoidRailArc.onAgentReachedPosition(GraphAgent<?, ?> graphAgent, GeometricGraphPosition<?, ?> position) voidTrain.onOtherAgentReached(GraphAgent<RailNode, RailArc> otherAgent, boolean isMovingInSameDirection)