Package com.anylogic.engine
- Field Summary
- Constructor Summary
- Method Summary
- Field Details
- Constructor Details
- Method Details
- getRouteProvider
- setRouteProvider
- getLevel
- setLevel
- getNetwork
- setNetwork
- setNetworkInternal
- getNetworkNode
- setNetworkNode
- setNetworkNode
- setNetworkNode
- getSpaceType
- getAnimationX
- getAnimationY
- getAnimationZ
- getAnimationPosition
- isAnimationVisible_xjal
- getSpace
- getPresentationScaleOnOwnerSpace
- setSpace
- getEnvironment
- getConnections
- getConnectionsNumber
- getConnectedAgent
- getRandomConnectedAgent
- isConnectedTo
- updatePosition
- stop
- connectTo
- disconnectFrom
- disconnectFromAll
- send
- send
- jumpTo
- deliver
- deliver
- jumpTo
- jumpTo
- jumpTo
- receive
- agentInfo
- setEnvironment_xjal
- setArrivalCallback
- moveTo
- moveToInTime
- moveToInTime
- moveToStraight
- moveToStraightInTime
- moveToStraightInTime
- moveToStraight
- moveToStraightInTime
- moveToStraightInTime
- addConnection_xjal
- moveTo
- moveToInTime
- moveToInTime
- moveTo
- moveToInTime
- moveToInTime
- moveTo
- moveToInTime
- moveToInTime
- removeConnection_xjal
- moveTo
- moveToInTime
- moveToInTime
- restoreConnections_xjal
- moveTo
- moveToInTime
- moveToInTime
- moveTo
- moveToInTime
- moveToInTime
- moveTo
- moveToInTime
- moveToInTime
- moveToNearestAgent
- moveToNearestAgent
- getNearestAgent
- agentsInRange
- agentsInRange
- setAutomaticHorizontalRotation
- isAutomaticHorizontalRotation
- setAutomaticVerticalRotation
- isAutomaticVerticalRotation
- getTargetX
- getTargetY
- getTargetZ
- distanceTo
- distanceTo
- distanceTo
- distanceTo
- distanceToSq
- distanceTo
- distanceTo
- distanceToSq
- distanceTo
- distanceTo
- distanceToSq
- isMoving
- setVelocity
- getVelocity
- getSpeed
- setSpeed
- setSpeed
- getSpeed
- timeToArrival
- timeToArrival
- copyToAndDestroyOnSpaceTypeChange_xjal
- priority
- java.lang.Object
- com.anylogic.engine.AgentExtensionImpl
- com.anylogic.engine.ExtAgentContinuousDelegate<E>
- Type Parameters:
E
- type of agent extension to delegate to. If you are creating new extension based on 'continuous space agent', please set the type toExtAgentContinuous
- All Implemented Interfaces:
AgentExtension
,ExtAgentContinuous
,ExtAgentInteractive
,ExtAgentWithSpatialMetrics
,ExtAnimationParams
,ExtWithSpaceType
,Serializable
- Direct Known Subclasses:
ExtEntityContinuousDelegate
@Deprecated @AnyLogicInternalAPI public abstract class ExtAgentContinuousDelegate<E extends ExtAgentContinuous> extends AgentExtensionImpl implements ExtAgentContinuous
Deprecated.
Base class for extensions delegating their 'continuous space agent' activity to an existing extension of agent
- See Also:
- Serialized Form
Modifier and Type | Field | Description |
---|---|---|
final E | e |
Deprecated.
|
Constructor | Description |
---|---|
ExtAgentContinuousDelegate |
Deprecated.
|
Modifier and Type | Method | Description |
---|---|---|
void | addConnection_xjal |
Deprecated.
This method is internal and shouldn't be called by user.
it may be removed/renamed in future |
String | agentInfo() |
Deprecated.
|
<T extends Agent> | agentsInRange |
Deprecated.
Returns the unsorted list of agents from the given collection which are within the given
distance from this agent |
<T extends Agent> | agentsInRange |
Deprecated.
Returns the unsorted list of agents from the given collection which are within the given
distance from this agent |
boolean | connectTo |
Deprecated.
Creates a bi-directional connection between this agent and a given
other agent.
|
void | copyToAndDestroyOnSpaceTypeChange_xjal |
Deprecated.
|
void | deliver |
Deprecated.
Delivers a message to a given agent immediately during this method call.
|
void | deliver |
Deprecated.
Delivers a message to an agent or a group of agents, as specified by the
mode parameter immediately during this method call.
|
boolean | disconnectFrom |
Deprecated.
Disconnects this agent from another given agent.
|
void | disconnectFromAll() |
Deprecated.
Disconnects the agent from all other agents.
|
double | distanceTo |
Deprecated.
Calculates the distance from this agent to a given point in the
projection to the horizontal plane (i.e.
|
double | distanceTo |
Deprecated.
Calculates the distance from this agent to a given point in continuous 3D space.
|
double | distanceTo |
Deprecated.
Calculates the distance from this agent to a given point in continuous 3D space.
|
double | distanceTo |
Deprecated.
Calculates the distance from this agent to a given point in the
projection to the horizontal plane (i.e.
|
double | distanceTo |
Deprecated.
Calculates the distance from this agent to another one in continuous 3D space.
|
double | distanceTo |
Deprecated.
Calculates the distance from this agent to another one.
The exact behavior of this method depends on the underlying space type. |
double | distanceTo |
Deprecated.
Calculates the distance from this agent to the point.
The exact behavior of this method depends on the underlying space type. |
double | distanceTo |
Deprecated.
Calculates the distance from this agent to the point.
The exact behavior of this method depends on the underlying space type. |
double | distanceToSq |
Deprecated.
Calculates the square of distance from this agent to a given point in the
projection to the horizontal plane (i.e.
|
double | distanceToSq |
Deprecated.
Calculates the square of distance from this agent to a given point in continuous 3D space.
(this method has better performance compared to ExtAgentContinuous.distanceTo(double, double, double) ) |
double | distanceToSq |
Deprecated.
Calculates the square of distance from this agent to another one in continuous space.
(this method has better performance compared to ExtAgentContinuous.distanceTo(Agent) ) |
Position | getAnimationPosition |
Deprecated.
|
double | getAnimationX() |
Deprecated.
|
double | getAnimationY() |
Deprecated.
|
double | getAnimationZ() |
Deprecated.
|
Agent | getConnectedAgent |
Deprecated.
Returns the connected agent with a given index.
|
<T extends Agent> | getConnections() |
Deprecated.
Returns a collection of agents connected to this agent (bi-directionally),
or empty collection if there have not been any connections yet.
|
int | getConnectionsNumber() |
Deprecated.
Returns the number of agents connected to this agent.
|
Agent | getEnvironment() |
Deprecated.
Returns the environment where this agent belongs to.
|
Level | getLevel() |
Deprecated.
Returns the level this agent lives in, actual for agents in continuous space.
|
<T extends Agent> | getNearestAgent |
Deprecated.
Returns the nearest agent from the given collection
|
INetwork | getNetwork() |
Deprecated.
Returns the network this agent lives in, actual for agents in continuous space.
|
INode | getNetworkNode() |
Deprecated.
Returns the network node this agent currently is located in, actual for agents in continuous space.
|
double | getPresentationScaleOnOwnerSpace() |
Deprecated.
Returns the scale of the agent presentation animation
on its space or
1.0 if space isn't defined
or agent list is empty |
Agent | getRandomConnectedAgent() |
Deprecated.
Returns the randomly chosen connected agent.
|
IRouteProvider | getRouteProvider() |
Deprecated.
Returns the provider of routes for agent movement
|
Agent | getSpace() |
Deprecated.
Returns the agent representing space this agent lives in
|
SpaceType | getSpaceType() |
Deprecated.
Returns the type of space this agent lives in, one of
SPACE_CONTINUOUS, SPACE_DISCRETE, SPACE_GIS, SPACE_NONE |
double | getSpeed() |
Deprecated.
Returns the current value of the agent speed (measured in m/s).
|
double | getSpeed |
Deprecated.
Returns the current value of the agent speed in continuous space.
|
double | getTargetX() |
Deprecated.
Returns the x of the target location if moving, otherwise current x in
continuous space.
|
double | getTargetY() |
Deprecated.
Returns the y of the target location if moving, otherwise current y in
continuous space.
|
double | getTargetZ() |
Deprecated.
Returns the z of the target location if moving, otherwise current z in
continuous space.
|
double | getVelocity() |
Deprecated.
|
boolean | isAnimationVisible_xjal() |
Deprecated.
|
boolean | isAutomaticHorizontalRotation() |
Deprecated.
Returns
true if agent is set to be rotated (in horizontal
plane) during movement, false otherwise |
boolean | isAutomaticVerticalRotation() |
Deprecated.
Returns
true if agent is set to be rotated (in vertical direction,
along Z-axis) during movement in 3D, false otherwise.The returned value has no effect if ExtAgentWithSpatialMetrics.isAutomaticHorizontalRotation() is false |
boolean | isConnectedTo |
Deprecated.
Tests if this agent is connected to a given other agent.
|
boolean | isMoving() |
Deprecated.
Tests if the agent is currently moving.
|
void | jumpTo |
Deprecated.
Instantly moves the agent to a given location (without changes to Z-coordinate, if any).
|
void | jumpTo |
Deprecated.
Instantly moves the agent to a given location.
|
void | jumpTo |
Deprecated.
Instantly moves the agent to a given network location.
|
void | jumpTo |
Deprecated.
Instantly moves the agent to a given location.
|
void | moveTo |
Deprecated.
Starts movement in the direction of the given target location.
|
void | moveTo |
Deprecated.
Starts movement in the direction of the given target location.
"On arrival" code is executed when movement is finished. |
void | moveTo |
Deprecated.
Starts movement in the direction of the given target location in
continuous 3D space along a given path.
|
void | moveTo |
Deprecated.
Starts movement in the direction of the given target location in
continuous 3D space along a given path.
|
void | moveTo |
Deprecated.
Starts movement to the given attractor.
"On arrival" code is executed when movement is finished. |
void | moveTo |
Deprecated.
Starts movement to the given network node.
"On arrival" code is executed when movement is finished. |
void | moveTo |
Deprecated.
Starts movement in the direction of the given target location.
"On arrival" code is executed when movement is finished. |
void | moveTo |
Deprecated.
Starts movement in the direction of the given target location in
continuous 3D space along a given path.
|
void | moveToInTime |
Deprecated.
Starts movement in the direction of the given target location.
|
void | moveToInTime |
Deprecated.
Starts movement in the direction of the given target location.
Changes the speed of the agent in order to reach target in tripTime
model time units."On arrival" code is executed when movement is finished. |
void | moveToInTime |
Deprecated.
Starts movement in the direction of the given target location.
Changes the speed of the agent in order to reach target in tripTime
model time units."On arrival" code is executed when movement is finished. |
void | moveToInTime |
Deprecated.
Starts movement in the direction of the given target location in
continuous 3D space along a given path.
|
void | moveToInTime |
Deprecated.
Starts movement in the direction of the given target location in
continuous 3D space along a given path.
|
void | moveToInTime |
Deprecated.
Starts movement in the direction of the given target location.
|
void | moveToInTime |
Deprecated.
Starts movement in the direction of the given target location in
continuous 3D space along a given path.
|
void | moveToInTime |
Deprecated.
Starts movement in the direction of the given target location in
continuous 3D space along a given path.
|
void | moveToInTime |
Deprecated.
Starts movement to the given attractor.
Changes the speed of the agent in order to reach target in tripTime
model time units."On arrival" code is executed when movement is finished. |
void | moveToInTime |
Deprecated.
Starts movement to the given attractor.
Changes the speed of the agent in order to reach target in tripTime
model time units."On arrival" code is executed when movement is finished. |
void | moveToInTime |
Deprecated.
Starts movement to the given network node.
Changes the speed of the agent in order to reach target in tripTime
model time units."On arrival" code is executed when movement is finished. |
void | moveToInTime |
Deprecated.
Starts movement to the given network node.
Changes the speed of the agent in order to reach target in tripTime
model time units."On arrival" code is executed when movement is finished. |
void | moveToInTime |
Deprecated.
Starts movement in the direction of the given target location.
Changes the speed of the agent in order to reach target in tripTime
model time units."On arrival" code is executed when movement is finished. |
void | moveToInTime |
Deprecated.
Starts movement in the direction of the given target location.
Changes the speed of the agent in order to reach target in tripTime
model time units."On arrival" code is executed when movement is finished. |
void | moveToInTime |
Deprecated.
Starts movement in the direction of the given target location in
continuous 3D space along a given path.
|
void | moveToInTime |
Deprecated.
Starts movement in the direction of the given target location in
continuous 3D space along a given path.
|
void | moveToNearestAgent |
Deprecated.
Starts movement to the nearest agent from the given collection.
|
void | moveToNearestAgent |
Deprecated.
Starts movement to the nearest agent from the given collection.
|
void | moveToStraight |
Deprecated.
Starts straight movement in the direction of the given target location.
"On arrival" code is executed when movement is finished. |
void | moveToStraight |
Deprecated.
Starts straight movement in the direction of the given target location.
"On arrival" code is executed when movement is finished. |
void | moveToStraightInTime |
Deprecated.
Starts straight movement in the direction of the given target location.
"On arrival" code is executed when movement is finished. |
void | moveToStraightInTime |
Deprecated.
Starts straight movement in the direction of the given target location.
"On arrival" code is executed when movement is finished. |
void | moveToStraightInTime |
Deprecated.
Starts straight movement in the direction of the given target location.
Changes the speed of the agent in order to reach target in tripTime
model time units."On arrival" code is executed when movement is finished. |
void | moveToStraightInTime |
Deprecated.
Starts straight movement in the direction of the given target location.
Changes the speed of the agent in order to reach target in tripTime
model time units."On arrival" code is executed when movement is finished. |
int | priority() |
Deprecated.
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. This function is used for sorting extensions (in order for the overriding delegation to work) |
void | receive |
Deprecated.
Immediately delivers a message to this agent.
|
void | removeConnection_xjal |
Deprecated.
This method is internal and shouldn't be called by user.
it may be removed/renamed in future |
void | restoreConnections_xjal |
Deprecated.
This method is internal and shouldn't be called by user.
it may be removed/renamed in future |
void | send |
Deprecated.
Sends a message to a given agent.
|
void | send |
Deprecated.
Sends a message to an agent or a group of agents, as specified by the
mode parameter.
|
void | setArrivalCallback |
Deprecated.
This method is designed for advanced users and library developers,
for general purpose arrival processing please use "On arrival" action which
can be found on the properties of Agent Type.
Sets the listener which will be notified when the agent arrives (onArrival) or when the agent movement is cancelled or redirected (onCancel). |
void | setAutomaticHorizontalRotation |
Deprecated.
Tells agent to rotate automatically (in horizontal plane) during movements.
|
void | setAutomaticVerticalRotation |
Deprecated.
Tells agent to rotate automatically (in vertical direction, along Z-axis)
during movements in 3D.
Has no effect if ExtAgentWithSpatialMetrics.isAutomaticHorizontalRotation() is false |
void | setEnvironment_xjal |
Deprecated.
This method is internal and shouldn't be called by user.
it may be removed/renamed in future |
void | setLevel |
Deprecated.
Sets this agent to live in the level, actual for agents in continuous space.
|
void | setNetwork |
Deprecated.
Sets this agent to live in the network, actual for agents in continuous space.
|
void | setNetworkInternal |
Deprecated.
|
void | setNetworkNode |
Deprecated.
Sets the current network location for the agent
|
void | setNetworkNode |
Deprecated.
Sets the current network location for the agent
|
void | setNetworkNode |
Deprecated.
Sets the current network location for the agent
|
void | setRouteProvider |
Deprecated.
Stops agent If it is moving.
|
void | setSpace |
Deprecated.
Sets the space for agent.
|
void | setSpeed |
Deprecated.
Changes speed of the agent (measured in m/s).
If the agent is moving, it continues moving with the new speed. |
void | setSpeed |
Deprecated.
Changes speed of the agent in continuous space
(measured in the given units).
If the agent is moving, it continues moving with the new speed. |
void | setVelocity |
Deprecated.
|
void | stop() |
Deprecated.
Stops movement, if any.
|
double | timeToArrival() |
Deprecated.
Returns the time to arrival to the target location in continuous space, in model-time units.
If the agent is not moving, returns 0. |
double | timeToArrival |
Deprecated.
Returns the time to arrival to the target location, in time units.
If the agent is not moving, returns 0. |
void | updatePosition() |
Deprecated.
Updates agent coordinates
|
error, error, getAgent, getSupportedInterfaces_xjal, next_xjal, onDestroy, onExtensionRemoved, setNext_xjal, supportsInterface_xjal
public final E extends ExtAgentContinuous e
Deprecated.
@Deprecated public ExtAgentContinuousDelegate(Agent owner, Class<E> extClass)
Deprecated.
public IRouteProvider getRouteProvider()
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Returns the provider of routes for agent movement
- Specified by:
getRouteProvider
in interfaceExtAgentWithSpatialMetrics
- Returns:
- the route provider
public void setRouteProvider(IRouteProvider routeProvider)
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Stops agent If it is moving. Sets the route provider for agent movement.
Route provider has several implementations: network, straight movement,
specific movement in GIS space such as movement by roads.
- Specified by:
setRouteProvider
in interfaceExtAgentWithSpatialMetrics
- Parameters:
routeProvider
- the route provider
public Level getLevel()
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Returns the level this agent lives in, actual for agents in continuous space.
- Specified by:
getLevel
in interfaceExtAgentWithSpatialMetrics
- Returns:
- the level this agent lives in
public void setLevel(Level level)
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Sets this agent to live in the level, actual for agents in continuous space.
- Specified by:
setLevel
in interfaceExtAgentWithSpatialMetrics
- Parameters:
level
- the level this agent will live in
public INetwork getNetwork()
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Returns the network this agent lives in, actual for agents in continuous space.
- Specified by:
getNetwork
in interfaceExtAgentWithSpatialMetrics
- Returns:
- the network this agent lives in
public void setNetwork(INetwork network)
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Sets this agent to live in the network, actual for agents in continuous space.
- Specified by:
setNetwork
in interfaceExtAgentWithSpatialMetrics
- Parameters:
network
- the network this agent will live in
public void setNetworkInternal(INetwork network, INode node, Position location)
Deprecated.
- Specified by:
setNetworkInternal
in interfaceExtAgentWithSpatialMetrics
public INode getNetworkNode()
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Returns the network node this agent currently is located in, actual for agents in continuous space.
- Specified by:
getNetworkNode
in interfaceExtAgentWithSpatialMetrics
- Returns:
- the network node this agent currently is located in
public void setNetworkNode(INode node, Point position)
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Sets the current network location for the agent
- Specified by:
setNetworkNode
in interfaceExtAgentWithSpatialMetrics
- Parameters:
node
- the network nodeposition
- (optional) location within node, may benull
public void setNetworkNode(INode node)
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Sets the current network location for the agent
- Specified by:
setNetworkNode
in interfaceExtAgentWithSpatialMetrics
- Parameters:
node
- the network node
public void setNetworkNode(Attractor attractor)
Deprecated.
Description copied from interface:
ExtAgentContinuous
Sets the current network location for the agent
- Specified by:
setNetworkNode
in interfaceExtAgentContinuous
- Parameters:
attractor
- the attractor
public SpaceType getSpaceType()
Deprecated.
Description copied from interface:
ExtAgentInteractive
Returns the type of space this agent lives in, one of
SPACE_CONTINUOUS, SPACE_DISCRETE, SPACE_GIS, SPACE_NONE
- Specified by:
getSpaceType
in interfaceExtAgentInteractive
- Specified by:
getSpaceType
in interfaceExtAgentWithSpatialMetrics
- Returns:
- one of
SPACE_CONTINUOUS, SPACE_DISCRETE, SPACE_GIS, SPACE_NONE
public double getAnimationX()
Deprecated.
- Specified by:
getAnimationX
in interfaceExtAnimationParams
public double getAnimationY()
Deprecated.
- Specified by:
getAnimationY
in interfaceExtAnimationParams
public double getAnimationZ()
Deprecated.
- Specified by:
getAnimationZ
in interfaceExtAnimationParams
public Position getAnimationPosition(Position out)
Deprecated.
- Specified by:
getAnimationPosition
in interfaceExtAnimationParams
public boolean isAnimationVisible_xjal()
Deprecated.
- Specified by:
isAnimationVisible_xjal
in interfaceExtAnimationParams
public Agent getSpace()
Deprecated.
Description copied from interface:
ExtAnimationParams
Returns the agent representing space this agent lives in
- Specified by:
getSpace
in interfaceExtAnimationParams
- Returns:
- the agent representing space this agent lives in
public double getPresentationScaleOnOwnerSpace()
Deprecated.
Description copied from interface:
ExtAnimationParams
Returns the scale of the agent presentation animation
on its space or
1.0
if space isn't defined
or agent list is empty- Specified by:
getPresentationScaleOnOwnerSpace
in interfaceExtAnimationParams
- Returns:
- the scale of presentation animation on owner space
public void setSpace(Agent space)
Deprecated.
Description copied from interface:
ExtAnimationParams
Sets the space for agent. Shouldn't be called for moving agents.
Coordinates and rotations are left "as is"
- Specified by:
setSpace
in interfaceExtAnimationParams
- Parameters:
space
- the agent representing space this agent will live in
public Agent getEnvironment()
Deprecated.
Description copied from interface:
ExtAgentInteractive
Returns the environment where this agent belongs to.
- Specified by:
getEnvironment
in interfaceExtAgentInteractive
- Returns:
- the environment where this agent belongs to
public <T extends Agent> List<T> getConnections()
Deprecated.
Description copied from interface:
ExtAgentInteractive
Returns a collection of agents connected to this agent (bi-directionally),
or empty collection if there have not been any connections yet. You should not
modify this collection.
- Specified by:
getConnections
in interfaceExtAgentInteractive
- Returns:
- collection of connected agents, may be empty
public int getConnectionsNumber()
Deprecated.
Description copied from interface:
ExtAgentInteractive
Returns the number of agents connected to this agent.
- Specified by:
getConnectionsNumber
in interfaceExtAgentInteractive
- Returns:
- the number of agents connected to this agent
public Agent getConnectedAgent(int index)
Deprecated.
Description copied from interface:
ExtAgentInteractive
Returns the connected agent with a given index.
- Specified by:
getConnectedAgent
in interfaceExtAgentInteractive
- Parameters:
index
- the index of connection- Returns:
- the connected agent with a given index
public Agent getRandomConnectedAgent()
Deprecated.
Description copied from interface:
ExtAgentInteractive
Returns the randomly chosen connected agent.
- Specified by:
getRandomConnectedAgent
in interfaceExtAgentInteractive
- Returns:
- the connected agent
public boolean isConnectedTo(Agent a)
Deprecated.
Description copied from interface:
ExtAgentInteractive
Tests if this agent is connected to a given other agent.
- Specified by:
isConnectedTo
in interfaceExtAgentInteractive
- Parameters:
a
- another agent- Returns:
true
if the agents are connected,false
otherwise
public void updatePosition()
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Updates agent coordinates
- Specified by:
updatePosition
in interfaceExtAgentWithSpatialMetrics
public void stop()
Deprecated.
Description copied from interface:
ExtAgentContinuous
Stops movement, if any.
- Specified by:
stop
in interfaceExtAgentContinuous
- Specified by:
stop
in interfaceExtAgentWithSpatialMetrics
public boolean connectTo(Agent a)
Deprecated.
Description copied from interface:
ExtAgentInteractive
Creates a bi-directional connection between this agent and a given
other agent. Raises error if you try to connect to itself. Does
nothing and returns
false
if agents are already connected.- Specified by:
connectTo
in interfaceExtAgentInteractive
- Parameters:
a
- another agent- Returns:
true
if was not connected before,false
if was already connected
public boolean disconnectFrom(Agent a)
Deprecated.
Description copied from interface:
ExtAgentInteractive
Disconnects this agent from another given agent.
- Specified by:
disconnectFrom
in interfaceExtAgentInteractive
- Parameters:
a
- another agent- Returns:
true
if the agents were connected,false
otherwise
public void disconnectFromAll()
Deprecated.
Description copied from interface:
ExtAgentInteractive
Disconnects the agent from all other agents.
- Specified by:
disconnectFromAll
in interfaceExtAgentInteractive
public void send(Object msg, Agent dest)
Deprecated.
Description copied from interface:
ExtAgentInteractive
Sends a message to a given agent. The message will be delivered during
a separate event scheduled to occur in zero time after the current one.
If you are OK with the message delivered immediately during this event,
use deliver() method, which has better performance.
- Specified by:
send
in interfaceExtAgentInteractive
- Parameters:
msg
- a messagedest
- the destination agent
public void send(Object msg, MessageDeliveryType mode)
Deprecated.
Description copied from interface:
ExtAgentInteractive
Sends a message to an agent or a group of agents, as specified by the
mode parameter. The message will be delivered during a separate event
scheduled to occur in zero time after the current one. If you are OK
with the message delivered immediately during this event,
use deliver() method, which has better performance.
- Specified by:
send
in interfaceExtAgentInteractive
- Parameters:
msg
- a messagemode
- specifies the message sending mode (ALL, RANDOM, ...)
public void jumpTo(double x, double y)
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Instantly moves the agent to a given location (without changes to Z-coordinate, if any).
Terminates any movement.
The exact behavior of this method depends on the underlying space type.
Doesn't call "on arrival" code
The exact behavior of this method depends on the underlying space type.
Doesn't call "on arrival" code
- Specified by:
jumpTo
in interfaceExtAgentWithSpatialMetrics
- Parameters:
x
- the x coordinate of the new locationy
- the y coordinate of the new location
public void deliver(Object msg, Agent dest)
Deprecated.
Description copied from interface:
ExtAgentInteractive
Delivers a message to a given agent immediately during this method call.
If you wish this to happen in a separate event, use send() method.
- Specified by:
deliver
in interfaceExtAgentInteractive
- Parameters:
msg
- a messagedest
- the destination agent
public void deliver(Object msg, MessageDeliveryType mode)
Deprecated.
Description copied from interface:
ExtAgentInteractive
Delivers a message to an agent or a group of agents, as specified by the
mode parameter immediately during this method call.
If you wish this to happen in a separate event, use send() method.
- Specified by:
deliver
in interfaceExtAgentInteractive
- Parameters:
msg
- the messagemode
- specifies the message sending mode (ALL, RANDOM, ...)
public void jumpTo(Point location)
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Instantly moves the agent to a given location.
Terminates any movement.
Doesn't call "on arrival" code
Doesn't call "on arrival" code
- Specified by:
jumpTo
in interfaceExtAgentWithSpatialMetrics
- Parameters:
location
- the new location
public void jumpTo(INode node, Point location)
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Instantly moves the agent to a given network location.
Terminates any movement.
Doesn't call "on arrival" code
Doesn't call "on arrival" code
- Specified by:
jumpTo
in interfaceExtAgentWithSpatialMetrics
- Parameters:
node
- the network node.location
- (optional) location within node, may benull
public void jumpTo(double x, double y, double z)
Deprecated.
Description copied from interface:
ExtAgentContinuous
Instantly moves the agent to a given location.
Terminates any movement.
Doesn't call "on arrival" code
Doesn't call "on arrival" code
- Specified by:
jumpTo
in interfaceExtAgentContinuous
- Parameters:
x
- the x coordinate of the new locationy
- the y coordinate of the new locationz
- the z coordinate of the new location
public void receive(Object msg)
Deprecated.
Description copied from interface:
ExtAgentInteractive
Immediately delivers a message to this agent. Sender is set to null.
- Specified by:
receive
in interfaceExtAgentInteractive
- Parameters:
msg
- the message
public String agentInfo()
Deprecated.
- Specified by:
agentInfo
in interfaceExtAgentInteractive
@AnyLogicInternalAPI public void setEnvironment_xjal(Agent environment)
Deprecated.
Description copied from interface:
ExtAgentInteractive
This method is internal and shouldn't be called by user.
it may be removed/renamed in future
it may be removed/renamed in future
- Specified by:
setEnvironment_xjal
in interfaceExtAgentInteractive
public void setArrivalCallback(ArrivalCallback arrivalCallback)
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
This method is designed for advanced users and library developers,
for general purpose arrival processing please use "On arrival" action which
can be found on the properties of Agent Type.
Sets the listener which will be notified when the agent arrives (onArrival) or when the agent movement is cancelled or redirected (onCancel). The agent should be stopped at the time this method is called and should have no arrival callback set, otherwise this method will throw an error.
The arrival callback is automatically forgotten once notified.
Sets the listener which will be notified when the agent arrives (onArrival) or when the agent movement is cancelled or redirected (onCancel). The agent should be stopped at the time this method is called and should have no arrival callback set, otherwise this method will throw an error.
The arrival callback is automatically forgotten once notified.
- Specified by:
setArrivalCallback
in interfaceExtAgentWithSpatialMetrics
- Parameters:
arrivalCallback
- the listener which will be notified about agent's arrival
public void moveTo(double x, double y)
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Starts movement in the direction of the given target location.
Z coordinate of target is the same as the current agent's Z coordinate.
"On arrival" code is executed when movement is finished.
"On arrival" code is executed when movement is finished.
- Specified by:
moveTo
in interfaceExtAgentWithSpatialMetrics
- Parameters:
x
- the x coordinate of the target locationy
- the y coordinate of the target location
public void moveToInTime(double x, double y, double tripTime)
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Starts movement in the direction of the given target location.
(in case of 3D space, Z coordinate of target is the same as
the current agent's Z coordinate.
"On arrival" code is executed when movement is finished.
The exact behavior of this method depends on the underlying space type.
"On arrival" code is executed when movement is finished.
The exact behavior of this method depends on the underlying space type.
- Specified by:
moveToInTime
in interfaceExtAgentWithSpatialMetrics
- Parameters:
x
- the x coordinate of the target locationy
- the y coordinate of the target locationtripTime
- the time of the movement trip
public void moveToInTime(double x, double y, double tripTime, TimeUnits units)
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Starts movement in the direction of the given target location.
(in case of 3D space, Z coordinate of target is the same as
the current agent's Z coordinate.
"On arrival" code is executed when movement is finished.
The exact behavior of this method depends on the underlying space type.
"On arrival" code is executed when movement is finished.
The exact behavior of this method depends on the underlying space type.
- Specified by:
moveToInTime
in interfaceExtAgentWithSpatialMetrics
- Parameters:
x
- the x coordinate of the target locationy
- the y coordinate of the target locationtripTime
- the time of the movement tripunits
- the time units
public void moveToStraight(Point location)
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Starts straight movement in the direction of the given target location.
"On arrival" code is executed when movement is finished.
"On arrival" code is executed when movement is finished.
- Specified by:
moveToStraight
in interfaceExtAgentWithSpatialMetrics
- Parameters:
location
- the target location
public void moveToStraightInTime(Point location, double tripTime)
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Starts straight movement in the direction of the given target location.
Changes the speed of the agent in order to reach target in
"On arrival" code is executed when movement is finished.
Changes the speed of the agent in order to reach target in
tripTime
model time units."On arrival" code is executed when movement is finished.
- Specified by:
moveToStraightInTime
in interfaceExtAgentWithSpatialMetrics
- Parameters:
location
- the target locationtripTime
- the time of the movement trip
public void moveToStraightInTime(Point location, double tripTime, TimeUnits units)
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Starts straight movement in the direction of the given target location.
Changes the speed of the agent in order to reach target in
"On arrival" code is executed when movement is finished.
Changes the speed of the agent in order to reach target in
tripTime
model time units."On arrival" code is executed when movement is finished.
- Specified by:
moveToStraightInTime
in interfaceExtAgentWithSpatialMetrics
- Parameters:
location
- the target locationtripTime
- the time of the movement tripunits
- the time units
public void moveToStraight(double x, double y, double z)
Deprecated.
Description copied from interface:
ExtAgentContinuous
Starts straight movement in the direction of the given target location.
"On arrival" code is executed when movement is finished.
"On arrival" code is executed when movement is finished.
- Specified by:
moveToStraight
in interfaceExtAgentContinuous
- Parameters:
x
- the x coordinate of the target locationy
- the y coordinate of the target locationz
- the z coordinate of the target location
public void moveToStraightInTime(double x, double y, double z, double tripTime)
Deprecated.
Description copied from interface:
ExtAgentContinuous
Starts straight movement in the direction of the given target location.
"On arrival" code is executed when movement is finished.
"On arrival" code is executed when movement is finished.
- Specified by:
moveToStraightInTime
in interfaceExtAgentContinuous
- Parameters:
x
- the x coordinate of the target locationy
- the y coordinate of the target locationz
- the z coordinate of the target locationtripTime
- the time of the movement trip
public void moveToStraightInTime(double x, double y, double z, double tripTime, TimeUnits units)
Deprecated.
Description copied from interface:
ExtAgentContinuous
Starts straight movement in the direction of the given target location.
"On arrival" code is executed when movement is finished.
"On arrival" code is executed when movement is finished.
- Specified by:
moveToStraightInTime
in interfaceExtAgentContinuous
- Parameters:
x
- the x coordinate of the target locationy
- the y coordinate of the target locationz
- the z coordinate of the target locationtripTime
- the time of the movement tripunits
- the time units
@AnyLogicInternalAPI public void addConnection_xjal(Agent a)
Deprecated.
Description copied from interface:
ExtAgentInteractive
This method is internal and shouldn't be called by user.
it may be removed/renamed in future
it may be removed/renamed in future
- Specified by:
addConnection_xjal
in interfaceExtAgentInteractive
public void moveTo(Point location)
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Starts movement in the direction of the given target location.
"On arrival" code is executed when movement is finished.
"On arrival" code is executed when movement is finished.
- Specified by:
moveTo
in interfaceExtAgentWithSpatialMetrics
- Parameters:
location
- the target location
public void moveToInTime(Point location, double tripTime)
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Starts movement in the direction of the given target location.
Changes the speed of the agent in order to reach target in
"On arrival" code is executed when movement is finished.
Changes the speed of the agent in order to reach target in
tripTime
model time units."On arrival" code is executed when movement is finished.
- Specified by:
moveToInTime
in interfaceExtAgentWithSpatialMetrics
- Parameters:
location
- the target locationtripTime
- the time of the movement trip
public void moveToInTime(Point location, double tripTime, TimeUnits units)
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Starts movement in the direction of the given target location.
Changes the speed of the agent in order to reach target in
"On arrival" code is executed when movement is finished.
Changes the speed of the agent in order to reach target in
tripTime
model time units."On arrival" code is executed when movement is finished.
- Specified by:
moveToInTime
in interfaceExtAgentWithSpatialMetrics
- Parameters:
location
- the target locationtripTime
- the time of the movement tripunits
- the time units
public void moveTo(INode node, Point location)
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Starts movement to the given network node.
"On arrival" code is executed when movement is finished.
"On arrival" code is executed when movement is finished.
- Specified by:
moveTo
in interfaceExtAgentWithSpatialMetrics
- Parameters:
node
- the network node.location
- (optional) location within node, may benull
public void moveToInTime(INode node, Point location, double tripTime)
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Starts movement to the given network node.
Changes the speed of the agent in order to reach target in
"On arrival" code is executed when movement is finished.
Changes the speed of the agent in order to reach target in
tripTime
model time units."On arrival" code is executed when movement is finished.
- Specified by:
moveToInTime
in interfaceExtAgentWithSpatialMetrics
- Parameters:
node
- the network node.location
- (optional) location within node, may benull
tripTime
- the time of the movement trip
public void moveToInTime(INode node, Point location, double tripTime, TimeUnits units)
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Starts movement to the given network node.
Changes the speed of the agent in order to reach target in
"On arrival" code is executed when movement is finished.
Changes the speed of the agent in order to reach target in
tripTime
model time units."On arrival" code is executed when movement is finished.
- Specified by:
moveToInTime
in interfaceExtAgentWithSpatialMetrics
- Parameters:
node
- the network node.location
- (optional) location within node, may benull
tripTime
- the time of the movement tripunits
- the time units
public void moveTo(Attractor attractor)
Deprecated.
Description copied from interface:
ExtAgentContinuous
Starts movement to the given attractor.
"On arrival" code is executed when movement is finished.
"On arrival" code is executed when movement is finished.
- Specified by:
moveTo
in interfaceExtAgentContinuous
- Parameters:
attractor
- the attractor.
public void moveToInTime(Attractor attractor, double tripTime)
Deprecated.
Description copied from interface:
ExtAgentContinuous
Starts movement to the given attractor.
Changes the speed of the agent in order to reach target in
"On arrival" code is executed when movement is finished.
Changes the speed of the agent in order to reach target in
tripTime
model time units."On arrival" code is executed when movement is finished.
- Specified by:
moveToInTime
in interfaceExtAgentContinuous
- Parameters:
attractor
- the attractor.tripTime
- the time of the movement trip
public void moveToInTime(Attractor attractor, double tripTime, TimeUnits units)
Deprecated.
Description copied from interface:
ExtAgentContinuous
Starts movement to the given attractor.
Changes the speed of the agent in order to reach target in
"On arrival" code is executed when movement is finished.
Changes the speed of the agent in order to reach target in
tripTime
model time units."On arrival" code is executed when movement is finished.
- Specified by:
moveToInTime
in interfaceExtAgentContinuous
- Parameters:
attractor
- the attractor.tripTime
- the time of the movement tripunits
- the time units
@AnyLogicInternalAPI public void removeConnection_xjal(Agent a)
Deprecated.
Description copied from interface:
ExtAgentInteractive
This method is internal and shouldn't be called by user.
it may be removed/renamed in future
it may be removed/renamed in future
- Specified by:
removeConnection_xjal
in interfaceExtAgentInteractive
public void moveTo(double x, double y, double z)
Deprecated.
Description copied from interface:
ExtAgentContinuous
Starts movement in the direction of the given target location.
"On arrival" code is executed when movement is finished.
"On arrival" code is executed when movement is finished.
- Specified by:
moveTo
in interfaceExtAgentContinuous
- Parameters:
x
- the x coordinate of the target locationy
- the y coordinate of the target locationz
- the z coordinate of the target location
public void moveToInTime(double x, double y, double z, double tripTime)
Deprecated.
Description copied from interface:
ExtAgentContinuous
Starts movement in the direction of the given target location.
Changes the speed of the agent in order to reach target in
"On arrival" code is executed when movement is finished.
Changes the speed of the agent in order to reach target in
tripTime
model time units."On arrival" code is executed when movement is finished.
- Specified by:
moveToInTime
in interfaceExtAgentContinuous
- Parameters:
x
- the x coordinate of the target locationy
- the y coordinate of the target locationz
- the z coordinate of the target locationtripTime
- the time of the movement trip
public void moveToInTime(double x, double y, double z, double tripTime, TimeUnits units)
Deprecated.
Description copied from interface:
ExtAgentContinuous
Starts movement in the direction of the given target location.
Changes the speed of the agent in order to reach target in
"On arrival" code is executed when movement is finished.
Changes the speed of the agent in order to reach target in
tripTime
model time units."On arrival" code is executed when movement is finished.
- Specified by:
moveToInTime
in interfaceExtAgentContinuous
- Parameters:
x
- the x coordinate of the target locationy
- the y coordinate of the target locationz
- the z coordinate of the target locationtripTime
- the time of the movement tripunits
- the time units
@AnyLogicInternalAPI public void restoreConnections_xjal(List<?> connections)
Deprecated.
Description copied from interface:
ExtAgentInteractive
This method is internal and shouldn't be called by user.
it may be removed/renamed in future
it may be removed/renamed in future
- Specified by:
restoreConnections_xjal
in interfaceExtAgentInteractive
public void moveTo(double x, double y, Path2D path)
Deprecated.
Description copied from interface:
ExtAgentContinuous
Starts movement in the direction of the given target location in
continuous 3D space along a given path.
Z coordinate of target (and path points) is the same as the current
agent's Z coordinate.
If the agent is currently not on the path, it will first move to
the closest point on the path.
If the target is not on the path, the agent will move along the path
to the point closest to the target, and then move to the target.
"On arrival" code is executed when movement is finished.
"On arrival" code is executed when movement is finished.
- Specified by:
moveTo
in interfaceExtAgentContinuous
- Parameters:
x
- the x coordinate of the target locationy
- the y coordinate of the target locationpath
- the polyline along which the agent will move
public void moveToInTime(double x, double y, Path2D path, double tripTime)
Deprecated.
Description copied from interface:
ExtAgentContinuous
Starts movement in the direction of the given target location in
continuous 3D space along a given path.
Z coordinate of target (and path points) is the same as the current
agent's Z coordinate.
If the agent is currently not on the path, it will first move to
the closest point on the path.
If the target is not on the path, the agent will move along the path
to the point closest to the target, and then move to the target.
"On arrival" code is executed when movement is finished.
"On arrival" code is executed when movement is finished.
- Specified by:
moveToInTime
in interfaceExtAgentContinuous
- Parameters:
x
- the x coordinate of the target locationy
- the y coordinate of the target locationpath
- the polyline along which the agent will movetripTime
- the time of the movement trip
public void moveToInTime(double x, double y, Path2D path, double tripTime, TimeUnits units)
Deprecated.
Description copied from interface:
ExtAgentContinuous
Starts movement in the direction of the given target location in
continuous 3D space along a given path.
Z coordinate of target (and path points) is the same as the current
agent's Z coordinate.
If the agent is currently not on the path, it will first move to
the closest point on the path.
If the target is not on the path, the agent will move along the path
to the point closest to the target, and then move to the target.
"On arrival" code is executed when movement is finished.
"On arrival" code is executed when movement is finished.
- Specified by:
moveToInTime
in interfaceExtAgentContinuous
- Parameters:
x
- the x coordinate of the target locationy
- the y coordinate of the target locationpath
- the polyline along which the agent will movetripTime
- the time of the movement tripunits
- the time units
public void moveTo(Point location, Path3D path)
Deprecated.
Description copied from interface:
ExtAgentContinuous
Starts movement in the direction of the given target location in
continuous 3D space along a given path. If the agent is currently
not on the path, it will first move to the closest point on the path.
If the target is not on the path, the agent will move along the path
to the point closest to the target, and then move to the target.
"On arrival" code is executed when movement is finished.
"On arrival" code is executed when movement is finished.
- Specified by:
moveTo
in interfaceExtAgentContinuous
- Parameters:
location
- the target locationpath
- the polyline along which the agent will move
public void moveToInTime(Point location, Path3D path, double tripTime)
Deprecated.
Description copied from interface:
ExtAgentContinuous
Starts movement in the direction of the given target location in
continuous 3D space along a given path. If the agent is currently
not on the path, it will first move to the closest point on the path.
If the target is not on the path, the agent will move along the path
to the point closest to the target, and then move to the target.
"On arrival" code is executed when movement is finished.
"On arrival" code is executed when movement is finished.
- Specified by:
moveToInTime
in interfaceExtAgentContinuous
- Parameters:
location
- the target locationpath
- the polyline along which the agent will movetripTime
- the time of the movement trip
public void moveToInTime(Point location, Path3D path, double tripTime, TimeUnits units)
Deprecated.
Description copied from interface:
ExtAgentContinuous
Starts movement in the direction of the given target location in
continuous 3D space along a given path. If the agent is currently
not on the path, it will first move to the closest point on the path.
If the target is not on the path, the agent will move along the path
to the point closest to the target, and then move to the target.
"On arrival" code is executed when movement is finished.
"On arrival" code is executed when movement is finished.
- Specified by:
moveToInTime
in interfaceExtAgentContinuous
- Parameters:
location
- the target locationpath
- the polyline along which the agent will movetripTime
- the time of the movement tripunits
- the time units
public void moveTo(double x, double y, double z, Path3D path)
Deprecated.
Description copied from interface:
ExtAgentContinuous
Starts movement in the direction of the given target location in
continuous 3D space along a given path. If the agent is currently
not on the path, it will first move to the closest point on the path.
If the target is not on the path, the agent will move along the path
to the point closest to the target, and then move to the target.
"On arrival" code is executed when movement is finished.
"On arrival" code is executed when movement is finished.
- Specified by:
moveTo
in interfaceExtAgentContinuous
- Parameters:
x
- the x coordinate of the target locationy
- the y coordinate of the target locationz
- the z coordinate of the target locationpath
- the polyline along which the agent will move
public void moveToInTime(double x, double y, double z, Path3D path, double tripTime)
Deprecated.
Description copied from interface:
ExtAgentContinuous
Starts movement in the direction of the given target location in
continuous 3D space along a given path. If the agent is currently
not on the path, it will first move to the closest point on the path.
If the target is not on the path, the agent will move along the path
to the point closest to the target, and then move to the target.
"On arrival" code is executed when movement is finished.
"On arrival" code is executed when movement is finished.
- Specified by:
moveToInTime
in interfaceExtAgentContinuous
- Parameters:
x
- the x coordinate of the target locationy
- the y coordinate of the target locationz
- the z coordinate of the target locationpath
- the polyline along which the agent will movetripTime
- the time of the movement trip
public void moveToInTime(double x, double y, double z, Path3D path, double tripTime, TimeUnits units)
Deprecated.
Description copied from interface:
ExtAgentContinuous
Starts movement in the direction of the given target location in
continuous 3D space along a given path. If the agent is currently
not on the path, it will first move to the closest point on the path.
If the target is not on the path, the agent will move along the path
to the point closest to the target, and then move to the target.
"On arrival" code is executed when movement is finished.
"On arrival" code is executed when movement is finished.
- Specified by:
moveToInTime
in interfaceExtAgentContinuous
- Parameters:
x
- the x coordinate of the target locationy
- the y coordinate of the target locationz
- the z coordinate of the target locationpath
- the polyline along which the agent will movetripTime
- the time of the movement tripunits
- the time units
public void moveToNearestAgent(Iterable<? extends Agent> agents)
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Starts movement to the nearest agent from the given collection.
Stops any current movement.
- Specified by:
moveToNearestAgent
in interfaceExtAgentWithSpatialMetrics
- Parameters:
agents
- the collection of agents
public void moveToNearestAgent(Iterable<? extends Agent> agents, double tripTime)
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Starts movement to the nearest agent from the given collection.
Stops any current movement.
Changes the speed of the agent in order to reach target in
Changes the speed of the agent in order to reach target in
tripTime
model time units.- Specified by:
moveToNearestAgent
in interfaceExtAgentWithSpatialMetrics
- Parameters:
agents
- the collection of agentstripTime
- the time of the movement trip
public <T extends Agent> T getNearestAgent(Iterable<T> agents)
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Returns the nearest agent from the given collection
- Specified by:
getNearestAgent
in interfaceExtAgentWithSpatialMetrics
- Parameters:
agents
- the collection of agents- Returns:
- the nearest agent (never
this
one) ornull
if the collection is empty
public <T extends Agent> List<T> agentsInRange(Iterable<T> agents, double distance)
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Returns the unsorted list of agents from the given collection which are within the given
distance
from this agent- Specified by:
agentsInRange
in interfaceExtAgentWithSpatialMetrics
- Parameters:
agents
- the collection of agents- Returns:
- the list of agents within the given
distance
, unsorted
public <T extends Agent> List<T> agentsInRange(Iterable<T> agents, double distance, LengthUnits units)
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Returns the unsorted list of agents from the given collection which are within the given
distance
from this agent- Specified by:
agentsInRange
in interfaceExtAgentWithSpatialMetrics
- Parameters:
agents
- the collection of agents- Returns:
- the list of agents within the given
distance
, unsorted
public void setAutomaticHorizontalRotation(boolean yes)
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Tells agent to rotate automatically (in horizontal plane) during movements.
- Specified by:
setAutomaticHorizontalRotation
in interfaceExtAgentWithSpatialMetrics
- Parameters:
yes
-true
- agent will be rotated during movement,false
- rotation will not be changed- See Also:
public boolean isAutomaticHorizontalRotation()
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Returns
true
if agent is set to be rotated (in horizontal
plane) during movement, false
otherwise- Specified by:
isAutomaticHorizontalRotation
in interfaceExtAgentWithSpatialMetrics
- Returns:
true
if agent is set to be rotated during movement- See Also:
public void setAutomaticVerticalRotation(boolean yes)
Deprecated.
Description copied from interface:
ExtAgentContinuous
Tells agent to rotate automatically (in vertical direction, along Z-axis)
during movements in 3D.
Has no effect if
Has no effect if
ExtAgentWithSpatialMetrics.isAutomaticHorizontalRotation()
is false
- Specified by:
setAutomaticVerticalRotation
in interfaceExtAgentContinuous
- Parameters:
yes
-true
- agent will be rotated during movement (e.g. box travelling on conveyor slope),false
- rotation will not be changed (e.g. passenger going upstairs)- See Also:
public boolean isAutomaticVerticalRotation()
Deprecated.
Description copied from interface:
ExtAgentContinuous
Returns
The returned value has no effect if
true
if agent is set to be rotated (in vertical direction,
along Z-axis) during movement in 3D, false
otherwise.The returned value has no effect if
ExtAgentWithSpatialMetrics.isAutomaticHorizontalRotation()
is false
- Specified by:
isAutomaticVerticalRotation
in interfaceExtAgentContinuous
- Returns:
true
if agent is set to be rotated during movement (e.g. box travelling on conveyor slope),false
- rotation will not be changed (e.g. passenger going upstairs)- See Also:
public double getTargetX()
Deprecated.
Description copied from interface:
ExtAgentContinuous
Returns the x of the target location if moving, otherwise current x in
continuous space.
- Specified by:
getTargetX
in interfaceExtAgentContinuous
- Specified by:
getTargetX
in interfaceExtAgentWithSpatialMetrics
- Returns:
- the x of the target location if moving, otherwise current x
public double getTargetY()
Deprecated.
Description copied from interface:
ExtAgentContinuous
Returns the y of the target location if moving, otherwise current y in
continuous space.
- Specified by:
getTargetY
in interfaceExtAgentContinuous
- Specified by:
getTargetY
in interfaceExtAgentWithSpatialMetrics
- Returns:
- the y of the target location if moving, otherwise current y
public double getTargetZ()
Deprecated.
Description copied from interface:
ExtAgentContinuous
Returns the z of the target location if moving, otherwise current z in
continuous space.
- Specified by:
getTargetZ
in interfaceExtAgentContinuous
- Returns:
- the z of the target location if moving, otherwise current z
public double distanceTo(Agent other)
Deprecated.
Description copied from interface:
ExtAgentContinuous
Calculates the distance from this agent to another one in continuous 3D space.
- Specified by:
distanceTo
in interfaceExtAgentContinuous
- Specified by:
distanceTo
in interfaceExtAgentWithSpatialMetrics
- Parameters:
other
- another agent- Returns:
- the distance to the other agent (in pixels)
public double distanceTo(Agent other, LengthUnits units)
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Calculates the distance from this agent to another one.
The exact behavior of this method depends on the underlying space type.
The exact behavior of this method depends on the underlying space type.
- Specified by:
distanceTo
in interfaceExtAgentWithSpatialMetrics
- Parameters:
other
- another agentunits
- the units of length- Returns:
- the distance to the other agent
public double distanceTo(Point point)
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Calculates the distance from this agent to the point.
The exact behavior of this method depends on the underlying space type.
The exact behavior of this method depends on the underlying space type.
- Specified by:
distanceTo
in interfaceExtAgentWithSpatialMetrics
- Returns:
- the distance to the point
public double distanceTo(Point point, LengthUnits units)
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Calculates the distance from this agent to the point.
The exact behavior of this method depends on the underlying space type.
The exact behavior of this method depends on the underlying space type.
- Specified by:
distanceTo
in interfaceExtAgentWithSpatialMetrics
units
- the units of length- Returns:
- the distance to the point
public double distanceToSq(Agent other)
Deprecated.
Description copied from interface:
ExtAgentContinuous
Calculates the square of distance from this agent to another one in continuous space.
(this method has better performance compared to
(this method has better performance compared to
ExtAgentContinuous.distanceTo(Agent)
)- Specified by:
distanceToSq
in interfaceExtAgentContinuous
- Parameters:
other
- another agent- Returns:
- the square of distance to the other agent
public double distanceTo(double x, double y)
Deprecated.
Description copied from interface:
ExtAgentContinuous
Calculates the distance from this agent to a given point in the
projection to the horizontal plane (i.e. agent's Z coordinate isn't
used in the calculation).
- Specified by:
distanceTo
in interfaceExtAgentContinuous
- Specified by:
distanceTo
in interfaceExtAgentWithSpatialMetrics
- Parameters:
x
- the x coordinate of the pointy
- the y coordinate of the point- Returns:
- the distance of Agent's projection (on the plane Z=0) to the point (x,y) (in pixels)
public double distanceTo(double x, double y, LengthUnits units)
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Calculates the distance from this agent to a given point in the
projection to the horizontal plane (i.e. agent's Z coordinate isn't
used in the calculation).
- Specified by:
distanceTo
in interfaceExtAgentWithSpatialMetrics
- Parameters:
x
- the x coordinate of the pointy
- the y coordinate of the pointunits
- the units of lengths- Returns:
- the distance of Agent's projection (on the plane Z=0) to the point (x,y)
public double distanceToSq(double x, double y)
Deprecated.
Description copied from interface:
ExtAgentContinuous
Calculates the square of distance from this agent to a given point in the
projection to the horizontal plane (i.e. agent's Z coordinate isn't
used in the calculation).
(this method has better performance compared to
(this method has better performance compared to
ExtAgentContinuous.distanceTo(double, double)
)- Specified by:
distanceToSq
in interfaceExtAgentContinuous
- Parameters:
x
- the x coordinate of the pointy
- the y coordinate of the point- Returns:
- the square of distance of Agent's projection (on the plane Z=0) to the point (x,y)
public double distanceTo(double x, double y, double z)
Deprecated.
Description copied from interface:
ExtAgentContinuous
Calculates the distance from this agent to a given point in continuous 3D space.
- Specified by:
distanceTo
in interfaceExtAgentContinuous
- Parameters:
x
- the x coordinate of the pointy
- the y coordinate of the pointz
- the z coordinate of the point- Returns:
- the distance to the point (x,y,z) (in pixels)
public double distanceTo(double x, double y, double z, LengthUnits units)
Deprecated.
Description copied from interface:
ExtAgentContinuous
Calculates the distance from this agent to a given point in continuous 3D space.
- Specified by:
distanceTo
in interfaceExtAgentContinuous
- Parameters:
x
- the x coordinate of the pointy
- the y coordinate of the pointz
- the z coordinate of the point- Returns:
- the distance to the point (x,y,z)
public double distanceToSq(double x, double y, double z)
Deprecated.
Description copied from interface:
ExtAgentContinuous
Calculates the square of distance from this agent to a given point in continuous 3D space.
(this method has better performance compared to
(this method has better performance compared to
ExtAgentContinuous.distanceTo(double, double, double)
)- Specified by:
distanceToSq
in interfaceExtAgentContinuous
- Parameters:
x
- the x coordinate of the pointy
- the y coordinate of the pointz
- the z coordinate of the point- Returns:
- the square of distance to the point (x,y,z)
public boolean isMoving()
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Tests if the agent is currently moving.
- Specified by:
isMoving
in interfaceExtAgentWithSpatialMetrics
- Returns:
true
if the agent is moving,false
otherwise
@Deprecated public void setVelocity(double v)
Deprecated.
Description copied from interface:
ExtAgentContinuous
Changes speed of the agent in continuous space
(measured in pixels per model-time-unit).
If the agent is moving, it continues moving with the new speed. Note that nonzero speed does not mean the agent is moving - it starts moving only after moveTo() is called.
If the agent is moving, it continues moving with the new speed. Note that nonzero speed does not mean the agent is moving - it starts moving only after moveTo() is called.
- Specified by:
setVelocity
in interfaceExtAgentContinuous
- Specified by:
setVelocity
in interfaceExtAgentWithSpatialMetrics
- Parameters:
v
- the new speed
@Deprecated public double getVelocity()
Deprecated.
Description copied from interface:
ExtAgentContinuous
Returns the current value of the agent speed in continuous space.
(measured in pixels per model-time-unit).
Note that nonzero speed does not mean the agent is moving - it starts moving only after moveTo is called.
Note that nonzero speed does not mean the agent is moving - it starts moving only after moveTo is called.
- Specified by:
getVelocity
in interfaceExtAgentContinuous
- Specified by:
getVelocity
in interfaceExtAgentWithSpatialMetrics
- Returns:
- the current value of agent speed
public double getSpeed()
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Returns the current value of the agent speed (measured in m/s).
The units of the returned value depend on the specific space type.
Note that nonzero speed does not mean the agent is moving - it starts moving only after moveTo is called.
Note that nonzero speed does not mean the agent is moving - it starts moving only after moveTo is called.
- Specified by:
getSpeed
in interfaceExtAgentWithSpatialMetrics
- Returns:
- the current value of agent speed, meters per second
public void setSpeed(double s)
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Changes speed of the agent (measured in m/s).
If the agent is moving, it continues moving with the new speed. Note that nonzero speed does not mean the agent is moving - it starts moving only after moveTo() is called.
If the agent is moving, it continues moving with the new speed. Note that nonzero speed does not mean the agent is moving - it starts moving only after moveTo() is called.
- Specified by:
setSpeed
in interfaceExtAgentWithSpatialMetrics
public void setSpeed(double s, SpeedUnits units)
Deprecated.
Description copied from interface:
ExtAgentContinuous
Changes speed of the agent in continuous space
(measured in the given units).
If the agent is moving, it continues moving with the new speed. Note that nonzero speed does not mean the agent is moving - it starts moving only after moveTo() is called.
If the agent is moving, it continues moving with the new speed. Note that nonzero speed does not mean the agent is moving - it starts moving only after moveTo() is called.
- Specified by:
setSpeed
in interfaceExtAgentContinuous
- Specified by:
setSpeed
in interfaceExtAgentWithSpatialMetrics
- Parameters:
s
- the new speedunits
- the speed units
public double getSpeed(SpeedUnits units)
Deprecated.
Description copied from interface:
ExtAgentContinuous
Returns the current value of the agent speed in continuous space.
(measured in the given units).
Note that nonzero speed does not mean the agent is moving - it starts moving only after moveTo is called.
Note that nonzero speed does not mean the agent is moving - it starts moving only after moveTo is called.
- Specified by:
getSpeed
in interfaceExtAgentContinuous
- Specified by:
getSpeed
in interfaceExtAgentWithSpatialMetrics
- Parameters:
units
- the speed units- Returns:
- the current value of agent speed
public double timeToArrival()
Deprecated.
Description copied from interface:
ExtAgentContinuous
Returns the time to arrival to the target location in continuous space, in model-time units.
If the agent is not moving, returns 0.
If the agent is not moving, returns 0.
- Specified by:
timeToArrival
in interfaceExtAgentContinuous
- Specified by:
timeToArrival
in interfaceExtAgentWithSpatialMetrics
- Returns:
- the time to arrival to the target location, or 0
public double timeToArrival(TimeUnits units)
Deprecated.
Description copied from interface:
ExtAgentWithSpatialMetrics
Returns the time to arrival to the target location, in time units.
If the agent is not moving, returns 0.
If the agent is not moving, returns 0.
- Specified by:
timeToArrival
in interfaceExtAgentWithSpatialMetrics
- Returns:
- the time to arrival to the target location, or 0
public void copyToAndDestroyOnSpaceTypeChange_xjal(ExtAgentInteractive newExt)
Deprecated.
- Specified by:
copyToAndDestroyOnSpaceTypeChange_xjal
in interfaceExtAgentInteractive
@AnyLogicInternalAPI public int priority()
Deprecated.
Description copied from interface:
AgentExtension
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
This function is used for sorting extensions (in order for the overriding delegation to work)
it may be removed/renamed in future.
This function is used for sorting extensions (in order for the overriding delegation to work)
- Specified by:
priority
in interfaceAgentExtension
- Overrides:
priority
in classAgentExtensionImpl
- Returns:
- int value, see also
P_*
constants