EdgeAgents
The EdgeAgents
trait keeps track of which agents are on a particular edge, e.g., Link
, Transport
. It also allows agents to be found based on their location on a edge.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
Members list
Value members
Concrete methods
Add the given agent to the end of list (e.g., start of a transport).
Add the given agent to the end of list (e.g., start of a transport).
Value parameters
- agent
-
the agent being added to the end
Attributes
Find the agent whose distance down the edge is at least loc.
Find the agent whose distance down the edge is at least loc.
Value parameters
- loc
-
the location at which the agent is sought (closest larger)
Attributes
Find the given agent in the list and return its index position.
Find the given agent in the list and return its index position.
Value parameters
- agent
-
the agent whose index is sought (< 0 => not found)
Attributes
Find the first agent in the list that satifies the given predicate and return its index position (< 0 => not found).
Find the first agent in the list that satifies the given predicate and return its index position (< 0 => not found).
Value parameters
- p
-
the predicate to be satified
Attributes
Insert the given agent at the specified index position.
Insert the given agent at the specified index position.
Value parameters
- agent
-
the agent being added at the given position
Attributes
Insert the given agent after agent2 in the list.
Insert the given agent after agent2 in the list.
Value parameters
- agent
-
the new agent being added after agent2
- agent2
-
the existing agent to insert it after
Attributes
Remove the given agent from the list.
Remove the given agent from the list.
Value parameters
- agent
-
the agent being removed from the list
Attributes
Remove the first agent from the list.
Remove the first agent from the list.