AnyLogic
Expand
Font size

Class Robot<T extends Agent>

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

Field Summary

Fields inherited from interface com.anylogic.engine.presentation.UsdElement

ID_NOT_SET

Constructor Summary

ConstructorDescription
Robot() 
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) 

Method Summary

Modifier and TypeMethodDescription
voidattachAgent(T agent) 
doubleaverageCycleTime()
Returns average time that takes the robot to transport or process an agent, in model time units
doubleaverageCycleTime(TimeUnits timeUnits)
Returns average time that takes the robot to transport or process an agent, in time units
booleancanReach(double x, double y, double z, RobotApproachType approachType)
Returns true if the robot can reach specified point in space with specified approach type, false otherwise
booleancanReach(Agent agent, RobotApproachType direction)
Returns true if the robot can reach the agent with specified approach type, false otherwise
booleancontains(double px, double py)
Test if the shape contains the point with the given coordinates (relative to this shape's container, i.e.
voiddetachAgent() 
voidfail()
Sets the robot to failed state
TgetAgent()
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.
doublegetBlockedZoneAngle()
Returns the delta angle of the robot's blocked zone in radians.
doublegetBlockedZoneAngle(AngleUnits units)
Returns the delta angle of the robot's blocked zone.
doublegetBlockedZoneStartAngle()
Returns the initial angle of the robot's blocked zone in radians.
doublegetBlockedZoneStartAngle(AngleUnits units)
Returns the initial angle of the robot's blocked zone.
RobotEndEffectorgetEndEffector()
Returns the end effector equipped by the robot.
ColorgetEndEffectorColor()
Returns the color of robot's end effector
doublegetEndEffectorHorizontalRotation()
Returns the horizontal (along Z axis) rotation of the end effector, in radians
PositiongetEndEffectorPosition()
Returns the position of the robot's end effector
doublegetEndEffectorVerticalRotation()
Returns the vertical (along y axis) rotation of the end effector, in radians
doublegetGripperLength()
Returns the robot's gripper length in pixels.
doublegetGripperLength(LengthUnits units)
Returns the robot's gripper length in the specified length units.
doublegetInitialEndEffectorX()
Returns the initial X coordinate of the robot's end effector
doublegetInitialEndEffectorY()
Returns the initial Y coordinate of the robot's end effector
doublegetInitialEndEffectorZ()
Returns the initial Z coordinate of the robot's end effector
com.anylogic.engine.markup.material_handling.IRobotDescriptor<T>getLibraryDescriptor() 
double[]getLinkEnd(int i) 
double[]getLinkRotations(int i) 
ColorgetLinksColor()
Returns the color of robot's links
double[]getLinksLength()
Returns array of robot's links length, in pixels
double[]getLinksLength(LengthUnits units)
Returns array of the robot's links length, in the specified length units
doublegetMaxArmReach()
Returns maximum arm reach of the robot in pixels
doublegetMaxArmReach(LengthUnits lengthUnits)
Returns the robot's maximum arm reach in the specified length units.
RobotStategetState()
Returns current robot state
doublegetStatisticsStartTime() 
doublegetUtilization()
Returns the robot utilization: the fraction of time the robot was operating.
doublegetX()
Returns the X coordinate of the robot
PointgetXYZ()
Returns the point location of the robot
doublegetY()
Returns the Y coordinate of the robot
doublegetZ()
Returns Z coordinate of the robot relative to robot's level
booleanisBlockedZoneEnabled()
Returns true if the robot has enabled blocked zone and false otherwise.
booleanisFailed()
Returns true if the robot is failed and false otherwise.
booleanisObstacle()
Returns true if this robot is considered an obstacle by transporters moving in free space mode.
voidmoveTo(Point point, RobotApproachType approachType, double time, TimeUnits timeUnits, boolean waitForNextCommand) 
voidmoveTo(T agent, RobotApproachType approachType, double time, TimeUnits timeUnits, boolean waitForNextCommand) 
intnumberOfItemsProcessed()
Returns the number of items, transported or processed by the robot since model start or since last resetStats() call
voidonAgentProcessingEnd(T agent)
Calls the robot's onProcessEnd() callback code
voidonAgentProcessingStart(T agent)
Calls the robot's onProcessStart() callback code
voidonFailed()
Calls the robot's onFailed() callback code
voidonRelease(T agent)
Calls the robot's onRelease() callback code
voidonRepaired()
Calls the robot's onRepaired() callback code
voidonRobotMovementEnd()
Calls the robot's onMovementFinished() callback code
voidonRobotMovementStart()
Calls the robot's onMovementStart() callback code
voidonRobotStateChanged(T agent, RobotState newState)
Calls the robot's onRobotStateChanged() callback code
voidonSeize(T agent)
Calls the robot's onSeize() callback code
voidrepair()
Repairs the robot from failed state
voidresetStats()
Resets the robot utilization statistics.
voidsetBlockedZone(double startAngle, double deltaAngle, AngleUnits units)
Sets the specified blocked zone of the robot in the specified angle units.
voidsetBlockedZoneAngle(double blockedZoneAngle)
Sets the delta angle of the robot's blocked zone in radians.
voidsetBlockedZoneAngle(double angle, AngleUnits units)
Sets the delta angle of the robot's blocked zone in the specified angle units.
voidsetBlockedZoneEnabled(boolean blockedZoneEnabled)
Enables the robot's blocked zone if the parameter is true and disables if false
voidsetBlockedZoneStartAngle(double blockedZoneStartAngle)
Sets the initial angle of the robot's blocked zone in raidans.
voidsetBlockedZoneStartAngle(double angle, AngleUnits units)
Sets the initial angle of the robot's blocked zone in the specified units.
voidsetEndEffector(RobotEndEffector robotEndEffector)
Sets the robot's end effector.
voidsetEndEffectorColor(Color color)
Sets the specified color of robot's end effector
voidsetGripperLength(double gripperLength)
Sets the robot's gripper length in meters.
voidsetGripperLength(double gripperLength, LengthUnits units)
Sets the robot's gripper length in the specified length units.
voidsetGripperWidth(double gripperWidth) 
voidsetInitialEndEffectorX(double initialEndEffectorX)
Sets the initial X coordinate of the robot's end effector
voidsetInitialEndEffectorY(double initialEndEffectorY)
Sets the initial Y coordinate of the robot's end effector
voidsetInitialEndEffectorZ(double initialEndEffectorZ)
Sets the initial Z coordinate of the robot's end effector
voidsetLinksColor(Color color)
Sets the specified color of robot's links
voidsetLinksLength(double[] linksLength)
Sets the links length to the robot in pixels
voidsetLinksLength(double[] linksLength, LengthUnits units)
Sets the links length to the robot in the specified units
voidsetMaxArmReach(double maxArmReach)
Sets the robot's maximum arm reach in pixels.
voidsetMaxArmReach(double maxArmReach, LengthUnits units)
Sets the robot's maximum arm reach in the specified length units.
voidsetObstacle(boolean isObstacle)
Sets this robot as an obstacle for transporters moving in free space mode.
voidsetX(double x)
Sets the X coordinate of the robot
voidsetXYZ(Point point)
Places the robot into the argument point location
voidsetY(double y)
Sets the Y coordinate of the robot
voidsetZ(double z)
Sets the Z coordinate of the robot
doubletimeInState(RobotState robotState)
Returns time (in model time units) the robot spent in specified state since model start or since last resetStats() call
doubletimeInState(RobotState robotState, TimeUnits timeUnits)
Returns time (in units) the robot spent in specified state since model start or since last resetStats() call
voiduninstallEndEffector() 

Methods inherited from class com.anylogic.engine.markup.AbstractLevelMarkup

getDrawMode, getLevel, setLevel

Methods inherited from class com.anylogic.engine.markup.MarkupShape

error, getFullName, getOutsideLevelZ, getPresentable, getSpace, initialize, isClickHandled, isPublic, onClick, remove, setDrawMode, setOwner

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface com.anylogic.engine.markup.AggregatableAnimationElement

initializeInternal, onAggregatorVisibilityChanged, postInitialize

Methods inherited from interface com.anylogic.engine.markup.material_handling.IMaterialMarkupLibraryDescriptor

getMarkup, setMarkup

Constructor Details

Robot

@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)

