Package com.anylogic.engine.markup
- Field Summary
- Constructor Summary
- Method Summary
- Methods inherited from class com.anylogic.engine.markup.AbstractLevelMarkup
- Methods inherited from class com.anylogic.engine.markup.MarkupShape
- Methods inherited from class com.anylogic.engine.markup.AbstractMarkup
- Methods inherited from class java.lang.Object
- Methods inherited from interface com.anylogic.engine.markup.AggregatableAnimationElement
- Methods inherited from interface com.anylogic.engine.markup.material_handling.IMaterialMarkupLibraryDescriptor
- Constructor Details
- Method Details
- getX
- getY
- getZ
- getXYZ
- setX
- setY
- setZ
- setXYZ
- setGripperWidth
- contains
- getInitialEndEffectorX
- setInitialEndEffectorX
- getInitialEndEffectorY
- setInitialEndEffectorY
- getInitialEndEffectorZ
- setInitialEndEffectorZ
- getLinksLength
- getLinksLength
- setLinksLength
- setLinksLength
- getLibraryDescriptor
- getLinksColor
- setEndEffectorColor
- getEndEffectorColor
- setLinksColor
- getLinkEnd
- getLinkRotations
- canReach
- canReach
- getMaxArmReach
- getMaxArmReach
- setMaxArmReach
- setMaxArmReach
- getGripperLength
- getGripperLength
- setGripperLength
- setGripperLength
- getEndEffector
- setEndEffector
- uninstallEndEffector
- isObstacle
- setObstacle
- isBlockedZoneEnabled
- setBlockedZoneEnabled
- getBlockedZoneStartAngle
- getBlockedZoneStartAngle
- setBlockedZoneStartAngle
- getBlockedZoneAngle
- getBlockedZoneAngle
- setBlockedZoneAngle
- setBlockedZoneAngle
- setBlockedZoneStartAngle
- isFailed
- fail
- repair
- onFailed
- onRepaired
- setBlockedZone
- getAgent
- getAgentsInQueue
- getState
- getEndEffectorPosition
- getEndEffectorVerticalRotation
- getEndEffectorHorizontalRotation
- onSeize
- onRelease
- onRobotMovementStart
- onRobotMovementEnd
- onAgentProcessingStart
- onAgentProcessingEnd
- onRobotStateChanged
- getStatisticsStartTime
- resetStats
- getUtilization
- timeInState
- timeInState
- numberOfItemsProcessed
- averageCycleTime
- averageCycleTime
- moveTo
- moveTo
- attachAgent
- detachAgent
- java.lang.Object
- com.anylogic.engine.markup.AbstractMarkup
- com.anylogic.engine.markup.MarkupShape
- com.anylogic.engine.markup.AbstractLevelMarkup
- com.anylogic.engine.markup.Robot<T>
- All Implemented Interfaces:
AggregatableAnimationElement
,HasLevel
,IMarkupLibraryDescriptor
,LevelElement
,LevelMarkup
,com.anylogic.engine.markup.material_handling.IMaterialMarkupLibraryDescriptor
,com.anylogic.engine.markup.material_handling.IRobotDescriptor<T>
,SVGElement
,UsdElement
,Serializable
public class Robot<T extends Agent> extends AbstractLevelMarkup implements com.anylogic.engine.markup.material_handling.IRobotDescriptor<T>
- See Also:
- Serialized Form
Constructor | Description |
---|---|
Robot() | |
Robot |
Modifier and Type | Method | Description |
---|---|---|
void | attachAgent | |
double | averageCycleTime() |
Returns average time that takes the robot to transport or process an agent,
in model time units
|
double | averageCycleTime |
Returns average time that takes the robot to transport or process an agent,
in time units
|
boolean | canReach |
Returns
true if the robot can reach specified point in space with
specified approach type, false otherwise |
boolean | canReach |
Returns
true if the robot can reach the agent with specified approach
type, false otherwise |
boolean | contains |
Test if the shape contains the point with the given coordinates (relative
to this shape's container, i.e.
|
void | detachAgent() | |
void | fail() |
Sets the robot to
failed state |
T | getAgent() |
Returns the agent, currently operated by robot, including the case when robot
is moving to the agent.
|
List<T> | getAgentsInQueue() |
Returns list of agents, waiting for the robot.
|
double | getBlockedZoneAngle() |
Returns the delta angle of the robot's blocked zone in radians.
|
double | getBlockedZoneAngle |
Returns the delta angle of the robot's blocked zone.
|
double | getBlockedZoneStartAngle() |
Returns the initial angle of the robot's blocked zone in radians.
|
double | getBlockedZoneStartAngle |
Returns the initial angle of the robot's blocked zone.
|
RobotEndEffector | getEndEffector() |
Returns the end effector equipped by the robot.
|
Color | getEndEffectorColor() |
Returns the color of robot's end effector
|
double | getEndEffectorHorizontalRotation() |
Returns the horizontal (along Z axis) rotation of the end effector, in
radians
|
Position | getEndEffectorPosition() |
Returns the position of the robot's end effector
|
double | getEndEffectorVerticalRotation() |
Returns the vertical (along y axis) rotation of the end effector, in radians
|
double | getGripperLength() |
Returns the robot's gripper length in pixels.
|
double | getGripperLength |
Returns the robot's gripper length in the specified length units.
|
double | getInitialEndEffectorX() |
Returns the initial X coordinate of the robot's end effector
|
double | getInitialEndEffectorY() |
Returns the initial Y coordinate of the robot's end effector
|
double | getInitialEndEffectorZ() |
Returns the initial Z coordinate of the robot's end effector
|
com.anylogic.engine.markup.material_handling.IRobotDescriptor<T> | getLibraryDescriptor() | |
double[] | getLinkEnd | |
double[] | getLinkRotations | |
Color | getLinksColor() |
Returns the color of robot's links
|
double[] | getLinksLength() |
Returns array of robot's links length, in pixels
|
double[] | getLinksLength |
Returns array of the robot's links length, in the specified length units
|
double | getMaxArmReach() |
Returns maximum arm reach of the robot in pixels
|
double | getMaxArmReach |
Returns the robot's maximum arm reach in the specified length units.
|
RobotState | getState() |
Returns current robot state
|
double | getStatisticsStartTime() | |
double | getUtilization() |
Returns the robot utilization: the fraction of time the robot was operating.
|
double | getX() |
Returns the X coordinate of the robot
|
Point | getXYZ() |
Returns the point location of the robot
|
double | getY() |
Returns the Y coordinate of the robot
|
double | getZ() |
Returns Z coordinate of the robot relative to robot's level
|
boolean | isBlockedZoneEnabled() |
Returns
true if the robot has enabled blocked zone and false
otherwise. |
boolean | isFailed() |
Returns
true if the robot is failed and false otherwise. |
boolean | isObstacle() |
Returns
true if this robot is considered an obstacle by transporters
moving in free space mode. |
void | moveTo | |
void | moveTo | |
int | numberOfItemsProcessed() |
Returns the number of items, transported or processed by the robot since
model start or since last
resetStats() call |
void | onAgentProcessingEnd |
Calls the robot's
onProcessEnd() callback code |
void | onAgentProcessingStart |
Calls the robot's
onProcessStart() callback code |
void | onFailed() |
Calls the robot's
onFailed() callback code |
void | onRelease |
Calls the robot's
onRelease() callback code |
void | onRepaired() |
Calls the robot's
onRepaired() callback code |
void | onRobotMovementEnd() |
Calls the robot's
onMovementFinished() callback code |
void | onRobotMovementStart() |
Calls the robot's
onMovementStart() callback code |
void | onRobotStateChanged |
Calls the robot's
onRobotStateChanged() callback code |
void | onSeize |
Calls the robot's
onSeize() callback code |
void | repair() |
Repairs the robot from
failed state |
void | resetStats() |
Resets the robot utilization statistics.
|
void | setBlockedZone |
Sets the specified blocked zone of the robot in the specified angle units.
|
void | setBlockedZoneAngle |
Sets the delta angle of the robot's blocked zone in radians.
|
void | setBlockedZoneAngle |
Sets the delta angle of the robot's blocked zone in the specified angle
units.
|
void | setBlockedZoneEnabled |
Enables the robot's blocked zone if the parameter is
true and
disables if false |
void | setBlockedZoneStartAngle |
Sets the initial angle of the robot's blocked zone in raidans.
|
void | setBlockedZoneStartAngle |
Sets the initial angle of the robot's blocked zone in the specified units.
|
void | setEndEffector |
Sets the robot's end effector.
|
void | setEndEffectorColor |
Sets the specified color of robot's end effector
|
void | setGripperLength |
Sets the robot's gripper length in meters.
|
void | setGripperLength |
Sets the robot's gripper length in the specified length units.
|
void | setGripperWidth | |
void | setInitialEndEffectorX |
Sets the initial X coordinate of the robot's end effector
|
void | setInitialEndEffectorY |
Sets the initial Y coordinate of the robot's end effector
|
void | setInitialEndEffectorZ |
Sets the initial Z coordinate of the robot's end effector
|
void | setLinksColor |
Sets the specified color of robot's links
|
void | setLinksLength |
Sets the links length to the robot in pixels
|
void | setLinksLength |
Sets the links length to the robot in the specified units
|
void | setMaxArmReach |
Sets the robot's maximum arm reach in pixels.
|
void | setMaxArmReach |
Sets the robot's maximum arm reach in the specified length units.
|
void | setObstacle |
Sets this robot as an obstacle for transporters moving in free space mode.
|
void | setX |
Sets the X coordinate of the robot
|
void | setXYZ |
Places the robot into the argument point location
|
void | setY |
Sets the Y coordinate of the robot
|
void | setZ |
Sets the Z coordinate of the robot
|
double | timeInState |
Returns time (in model time units) the robot spent in specified state since
model start or since last
resetStats() call |
double | timeInState |
Returns time (in units) the robot spent in specified state since model start
or since last
resetStats() call |
void | uninstallEndEffector() |
error, getFullName, getOutsideLevelZ, getPresentable, getSpace, initialize, isClickHandled, isPublic, onClick, remove, setDrawMode, setOwner
discardOwner, executeUserAction, findSVGElement, getName, getOrGenerateUSDId, getSVGId, initializeInternal, isVisible, onAggregatorInitialized, onAggregatorVisibilityChanged, removeSVGFromOwner, resetSVGState, setVisible, updateDynamicProperties, updateDynamicPropertiesStructural, updateSVGProperties
@AnyLogicInternalAPI public Robot(Agent owner, ShapeDrawMode drawMode, boolean isPublic, boolean isObstacle, com.anylogic.engine.markup.material_handling.IRobotDescriptor<T> descriptor, double x, double y, double z, double[] linksLength, Color linksColor, Color endEffectorColor, double initialEndEffectorX, double initialEndEffectorY, double initialEndEffectorZ, double maxArmReach, boolean blockedZoneEnabled, double blockedZoneStartAngleRadians, double blockedZoneAngleRadians)
public Robot()
public double getX()
Returns the X coordinate of the robot
- Returns:
- the X coordinate of the robot
public double getY()
Returns the Y coordinate of the robot
- Returns:
- the Y coordinate of the robot
public double getZ()
Returns Z coordinate of the robot relative to robot's level
- Returns:
- the Z coordinate of the robot relative to robot's level
public Point getXYZ()
Returns the point location of the robot
- Returns:
- the Point object with coordinates of the robot
public void setX(double x)
Sets the X coordinate of the robot
- Parameters:
x
- the X coordinate of the robot
public void setY(double y)
Sets the Y coordinate of the robot
- Parameters:
y
- the Y coordinate of the robot
public void setZ(double z)
Sets the Z coordinate of the robot
- Parameters:
z
- the Z coordinate of the robot
public void setXYZ(Point point)
Places the robot into the argument point location
- Parameters:
point
- the location that the robot should be placed into
@AnyLogicInternalLibraryAPI public void setGripperWidth(double gripperWidth)
public boolean contains(double px, double py)
Description copied from class:
MarkupShape
Test if the shape contains the point with the given coordinates (relative
to this shape's container, i.e. in the same system with the coordinates
of this shape, x and y)
- Specified by:
contains
in classMarkupShape
- Parameters:
px
- the x coordinate relative to this shape's containerpy
- the y coordinate relative to this shape's container- Returns:
true
if the shape contains the point with the given coordinates
public double getInitialEndEffectorX()
Returns the initial X coordinate of the robot's end effector
- Returns:
- the initial X coordinate of the robot's end effector
public void setInitialEndEffectorX(double initialEndEffectorX)
Sets the initial X coordinate of the robot's end effector
- Parameters:
initialEndEffectorX
- the X coordinate of the robot's end effector
public double getInitialEndEffectorY()
Returns the initial Y coordinate of the robot's end effector
- Returns:
- the initial Y coordinate of the robot's end effector
public void setInitialEndEffectorY(double initialEndEffectorY)
Sets the initial Y coordinate of the robot's end effector
- Parameters:
initialEndEffectorY
- the Y coordinate of the robot's end effector
public double getInitialEndEffectorZ()
Returns the initial Z coordinate of the robot's end effector
- Returns:
- the initial Z coordinate of the robot's end effector
public void setInitialEndEffectorZ(double initialEndEffectorZ)
Sets the initial Z coordinate of the robot's end effector
- Parameters:
initialEndEffectorZ
- the Z coordinate of the robot's end effector
public double[] getLinksLength()
Returns array of robot's links length, in pixels
- Returns:
- array of robot's links length, in pixels
public double[] getLinksLength(LengthUnits units)
Returns array of the robot's links length, in the specified length units
- Parameters:
units
- - a constant defining the length units- Returns:
- array of the robot's links length, in the specified length units
public void setLinksLength(double[] linksLength)
Sets the links length to the robot in pixels
- Parameters:
linksLength
- - array of the links lengths, measured in pixels. Should contain exactly 6 values
public void setLinksLength(double[] linksLength, LengthUnits units)
Sets the links length to the robot in the specified units
- Parameters:
linksLength
- - array of the links lengths, measured in the specified length units. Should contain exactly 6 valuesunits
- - a constant defining the length units
@AnyLogicInternalAPI public com.anylogic.engine.markup.material_handling.IRobotDescriptor<T> getLibraryDescriptor()
public Color getLinksColor()
Returns the color of robot's links
- Returns:
- robot's links color
public void setEndEffectorColor(Color color)
Sets the specified color of robot's end effector
- Parameters:
color
- - specified color of robot's end effector
public Color getEndEffectorColor()
Returns the color of robot's end effector
- Returns:
- robot's end effector color
public void setLinksColor(Color color)
Sets the specified color of robot's links
- Parameters:
color
- - specified color of robot's links
@AnyLogicInternalAPI public double[] getLinkEnd(int i)
@AnyLogicInternalLibraryAPI public double[] getLinkRotations(int i)
public boolean canReach(double x, double y, double z, RobotApproachType approachType)
Returns
true
if the robot can reach specified point in space with
specified approach type, false
otherwisepublic boolean canReach(Agent agent, RobotApproachType direction)
Returns
true
if the robot can reach the agent with specified approach
type, false
otherwisepublic double getMaxArmReach()
Returns maximum arm reach of the robot in pixels
- Returns:
- maximum arm reach of the robot in pixels
public double getMaxArmReach(LengthUnits lengthUnits)
Returns the robot's maximum arm reach in the specified length units.
- Parameters:
units
- - a constant defining the length units- Returns:
- robot's maximum arm reach in the specified units
public void setMaxArmReach(double maxArmReach, LengthUnits units)
Sets the robot's maximum arm reach in the specified length units.
- Parameters:
maxArmReach
- - robot's maximum arm reachunits
- - a constant defining the length units
public void setMaxArmReach(double maxArmReach)
Sets the robot's maximum arm reach in pixels.
- Parameters:
maxArmReach
- - robot's maximum arm reach in pixels
public double getGripperLength()
Returns the robot's gripper length in pixels.
public double getGripperLength(LengthUnits units)
Returns the robot's gripper length in the specified length units.
- Parameters:
units
- - a constant defining the length units- Returns:
- robot's gripper length in the specified units
public void setGripperLength(double gripperLength)
Sets the robot's gripper length in meters.
public void setGripperLength(double gripperLength, LengthUnits units)
Sets the robot's gripper length in the specified length units.
- Parameters:
gripperLength
- - the robot's gripper lengthunits
- - a constant defining the length units
public RobotEndEffector getEndEffector()
Returns the end effector equipped by the robot.
public void setEndEffector(RobotEndEffector robotEndEffector)
Sets the robot's end effector. Does nothing if robot is currently operating.
public void uninstallEndEffector()
public boolean isObstacle()
Returns
true
if this robot is considered an obstacle by transporters
moving in free space mode. Otherwise, returns false
.- Returns:
true
if this robot is considered an obstacle by transporters moving in free space mode. Otherwise, returnsfalse
public void setObstacle(boolean isObstacle)
Sets this robot as an obstacle for transporters moving in free space mode.
- Parameters:
isObstacle
- - iftrue
, the robot is set as an obstacle. Otherwise, not.
public boolean isBlockedZoneEnabled()
Returns
true
if the robot has enabled blocked zone and false
otherwise.- Returns:
true
if the robot has enabled blocked zone andfalse
otherwise
public void setBlockedZoneEnabled(boolean blockedZoneEnabled)
Enables the robot's blocked zone if the parameter is
true
and
disables if false
public double getBlockedZoneStartAngle()
Returns the initial angle of the robot's blocked zone in radians.
- Returns:
- initial angle of the robot's blocked zone in radians
public double getBlockedZoneStartAngle(AngleUnits units)
Returns the initial angle of the robot's blocked zone.
- Parameters:
units
- - a constant defining the angle units- Returns:
- initial angle of the robot's blocked zone in the specified units
public void setBlockedZoneStartAngle(double blockedZoneStartAngle)
Sets the initial angle of the robot's blocked zone in raidans.
- Parameters:
angle
- - the new initial angle of the robot's blocked zone
public double getBlockedZoneAngle()
Returns the delta angle of the robot's blocked zone in radians.
- Returns:
- delta angle of the robot's blocked zone in radians
public double getBlockedZoneAngle(AngleUnits units)
Returns the delta angle of the robot's blocked zone.
- Parameters:
units
- - a constant defining the angle units- Returns:
- delta angle of the robot's blocked zone in the specified units
public void setBlockedZoneAngle(double blockedZoneAngle)
Sets the delta angle of the robot's blocked zone in radians.
- Parameters:
angle
- - the new delta angle of the robot's blocked zone
public void setBlockedZoneAngle(double angle, AngleUnits units)
Sets the delta angle of the robot's blocked zone in the specified angle
units.
- Parameters:
angle
- - the new delta angle of the robot's blocked zoneunits
- - a constant defining the angle units
public void setBlockedZoneStartAngle(double angle, AngleUnits units)
Sets the initial angle of the robot's blocked zone in the specified units.
- Parameters:
angle
- - the new initial angle of the robot's blocked zoneunits
- - a constant defining the angle units
@AnyLogicInternalLibraryAPI public boolean isFailed()
Returns
true
if the robot is failed and false
otherwise.@AnyLogicInternalLibraryAPI public void fail()
Sets the robot to
failed
state@AnyLogicInternalLibraryAPI public void repair()
Repairs the robot from
failed
state@AnyLogicInternalLibraryAPI public void onFailed()
Calls the robot's
onFailed()
callback code@AnyLogicInternalLibraryAPI public void onRepaired()
Calls the robot's
onRepaired()
callback codepublic void setBlockedZone(double startAngle, double deltaAngle, AngleUnits units)
Sets the specified blocked zone of the robot in the specified angle units.
Note that if the blocked zone is disabled, then it will be enabled by this
method.
- Parameters:
startAngle
- - start angle of the robot's blocked zonedeltaAngle
- - delta angle of the robot's blocked zoneunits
- - a constant defining the angle units
public T getAgent()
Returns the agent, currently operated by robot, including the case when robot
is moving to the agent. Returns null if there is no such agent;
public List<T> getAgentsInQueue()
Returns list of agents, waiting for the robot. Ordered by priority (FIFO if
priorities are equal)
public RobotState getState()
Returns current robot state
public Position getEndEffectorPosition()
Returns the position of the robot's end effector
- Returns:
- the Position object with coordinates and rotations of the robot's end effector
public double getEndEffectorVerticalRotation()
Returns the vertical (along y axis) rotation of the end effector, in radians
- Returns:
- the vertical rotation of the end effector, in radians
public double getEndEffectorHorizontalRotation()
Returns the horizontal (along Z axis) rotation of the end effector, in
radians
- Returns:
- the horizontal rotation of the end effector, in radians
public void onSeize(T agent)
Calls the robot's
onSeize()
callback codepublic void onRelease(T agent)
Calls the robot's
onRelease()
callback codepublic void onRobotMovementStart()
Calls the robot's
onMovementStart()
callback codepublic void onRobotMovementEnd()
Calls the robot's
onMovementFinished()
callback codepublic void onAgentProcessingStart(T agent)
Calls the robot's
onProcessStart()
callback codepublic void onAgentProcessingEnd(T agent)
Calls the robot's
onProcessEnd()
callback codepublic void onRobotStateChanged(T agent, RobotState newState)
Calls the robot's
onRobotStateChanged()
callback code@AnyLogicInternalAPI public double getStatisticsStartTime()
public void resetStats()
Resets the robot utilization statistics.
public double getUtilization()
Returns the robot utilization: the fraction of time the robot was operating.
The returned robot utilization value lies in the range [0..1].
public double timeInState(RobotState robotState, TimeUnits timeUnits)
Returns time (in units) the robot spent in specified state since model start
or since last
resetStats()
call- Specified by:
timeInState
in interfacecom.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>
- Parameters:
robotState
- - robot state. Valid values are:RobotState.IDLE
RobotState.MOVING_TO_AGENT
RobotState.TRANSPORTING
RobotState.PROCESSING
RobotState.MOVING_HOME
units
- - time units for returned value- Returns:
- time the robot spent in specified state
public double timeInState(RobotState robotState)
Returns time (in model time units) the robot spent in specified state since
model start or since last
resetStats()
call- Specified by:
timeInState
in interfacecom.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>
- Parameters:
robotState
- - robot state. Valid values are:RobotState.IDLE
RobotState.MOVING_TO_AGENT
RobotState.TRANSPORTING
RobotState.PROCESSING
RobotState.MOVING_HOME
units
- - time units for returned value- Returns:
- time the robot spent in specified state, in model time units
public int numberOfItemsProcessed()
Returns the number of items, transported or processed by the robot since
model start or since last
resetStats()
callpublic double averageCycleTime(TimeUnits timeUnits)
Returns average time that takes the robot to transport or process an agent,
in time units
public double averageCycleTime()
Returns average time that takes the robot to transport or process an agent,
in model time units
@AnyLogicInternalLibraryAPI public void moveTo(Point point, RobotApproachType approachType, double time, TimeUnits timeUnits, boolean waitForNextCommand)
@AnyLogicInternalLibraryAPI public void moveTo(T agent, RobotApproachType approachType, double time, TimeUnits timeUnits, boolean waitForNextCommand)
@AnyLogicInternalLibraryAPI public void attachAgent(T agent)
@AnyLogicInternalLibraryAPI public void detachAgent()