Package com.anylogic.engine
- Field Summary
- Constructor Summary
- Method Summary
- Methods inherited from class com.anylogic.engine.ExtAgentWithSpatialMetricsDelegate
- Methods inherited from class com.anylogic.engine.AgentExtensionImpl
- Methods inherited from class java.lang.Object
- Methods inherited from interface com.anylogic.engine.AgentExtension
- Methods inherited from interface com.anylogic.engine.ExtAgentWithSpatialMetrics
- Methods inherited from interface com.anylogic.engine.ExtAnimationParams
- Constructor Details
- Method Details
- destroyEntity
- highlight
- getId
- getFlowchartEntryTime
- addAgentToContents
- removeAgentFromContents
- getLength
- getLength
- setLength
- setLength
- getWidth
- getWidth
- setWidth
- setWidth
- getHeight
- getHeight
- setHeight
- setHeight
- contents
- resourceUnits
- resourceUnitsOfSeize
- resourceUnitsOfPool
- resourceUnitOfPool
- currentBlock
- getBlockEnterTime
- setColor
- getColor
- getDefaultAnimation
- createDefaultAnimation
- onClick
- setFlowchartActivityType
- priority
- java.lang.Object
- com.anylogic.engine.AgentExtensionImpl
- com.anylogic.engine.ExtAgentWithSpatialMetricsDelegate<E>
- com.anylogic.engine.ExtEntityDelegate<E>
- Type Parameters:
E- type of agent extension to delegate to. If you are creating new extension based on 'Entity', please set the type toExtEntity
- All Implemented Interfaces:
AgentExtension,ExtAgentWithSpatialMetrics,ExtAnimationParams,ExtDefaultAnimationProvider,ExtEntity,Serializable
@AnyLogicInternalAPI public abstract class ExtEntityDelegate<E extends ExtEntity> extends ExtAgentWithSpatialMetricsDelegate<E> implements ExtEntity
Base class for extensions delegating their 'Entity' activity to an existing extension of agent
- See Also:
- Serialized Form
| Constructor | Description |
|---|---|
ExtEntityDelegate |
| Modifier and Type | Method | Description |
|---|---|---|
void | addAgentToContents |
Adds a given agent to the contents of this agent.
|
List<Agent> | contents() | |
ShapeTopLevelPresentationGroup | createDefaultAnimation() | |
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.
|
ShapeTopLevelPresentationGroup | getDefaultAnimation() | |
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.
|
void | highlight |
Turns on/off highlighting of this agent animation.
|
boolean | onClick() |
Should be overridden to define the reaction on mouse click.
|
int | priority() |
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) |
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, e, extClass, getAnimationPosition, getAnimationX, getAnimationY, getAnimationZ, getLevel, getNearestAgent, getNetwork, getNetworkNode, getPresentationScaleOnOwnerSpace, getRouteProvider, getSpace, getSpaceType, getSpeed, getSpeed, getTargetX, getTargetY, getVelocity, isAnimationVisible_xjal, isAutomaticHorizontalRotation, isAutomaticVerticalRotation, isMoving, jumpTo, jumpTo, jumpTo, moveTo, moveTo, moveTo, moveToInTime, moveToInTime, moveToInTime, moveToInTime, moveToInTime, moveToInTime, moveToNearestAgent, moveToNearestAgent, moveToStraight, moveToStraightInTime, moveToStraightInTime, onExtensionRemoved, setArrivalCallback, setAutomaticHorizontalRotation, setLevel, setNetwork, setNetworkInternal, setNetworkNode, setNetworkNode, setRouteProvider, setSpace, setSpeed, setSpeed, setVelocity, stop, timeToArrival, timeToArrival, updatePositionerror, error, getAgent, getSupportedInterfaces_xjal, next_xjal, onDestroy, setNext_xjal, supportsInterface_xjalagentsInRange, 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, updatePositionpublic ExtEntityDelegate(Agent owner)
@AnyLogicInternalAPI public void destroyEntity()
Description copied from interface:
ExtEntityDestroys the agent.
- Specified by:
destroyEntityin interfaceExtEntity
public void highlight(boolean yes)
Description copied from interface:
ExtEntityTurns 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
public int getId()
Description copied from interface:
ExtEntityReturns 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.
public double getFlowchartEntryTime()
Description copied from interface:
ExtEntityReturns the time the agent has entered the first block in the flowchart,
or
Double.NaN if this agent hasn't yet visited any flowchart- Specified by:
getFlowchartEntryTimein interfaceExtEntity- Returns:
- time or
Double.NaN
public void addAgentToContents(Agent entity)
Description copied from interface:
ExtEntityAdds a given agent to the contents of this agent.
- Specified by:
addAgentToContentsin interfaceExtEntity- Parameters:
entity- the agent to add
public boolean removeAgentFromContents(Agent entity)
Description copied from interface:
ExtEntityRemoves the given agent from the contents of this agent.
- Specified by:
removeAgentFromContentsin interfaceExtEntity- Parameters:
entity- the agent to remove- Returns:
- returns
trueifagentwas removed,falseif this agent didn't contain the specifiedagent
public double getLength()
Description copied from interface:
ExtEntityReturns the length of the agent - used by conveyors and
other blocks which require it during processing.
public double getLength(LengthUnits units)
Description copied from interface:
ExtEntityReturns the length of the agent - used by conveyors and
other blocks which require it during processing.
public void setLength(double length)
Description copied from interface:
ExtEntitySets the length of the agent (in meters)
public void setLength(double length, LengthUnits units)
Description copied from interface:
ExtEntitySets the length of the agent in the given units
public double getWidth()
Description copied from interface:
ExtEntityReturns the width of the agent - used by conveyors and
other blocks which require it during processing.
public double getWidth(LengthUnits units)
Description copied from interface:
ExtEntityReturns the width of the agent - used by conveyors and
other blocks which require it during processing.
public void setWidth(double width)
Description copied from interface:
ExtEntitySets the width of the agent (in meters)
public void setWidth(double width, LengthUnits units)
Description copied from interface:
ExtEntitySets the width of the agent in the given units
public double getHeight()
Description copied from interface:
ExtEntityReturns the height of the agent - used by conveyors and
other blocks which require it during processing.
public double getHeight(LengthUnits units)
Description copied from interface:
ExtEntityReturns the height of the agent - used by conveyors and
other blocks which require it during processing.
public void setHeight(double height)
Description copied from interface:
ExtEntitySets the height of the agent (in meters)
public void setHeight(double height, LengthUnits units)
Description copied from interface:
ExtEntitySets the height of the agent in the given units
public List<Agent> contents()
public List<Agent> resourceUnits()
Description copied from interface:
ExtEntityReturns the list of resource units seized by the agent, or empty list
if there are none.
- Specified by:
resourceUnitsin interfaceExtEntity- Returns:
- the list of resource units seized by the agent, never returns
null
public List<Agent> resourceUnitsOfSeize(Agent seize)
Description copied from interface:
ExtEntityReturn resource units currently seized by this agent
in the given
Seize block- Specified by:
resourceUnitsOfSeizein interfaceExtEntity- Parameters:
seize-Seizeblock- Returns:
- resource units currently seized by this agent
public List<Agent> resourceUnitsOfPool(Agent pool)
Description copied from interface:
ExtEntityReturns resource units currently seized by this agent
from the given
ResourcePool block- Specified by:
resourceUnitsOfPoolin interfaceExtEntity- Parameters:
pool-ResourcePoolblock- Returns:
- resource units currently seized by this agent
public Agent resourceUnitOfPool(Agent pool)
Description copied from interface:
ExtEntityReturns the first occurrence of resource unit of a given pool
among the seized resource units, or
null if not found.- Specified by:
resourceUnitOfPoolin interfaceExtEntity- Parameters:
pool- the pool of the unit (ResourcePool block)- Returns:
- the seized resource unit from the given pool, if found
public FlowchartBlock currentBlock()
Description copied from interface:
ExtEntityReturns the current flowchart block this agent
is being processed in. This method is designed for
agents which act as 'entities' in process flowchart diagrams.
- Specified by:
currentBlockin interfaceExtEntity- Returns:
- the current flowchart block containing this agent
or
nullif the agent isn't in flowchart
public double getBlockEnterTime()
Description copied from interface:
ExtEntityReturns the time this agent entered its current flowchart block.
- Specified by:
getBlockEnterTimein interfaceExtEntity- Returns:
- the time this agent entered its current flowchart block or
Double.NaNif this agent isn't in the flowchart
public void setColor(Color color)
Description copied from interface:
ExtEntitySets the color of the item default shape.
public Color getColor()
Description copied from interface:
ExtEntityReturns the color of the item default shape.
public ShapeTopLevelPresentationGroup getDefaultAnimation()
- Specified by:
getDefaultAnimationin interfaceExtDefaultAnimationProvider
@AnyLogicInternalAPI public ShapeTopLevelPresentationGroup createDefaultAnimation()
- Specified by:
createDefaultAnimationin interfaceExtDefaultAnimationProvider
@AnyLogicInternalAPI public boolean onClick()
Description copied from interface:
ExtDefaultAnimationProviderShould be overridden to define the reaction on mouse click.
- Specified by:
onClickin interfaceExtDefaultAnimationProvider- Returns:
- always return
falsehere.
public void setFlowchartActivityType(FlowchartActivityType activityType, FlowchartBlock block)
Description copied from interface:
ExtEntitySets activity type info (used in e.g. logging to DB) for the given entity
- Specified by:
setFlowchartActivityTypein interfaceExtEntity- See Also:
-
FlowchartActivityType
public int priority()
Description copied from interface:
AgentExtensionThis 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:
priorityin interfaceAgentExtension- Overrides:
priorityin classExtAgentWithSpatialMetricsDelegate<E extends ExtEntity>- Returns:
- int value, see also
P_*constants