Robot

public Robot()

Method Details

getX

public double getX()
Returns the X coordinate of the robot
Returns:
the X coordinate of the robot

getY

public double getY()
Returns the Y coordinate of the robot
Returns:
the Y coordinate of the robot

getZ

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

getXYZ

public Point getXYZ()
Returns the point location of the robot
Returns:
the Point object with coordinates of the robot

setX

public void setX(double x)
Sets the X coordinate of the robot
Parameters:
x - the X coordinate of the robot

setY

public void setY(double y)
Sets the Y coordinate of the robot
Parameters:
y - the Y coordinate of the robot

setZ

public void setZ(double z)
Sets the Z coordinate of the robot
Parameters:
z - the Z coordinate of the robot

setXYZ

public void setXYZ(Point point)
Places the robot into the argument point location
Parameters:
point - the location that the robot should be placed into

setGripperWidth

@AnyLogicInternalLibraryAPI
public void setGripperWidth(double gripperWidth)

contains

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 class MarkupShape
Parameters:
px - the x coordinate relative to this shape's container
py - the y coordinate relative to this shape's container
Returns:
true if the shape contains the point with the given coordinates

getInitialEndEffectorX

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

setInitialEndEffectorX

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

getInitialEndEffectorY

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

setInitialEndEffectorY

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

