- All Superinterfaces:
AgentExtension
,ExtAgentInteractive
,ExtAgentWithSpatialMetrics
,ExtAnimationParams
,ExtWithSpaceType
,Serializable
public interface ExtAgentGIS extends ExtAgentInteractive, ExtAnimationParams, ExtAgentWithSpatialMetrics, ExtWithSpaceType
An extension of Agent designed to support agent based modeling in continuous GIS space, in particular:
- time (continuous or discrete)
- continuous 2D space based on GIS map
- connections between agents, networks (e.g. social) and their visualization
- communication - message passing and broadcasting
- time (continuous or discrete)
- continuous 2D space based on GIS map
- connections between agents, networks (e.g. social) and their visualization
- communication - message passing and broadcasting
- Author:
- AnyLogic North America, LLC https://anylogic.com
Modifier and Type | Method | Description |
---|---|---|
double | distanceByRoute |
Calculates the distance from this agent to another one by route.
In case of GIS environment returns distance measured in meters |
double | distanceTo |
Calculates the distance from this GIS agent to a given point (latitude, longitude)
in continuous GIS space, measured in meters.
|
double | distanceTo |
Calculates the distance from this agent to another one in GIS space.
In case of GIS environment returns distance measured in meters |
double | getGISHeading() |
Returns current heading angle (measured in radians CW,
starting from North direction) of agent moving in continuous GIS space.
|
AbstractShapeGISMap | getGISMap() |
Returns the GIS map the agent is moving on.
|
double | getLat() |
Returns the current (up-to-date) latitude of the agent in continuous GIS space.
|
double | getLon() |
Returns the current (up-to-date) longitude of the agent in continuous GIS space.
|
<T extends Agent> | getNearestAgentByRoute |
Returns the nearest agent from the given collection.
|
double | getTargetLat() |
Returns the latitude of the target location if moving, otherwise current latitude in
GIS space, measured in degrees (-90 ...
|
double | getTargetLon() |
Returns the longitude of the target location if moving, otherwise current longitude in
GIS space, measured in degrees (-180 ...
|
double | getTargetX() |
Returns the latitude of the target location if moving, otherwise current latitude in
GIS space, measured in degrees (-90 ...
|
double | getTargetY() |
Returns the longitude of the target location if moving, otherwise current longitude in
GIS space, measured in degrees (-180 ...
|
double | getVelocity() |
Deprecated.
|
boolean | isAnimationVisible_xjal() | |
void | jumpTo |
Instantly moves the agent to a given location in GIS space.
|
void | jumpTo |
Finds first geographic point on the Earth and calls method jumpTo(latitude, longitude) with coordinates of the found point
|
void | moveTo |
Starts movement in the direction of the given target location in continuous GIS space.
"On arrival" code is executed when movement is finished. |
void | moveTo |
Finds first geographic point on the Earth and calls method moveTo(latitude, longitude) with coordinates of the found point
|
void | setVelocity |
Deprecated.
|
addConnection_xjal, agentInfo, connectTo, copyToAndDestroyOnSpaceTypeChange_xjal, deliver, deliver, disconnectFrom, disconnectFromAll, getConnectedAgent, getConnections, getConnectionsNumber, getEnvironment, getRandomConnectedAgent, getSpaceType, isConnectedTo, receive, removeConnection_xjal, restoreConnections_xjal, send, send, setEnvironment_xjal
agentsInRange, agentsInRange, distanceTo, distanceTo, distanceTo, distanceTo, getLevel, getNearestAgent, getNetwork, getNetworkNode, getRouteProvider, getSpaceType, getSpeed, getSpeed, isAutomaticHorizontalRotation, isMoving, jumpTo, jumpTo, moveTo, moveTo, moveToInTime, moveToInTime, moveToInTime, moveToInTime, moveToInTime, moveToInTime, moveToNearestAgent, moveToNearestAgent, moveToStraight, moveToStraightInTime, moveToStraightInTime, setArrivalCallback, setAutomaticHorizontalRotation, setLevel, setNetwork, setNetworkInternal, setNetworkNode, setNetworkNode, setRouteProvider, setSpeed, setSpeed, stop, timeToArrival, timeToArrival, updatePosition
@AnyLogicInternalAPI AbstractShapeGISMap getGISMap()
Returns the GIS map the agent is moving on. Throws error if there is no GIS space
- Returns:
- the GIS map instance
double getLat()
Returns the current (up-to-date) latitude of the agent in continuous GIS space.
- Returns:
- the latitude of the current location, measured in degrees (-90 ... (South) ... 0 ... (North) ... +90)
double getLon()
Returns the current (up-to-date) longitude of the agent in continuous GIS space.
- Returns:
- the longitude of the current location, measured in degrees (-180 ... (West) ... 0 ... (East) ... +180)
double getGISHeading()
Returns current heading angle (measured in radians CW,
starting from North direction) of agent moving in continuous GIS space.
- Returns:
- the current GIS heading angle (measured in radians CW, starting from North direction)
double distanceTo(Agent other)
Calculates the distance from this agent to another one in GIS space.
In case of GIS environment returns distance measured in meters
In case of GIS environment returns distance measured in meters
- Specified by:
distanceTo
in interfaceExtAgentWithSpatialMetrics
- Parameters:
other
- another agent- Returns:
- the distance to the other agent
double distanceByRoute(Agent agent)
Calculates the distance from this agent to another one by route.
In case of GIS environment returns distance measured in meters
In case of GIS environment returns distance measured in meters
- Parameters:
other
- another agent- Returns:
- the distance to the other agent
<T extends Agent> T getNearestAgentByRoute(Iterable<T> agents)
Returns the nearest agent from the given collection. Distance calculates by route provider.
- Parameters:
agents
- the collection of agents- Returns:
- the closest agent
double distanceTo(double x, double y)
Calculates the distance from this GIS agent to a given point (latitude, longitude)
in continuous GIS space, measured in meters.
- Specified by:
distanceTo
in interfaceExtAgentWithSpatialMetrics
- Parameters:
x
- the latitude of the point, measured in degrees (-90 ... (South) ... 0 ... (North) ... +90)y
- the longitude of the point, measured in degrees (-180 ... (West) ... 0 ... (East) ... +180)- Returns:
- the distance to the point (x,y)
void jumpTo(double x, double y)
Instantly moves the agent to a given location in GIS space.
Terminates any movement.
Doesn't call "on arrival" code
Doesn't call "on arrival" code
- Specified by:
jumpTo
in interfaceExtAgentWithSpatialMetrics
- Parameters:
x
- the latitude of the new location, measured in degrees (-90 ... (South) ... 0 ... (North) ... +90)y
- the longitude of the new location, measured in degrees (-180 ... (West) ... 0 ... (East) ... +180)
void jumpTo(String geographicPlace)
Finds first geographic point on the Earth and calls method jumpTo(latitude, longitude) with coordinates of the found point
- Parameters:
geographicPlace
-
void moveTo(double x, double y)
Starts movement in the direction of the given target location in continuous GIS space.
"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 latitude of the target location, measured in degrees (-90 ... (South) ... 0 ... (North) ... +90)y
- the longitude of the target location, measured in degrees (-180 ... (West) ... 0 ... (East) ... +180)
void moveTo(String geographicPlace)
Finds first geographic point on the Earth and calls method moveTo(latitude, longitude) with coordinates of the found point
- Parameters:
geographicPlace
-
@Deprecated void setVelocity(double v)
Deprecated.
Changes speed of the agent in continuous space
(measured in pixels per model-time-unit, and in GIS-based environments - 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:
setVelocity
in interfaceExtAgentWithSpatialMetrics
- Parameters:
v
- the new speed
@Deprecated double getVelocity()
Deprecated.
Returns the current value of the agent speed in continuous space.
(measured in pixels per model-time-unit, and in GIS-based environments - in m/s).
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 interfaceExtAgentWithSpatialMetrics
- Returns:
- the current value of agent speed
double getTargetX()
Returns the latitude of the target location if moving, otherwise current latitude in
GIS space, measured in degrees (-90 ... (South) ... 0 ... (North) ... +90)
- Specified by:
getTargetX
in interfaceExtAgentWithSpatialMetrics
- Returns:
- the latitude of the target location if moving, otherwise current latitude
double getTargetY()
Returns the longitude of the target location if moving, otherwise current longitude in
GIS space, measured in degrees (-180 ... (West) ... 0 ... (East) ... +180)
- Specified by:
getTargetY
in interfaceExtAgentWithSpatialMetrics
- Returns:
- the longitude of the target location if moving, otherwise current longitude
double getTargetLon()
Returns the longitude of the target location if moving, otherwise current longitude in
GIS space, measured in degrees (-180 ... (West) ... 0 ... (East) ... +180)
- Returns:
- the longitude of the target location if moving, otherwise current longitude
double getTargetLat()
Returns the latitude of the target location if moving, otherwise current latitude in
GIS space, measured in degrees (-90 ... (South) ... 0 ... (North) ... +90)
- Returns:
- the latitude of the target location if moving, otherwise current latitude
@AnyLogicInternalAPI boolean isAnimationVisible_xjal()
- Specified by:
isAnimationVisible_xjal
in interfaceExtAnimationParams