Package com.anylogic.engine
- Field Summary
- Method Summary
- Methods inherited from interface com.anylogic.engine.AgentExtension
- Methods inherited from interface com.anylogic.engine.ExtAgentWithSpatialMetrics
- Methods inherited from interface com.anylogic.engine.ExtAnimationParams
- Methods inherited from interface com.anylogic.engine.ExtDefaultAnimationProvider
- Method Details
- getFlowchartEntryTime
- addAgentToContents
- removeAgentFromContents
- getLength
- getLength
- setLength
- setLength
- getWidth
- getWidth
- setWidth
- setWidth
- getHeight
- getHeight
- setHeight
- setHeight
- contents
- resourceUnits
- resourceUnitsOfSeize
- resourceUnitsOfPool
- resourceUnitOfPool
- currentBlock
- getBlockEnterTime
- setColor
- getId
- getColor
- highlight
- destroyEntity
- setFlowchartActivityType
- All Superinterfaces:
AgentExtension
,ExtAgentWithSpatialMetrics
,ExtAnimationParams
,ExtDefaultAnimationProvider
,Serializable
- All Known Implementing Classes:
ExtEntityContinuousDelegate
,ExtEntityDelegate
public interface ExtEntity extends ExtAgentWithSpatialMetrics, ExtDefaultAnimationProvider
Modifier and Type | Method | Description |
---|---|---|
void | addAgentToContents |
Adds a given agent to the contents of this agent.
|
List<Agent> | contents() | |
FlowchartBlock | currentBlock() |
Returns the current flowchart block this agent
is being processed in.
|
void | destroyEntity() |
Destroys the agent.
|
double | getBlockEnterTime() |
Returns the time this agent entered its current flowchart block.
|
Color | getColor() |
Returns the color of the item default shape.
|
double | getFlowchartEntryTime() |
Returns the time the agent has entered the first block in the flowchart,
or
Double.NaN if this agent hasn't yet visited any flowchart |
double | getHeight() |
Returns the height of the agent - used by conveyors and
other blocks which require it during processing.
|
double | getHeight |
Returns the height of the agent - used by conveyors and
other blocks which require it during processing.
|
int | getId() |
Returns Id of agent.
|
double | getLength() |
Returns the length of the agent - used by conveyors and
other blocks which require it during processing.
|
double | getLength |
Returns the length of the agent - used by conveyors and
other blocks which require it during processing.
|
double | getWidth() |
Returns the width of the agent - used by conveyors and
other blocks which require it during processing.
|
double | getWidth |
Returns the width of the agent - used by conveyors and
other blocks which require it during processing.
|
default void | highlight |
Turns on/off highlighting of this agent animation.
|
boolean | removeAgentFromContents |
Removes the given agent from the contents of this agent.
|
Agent | resourceUnitOfPool |
Returns the first occurrence of resource unit of a given pool
among the seized resource units, or
null if not found. |
List<Agent> | resourceUnits() |
Returns the list of resource units seized by the agent, or empty list
if there are none.
|
List<Agent> | resourceUnitsOfPool |
Returns resource units currently seized by this agent
from the given
ResourcePool block |
List<Agent> | resourceUnitsOfSeize |
Return resource units currently seized by this agent
in the given
Seize block |
void | setColor |
Sets the color of the item default shape.
|
void | setFlowchartActivityType |
Sets activity type info (used in e.g.
|
void | setHeight |
Sets the height of the agent (in meters)
|
void | setHeight |
Sets the height of the agent in the given units
|
void | setLength |
Sets the length of the agent (in meters)
|
void | setLength |
Sets the length of the agent in the given units
|
void | setWidth |
Sets the width of the agent (in meters)
|
void | setWidth |
Sets the width of the agent in the given units
|
agentsInRange, agentsInRange, distanceTo, distanceTo, distanceTo, distanceTo, distanceTo, distanceTo, getLevel, getNearestAgent, getNetwork, getNetworkNode, getRouteProvider, getSpaceType, getSpeed, getSpeed, getTargetX, getTargetY, getVelocity, isAutomaticHorizontalRotation, isMoving, jumpTo, jumpTo, jumpTo, moveTo, moveTo, moveTo, moveToInTime, moveToInTime, moveToInTime, moveToInTime, moveToInTime, moveToInTime, moveToNearestAgent, moveToNearestAgent, moveToStraight, moveToStraightInTime, moveToStraightInTime, setArrivalCallback, setAutomaticHorizontalRotation, setLevel, setNetwork, setNetworkInternal, setNetworkNode, setNetworkNode, setRouteProvider, setSpeed, setSpeed, setVelocity, stop, timeToArrival, timeToArrival, updatePosition
getAnimationPosition, getAnimationX, getAnimationY, getAnimationZ, getPresentationScaleOnOwnerSpace, getSpace, isAnimationVisible_xjal, setSpace
double getFlowchartEntryTime()
Returns the time the agent has entered the first block in the flowchart,
or
Double.NaN
if this agent hasn't yet visited any flowchart- Returns:
- time or
Double.NaN
void addAgentToContents(Agent agent)
Adds a given agent to the contents of this agent.
- Parameters:
agent
- the agent to add
boolean removeAgentFromContents(Agent agent)
Removes the given agent from the contents of this agent.
- Parameters:
agent
- the agent to remove- Returns:
- returns
true
ifagent
was removed,false
if this agent didn't contain the specifiedagent
double getLength()
Returns the length of the agent - used by conveyors and
other blocks which require it during processing.
- Returns:
- the length of the agent
double getLength(LengthUnits units)
Returns the length of the agent - used by conveyors and
other blocks which require it during processing.
- Parameters:
units
- units of length to be used- Returns:
- the length of the agent
- Since:
- 7.1
void setLength(double lengthInMeters)
Sets the length of the agent (in meters)
- Parameters:
length
- the length of the agent, measured in meters
void setLength(double length, LengthUnits units)
Sets the length of the agent in the given units
- Parameters:
length
- the length of the agentunits
- units of length to be used- Since:
- 7.1
double getWidth()
Returns the width of the agent - used by conveyors and
other blocks which require it during processing.
- Returns:
- the width of the agent
double getWidth(LengthUnits units)
Returns the width of the agent - used by conveyors and
other blocks which require it during processing.
- Parameters:
units
- units of length to be used- Returns:
- the width of the agent
- Since:
- 8.2
void setWidth(double widthInMeters)
Sets the width of the agent (in meters)
- Parameters:
width
- the width of the agent, measured in meters- Since:
- 8.2
void setWidth(double width, LengthUnits units)
Sets the width of the agent in the given units
- Parameters:
width
- the width of the agentunits
- units of length to be used- Since:
- 8.2
double getHeight()
Returns the height of the agent - used by conveyors and
other blocks which require it during processing.
- Returns:
- the height of the agent
double getHeight(LengthUnits units)
Returns the height of the agent - used by conveyors and
other blocks which require it during processing.
- Parameters:
units
- units of length to be used- Returns:
- the height of the agent
- Since:
- 8.2
void setHeight(double heightInMeters)
Sets the height of the agent (in meters)
- Parameters:
height
- the height of the agent, measured in meters- Since:
- 8.2
void setHeight(double height, LengthUnits units)
Sets the height of the agent in the given units
- Parameters:
height
- the height of the agentunits
- units of length to be used- Since:
- 8.2
List<Agent> contents()
List<Agent> resourceUnits()
Returns the list of resource units seized by the agent, or empty list
if there are none.
- Returns:
- the list of resource units seized by the agent, never returns
null
List<Agent> resourceUnitsOfSeize(Agent seize)
Return resource units currently seized by this agent
in the given
Seize
block- Parameters:
seize
-Seize
block- Returns:
- resource units currently seized by this agent
List<Agent> resourceUnitsOfPool(Agent pool)
Returns resource units currently seized by this agent
from the given
ResourcePool
block- Parameters:
pool
-ResourcePool
block- Returns:
- resource units currently seized by this agent
Agent resourceUnitOfPool(Agent pool)
Returns the first occurrence of resource unit of a given pool
among the seized resource units, or
null
if not found.- Parameters:
pool
- the pool of the unit (ResourcePool block)- Returns:
- the seized resource unit from the given pool, if found
FlowchartBlock currentBlock()
Returns the current flowchart block this agent
is being processed in. This method is designed for
agents which act as 'entities' in process flowchart diagrams.
- Returns:
- the current flowchart block containing this agent
or
null
if the agent isn't in flowchart
double getBlockEnterTime()
Returns the time this agent entered its current flowchart block.
- Returns:
- the time this agent entered its current flowchart block or
Double.NaN
if this agent isn't in the flowchart
void setColor(Color color)
Sets the color of the item default shape.
- Parameters:
color
- the new color of the default shape
int getId()
Returns Id of agent. This method is designed only for debug purposes.
It doesn't guarantees that id is unique.
Note that when the model produces more than ~billion agents then there may be agents with negative and even equal ids.
Note that when the model produces more than ~billion agents then there may be agents with negative and even equal ids.
- Returns:
- Id of agent
Color getColor()
Returns the color of the item default shape.
- Returns:
- the color of the item default shape
default void highlight(boolean yes)
Turns on/off highlighting of this agent animation.
The behavior of the function is specific for different agent types
and usually depends on the library which drives this agent
- Parameters:
yes
-
@AnyLogicInternalAPI void destroyEntity()
Destroys the agent.
@AnyLogicInternalAPI void setFlowchartActivityType(FlowchartActivityType activityType, FlowchartBlock block)
Sets activity type info (used in e.g. logging to DB) for the given entity
- See Also:
-
FlowchartActivityType