getInitialEndEffectorZ

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

setInitialEndEffectorZ

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

getLinksLength

public double[] getLinksLength()
Returns array of robot's links length, in pixels
Returns:
array of robot's links length, in pixels

getLinksLength

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

setLinksLength

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

setLinksLength

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 values
units - - a constant defining the length units

getLibraryDescriptor

@AnyLogicInternalAPI
public com.anylogic.engine.markup.material_handling.IRobotDescriptor<T> getLibraryDescriptor()

getLinksColor

public Color getLinksColor()
Returns the color of robot's links
Returns:
robot's links color

setEndEffectorColor

public void setEndEffectorColor(Color color)
Sets the specified color of robot's end effector
Parameters:
color - - specified color of robot's end effector

getEndEffectorColor

public Color getEndEffectorColor()
Returns the color of robot's end effector
Returns:
robot's end effector color

setLinksColor

public void setLinksColor(Color color)
Sets the specified color of robot's links
Parameters:
color - - specified color of robot's links

getLinkEnd

@AnyLogicInternalAPI
public double[] getLinkEnd(int i)
Specified by:
getLinkEnd in interface com.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>

getLinkRotations

@AnyLogicInternalLibraryAPI
public double[] getLinkRotations(int i)
Specified by:
getLinkRotations in interface com.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>

canReach

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 otherwise
Specified by:
canReach in interface com.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>

canReach

public boolean canReach(Agent agent,
 RobotApproachType direction)
Returns true if the robot can reach the agent with specified approach type, false otherwise
Specified by:
canReach in interface com.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>

getMaxArmReach

public double getMaxArmReach()
Returns maximum arm reach of the robot in pixels
Returns:
maximum arm reach of the robot in pixels

getMaxArmReach

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

setMaxArmReach

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 reach
units - - a constant defining the length units

setMaxArmReach

public void setMaxArmReach(double maxArmReach)
Sets the robot's maximum arm reach in pixels.
Parameters:
maxArmReach - - robot's maximum arm reach in pixels

getGripperLength

public double getGripperLength()
Returns the robot's gripper length in pixels.
Specified by:
getGripperLength in interface com.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>
Returns:
robot's gripper length in pixels

getGripperLength

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

setGripperLength

public void setGripperLength(double gripperLength)
Sets the robot's gripper length in meters.
Specified by:
setGripperLength in interface com.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>
Parameters:
gripperLength - - the robot's gripper length

setGripperLength

public void setGripperLength(double gripperLength,
 LengthUnits units)
Sets the robot's gripper length in the specified length units.
Parameters:
gripperLength - - the robot's gripper length
units - - a constant defining the length units

getEndEffector

public RobotEndEffector getEndEffector()
Returns the end effector equipped by the robot.
Specified by:
getEndEffector in interface com.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>
Returns:
the end effector equipped by the robot. Valid values are:
  • RobotEndEffector.ROBOT_END_EFFECTOR_GRIPPER
  • RobotEndEffector.ROBOT_END_EFFECTOR_NONE

setEndEffector

public void setEndEffector(RobotEndEffector robotEndEffector)
Sets the robot's end effector. Does nothing if robot is currently operating.
Specified by:
setEndEffector in interface com.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>
Parameters:
robotEndEffector - new robot end effector. Valid values are:
  • RobotEndEffector.ROBOT_END_EFFECTOR_GRIPPER
  • RobotEndEffector.ROBOT_END_EFFECTOR_NONE

uninstallEndEffector

public void uninstallEndEffector()

isObstacle

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, returns false

setObstacle

public void setObstacle(boolean isObstacle)
Sets this robot as an obstacle for transporters moving in free space mode.
Parameters:
isObstacle - - if true, the robot is set as an obstacle. Otherwise, not.

isBlockedZoneEnabled

public boolean isBlockedZoneEnabled()
Returns true if the robot has enabled blocked zone and false otherwise.
Returns:
true if the robot has enabled blocked zone and false otherwise

setBlockedZoneEnabled

public void setBlockedZoneEnabled(boolean blockedZoneEnabled)
Enables the robot's blocked zone if the parameter is true and disables if false

getBlockedZoneStartAngle

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

getBlockedZoneStartAngle

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

setBlockedZoneStartAngle

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

getBlockedZoneAngle

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

getBlockedZoneAngle

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

setBlockedZoneAngle

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

setBlockedZoneAngle

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 zone
units - - a constant defining the angle units

setBlockedZoneStartAngle

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 zone
units - - a constant defining the angle units

isFailed

