Package com.anylogic.engine
- Field Summary
- Fields inherited from interface com.anylogic.engine.AgentExtension
- 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 Detail
- 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
,java.io.Serializable
- All Known Implementing Classes:
ExtEntityContinuousDelegate
,ExtEntityDelegate
public interface ExtEntity extends ExtAgentWithSpatialMetrics, ExtDefaultAnimationProvider
P_AGENT_INTERACTIVE_DELEGATE, P_AGENT_WITH_SPATIAL_METRICS_DELEGATE, P_AGENT_WITH_SPECIFIC_SPACE, P_AGENT_WITH_SPECIFIC_SPACE_DELEGATE, P_ENTITY_DELEGATE, P_ENV_WITH_SPECIFIC_SPACE, P_ROOT, P_SPACE, P_USER_EXT
void |
addAgentToContents(Agent agent) |
Adds a given agent to the contents of this agent.
|
java.util.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.
|
java.awt.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(LengthUnits units) |
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(LengthUnits units) |
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(LengthUnits units) |
Returns the width of the agent - used by conveyors and
other blocks which require it during processing.
|
default void |
highlight(boolean yes) |
Turns on/off highlighting of this agent animation.
|
boolean |
removeAgentFromContents(Agent agent) |
Removes the given agent from the contents of 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. |
java.util.List<Agent> |
resourceUnits() |
Returns the list of resource units seized by the agent, or empty list
if there are none.
|
java.util.List<Agent> |
resourceUnitsOfPool(Agent pool) |
Returns resource units currently seized by this agent
from the given
ResourcePool block |
java.util.List<Agent> |
resourceUnitsOfSeize(Agent seize) |
Return resource units currently seized by this agent
in the given
Seize block |
void |
setColor(java.awt.Color color) |
Sets the color of the item default shape.
|
void |
setFlowchartActivityType(FlowchartActivityType activityType,
FlowchartBlock block) |
Sets activity type info (used in e.g.
|
void |
setHeight(double heightInMeters) |
Sets the height of the agent (in meters)
|
void |
setHeight(double height,
LengthUnits units) |
Sets the height of the agent in the given units
|
void |
setLength(double lengthInMeters) |
Sets the length of the agent (in meters)
|
void |
setLength(double length,
LengthUnits units) |
Sets the length of the agent in the given units
|
void |
setWidth(double widthInMeters) |
Sets the width of the agent (in meters)
|
void |
setWidth(double width,
LengthUnits units) |
Sets the width of the agent in the given units
|
Modifier and Type | Method | Description |
---|
getAgent, next_xjal, onDestroy, onExtensionRemoved, priority, setNext_xjal, supportsInterface_xjal
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
createDefaultAnimation, getDefaultAnimation, onClick
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
java.util.List<Agent> contents()
java.util.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
java.util.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
java.util.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(java.awt.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
java.awt.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
-
How can we improve this article?
-