@AnyLogicInternalLibraryAPI
public boolean isFailed()
Returns true if the robot is failed and false otherwise.
Specified by:
isFailed in interface com.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>
Returns:
true if the robot is failed and false otherwise

fail

@AnyLogicInternalLibraryAPI
public void fail()
Sets the robot to failed state
Specified by:
fail in interface com.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>

repair

@AnyLogicInternalLibraryAPI
public void repair()
Repairs the robot from failed state
Specified by:
repair in interface com.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>

onFailed

@AnyLogicInternalLibraryAPI
public void onFailed()
Calls the robot's onFailed() callback code
Specified by:
onFailed in interface com.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>

onRepaired

@AnyLogicInternalLibraryAPI
public void onRepaired()
Calls the robot's onRepaired() callback code
Specified by:
onRepaired in interface com.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>

setBlockedZone

public 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 zone
deltaAngle - - delta angle of the robot's blocked zone
units - - a constant defining the angle units

getAgent

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;
Specified by:
getAgent in interface com.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>

getAgentsInQueue

public List<T> getAgentsInQueue()
Returns list of agents, waiting for the robot. Ordered by priority (FIFO if priorities are equal)
Specified by:
getAgentsInQueue in interface com.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>

getState

public RobotState getState()
Returns current robot state
Specified by:
getState in interface com.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>
Returns:
current robot state. Valid values are:
  • RobotState.IDLE
  • RobotState.MOVING_TO_AGENT
  • RobotState.TRANSPORTING
  • RobotState.PROCESSING
  • RobotState.MOVING_HOME

getEndEffectorPosition

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

getEndEffectorVerticalRotation

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

getEndEffectorHorizontalRotation

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

onSeize

public void onSeize(T agent)
Calls the robot's onSeize() callback code
Specified by:
onSeize in interface com.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>

onRelease

public void onRelease(T agent)
Calls the robot's onRelease() callback code
Specified by:
onRelease in interface com.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>

onRobotMovementStart

public void onRobotMovementStart()
Calls the robot's onMovementStart() callback code
Specified by:
onRobotMovementStart in interface com.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>

onRobotMovementEnd

public void onRobotMovementEnd()
Calls the robot's onMovementFinished() callback code
Specified by:
onRobotMovementEnd in interface com.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>

onAgentProcessingStart

public void onAgentProcessingStart(T agent)
Calls the robot's onProcessStart() callback code
Specified by:
onAgentProcessingStart in interface com.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>

onAgentProcessingEnd

public void onAgentProcessingEnd(T agent)
Calls the robot's onProcessEnd() callback code
Specified by:
onAgentProcessingEnd in interface com.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>

onRobotStateChanged

public void onRobotStateChanged(T agent,
 RobotState newState)
Calls the robot's onRobotStateChanged() callback code
Specified by:
onRobotStateChanged in interface com.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>

getStatisticsStartTime

@AnyLogicInternalAPI
public double getStatisticsStartTime()
Specified by:
getStatisticsStartTime in interface com.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>

resetStats

public void resetStats()
Resets the robot utilization statistics.
Specified by:
resetStats in interface com.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>

getUtilization

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].
Specified by:
getUtilization in interface com.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>

timeInState

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 interface com.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

timeInState

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 interface com.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

numberOfItemsProcessed

public int numberOfItemsProcessed()
Returns the number of items, transported or processed by the robot since model start or since last resetStats() call
Specified by:
numberOfItemsProcessed in interface com.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>

averageCycleTime

public double averageCycleTime(TimeUnits timeUnits)
Returns average time that takes the robot to transport or process an agent, in time units
Specified by:
averageCycleTime in interface com.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>
Returns:
average time that takes the robot to transport or process an agent, in time units

averageCycleTime

public double averageCycleTime()
Returns average time that takes the robot to transport or process an agent, in model time units
Specified by:
averageCycleTime in interface com.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>
Returns:
average time that takes the robot to transport or process an agent, in model time units

moveTo

@AnyLogicInternalLibraryAPI
public void moveTo(Point point,
 RobotApproachType approachType,
 double time,
 TimeUnits timeUnits,
 boolean waitForNextCommand)
Specified by:
moveTo in interface com.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>

moveTo

@AnyLogicInternalLibraryAPI
public void moveTo(T agent,
 RobotApproachType approachType,
 double time,
 TimeUnits timeUnits,
 boolean waitForNextCommand)
Specified by:
moveTo in interface com.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>

attachAgent

@AnyLogicInternalLibraryAPI
public void attachAgent(T agent)
Specified by:
attachAgent in interface com.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>

detachAgent

@AnyLogicInternalLibraryAPI
public void detachAgent()
Specified by:
detachAgent in interface com.anylogic.engine.markup.material_handling.IRobotDescriptor<T extends Agent>