AnyLogic
Expand
Font size

ProcessByRobot

This block simulates processing of an agent (material item) by a robot. The block defines only the logic, namely the operation that the agent requires to perform using the robot. The robot itself and all its physical properties (links length, maximum arm reach, etc.) are defined by the corresponding space markup shape: robot.

The block seizes the specified robot, then performs the required operation (it can be either processing, or agent transportation to the specified location), and finally releases the robot.

If at the moment of the agent's request the robot is busy, the agent is placed into the internal queue of the block and waits there for the robot to become available. This block retrieves agents from the internal queue based on the FIFO rule (first-in, first-out).

The most important property is the Operation time. For the simplicity, you define just one value to define the operation duration. It includes both the time the robot requires to move its robotic arm to the agent (material item) and the time required for agent processing or transportation.

You can define the post-process for the robot that will be accomplished after finishing the agent processing if there are no other agents waiting in the internal queue. You can choose the required type of the post-process (e.g. move the robot's end effector to the specified location) using the After operation robot option, and specify the time required to complete it, in the Post-process time property.

The agent is considered reachable by a robot, even if it is located only partially in the robot's arm reach area.

You can set the safe height for agent transportation to satisfy the conditions of the environment you are modeling. If the agent needs to be picked up and transported by the robot, at the start of the agent transportation the robot checks its safe height. If the agent is located below the safe height level, before the transportation the robot lifts it up first to the minimum allowed height, and only then transports it to the target location.

Demo model: ProcessByRobot Open the model page in AnyLogic Cloud. There you can run the model or download it (by clicking Model source files).

Parameters

Robot
The robot that processes the agent (material item).
Value type: Robot
Local variable: Agent agent - the agent (material item)
Change end effector
Defines whether the robot should change its end effector when it starts processing the agent (material item).
Value type: boolean
Local variable: T agent - the agent (material item)
End effector
[Visible and applies only if the Change end effector option is selected]
A new end effector for the robot that is set when the processing of the agent (material item) starts. You can choose whether to use gripper end effector, or none (not set).
Value type: RobotEndEffector
Local variable: Agent agent - the current agent (material item)
Valid values:
ROBOT_END_EFFECTOR_GRIPPER — gripper
ROBOT_END_EFFECTOR_NONE — not set
Pick up agent
If selected (true), the robot will move the agent to the specified destination, otherwise the agent will remain stationary and the robot will move by itself.
Value type: boolean
Local variable: T agent - the agent (material item)
Operation time
The time required by the robot to perform the operation. It includes both the time it takes for the robot to move its arm to the agent (material item) and the time required for agent processing or transportation. The value is evaluated for each agent after the On at enter action is executed.
Value type: double
Local variable: T agent - the agent (material item)
Start point
Defines where the robot will be sent. The possible destinations are:
Agent - the robot is sent to the current agent location
Node - the robot is sent to the specified network node
Attractor - the robot is sent to the specified attractor
Conveyor - the robot is sent to the specified conveyor
Position on conveyor - the robot is sent to the specified position on conveyor
(x, y, z) - the robot is sent to the point with the specified coordinates
Value type: ProcessByRobot.DestinationType
Local variable: T agent - the agent (material item)
Valid values:
ProcessByRobot.DEST_AGENT — Agent
ProcessByRobot.DEST_NODE — Node
ProcessByRobot.DEST_ATTRACTOR — Attractor
ProcessByRobot.DEST_CONVEYOR — Conveyor
ProcessByRobot.DEST_POSITION_ON_CONVEYOR — Position on conveyor
ProcessByRobot.DEST_XYZ — (x, y, z)
Node
[Visible and applies only if the Start point is set to Node]
The network node the robot will move to. This value is evaluated right after the robot picks up the agent.
Value type: Node
Local variable: T agent - the agent (material item)
Attractor
[Visible and applies only if the Start point is set to Attractor]
The attractor the robot will move to. This value is evaluated right after the robot picks up the agent.
Value type: Attractor
Local variable: T agent - the agent (material item)
Conveyor
[Visible and applies only if the Start point is set to Conveyor]
The conveyor the robot will move to. This value is evaluated right after the robot picks up the agent.
Value type: ConveyorPath
Local variable: T agent - the agent (material item)
Offset from
[Visible and applies only if the Start point is set to Conveyor]
Defines how to calculate the offset of the exact point on a conveyor the robot will move to: either from The beginning of the conveyor, or from The end of the conveyor.
Value type: boolean
Local variable: T agent - the agent (material item)
Default value: true — The beginning of the conveyor
Offset
[Visible and applies only if the Start point is set to Conveyor]
The distance from the start or end point of the conveyor (depends on the Offset from parameter) defining the exact destination point for the robot. This value is evaluated right after the robot picks up the agent.
Value type: double
Local variable: T agent - the agent (material item)
Position on conveyor
[Visible and applies only if the Start point is set to Position on conveyor]
The position on conveyor the robot will move to. This value is evaluated right after the robot picks up the agent.
Value type: PositionOnConveyor
Local variable: T agent - the agent (material item)
X, Y, Z
[Visible and applies only if the Start point is set to (x, y, z)]
X, Y, Z coordinate of the point the robot will move to. This value is evaluated right after the robot picks up the agent.
Value type: double
Local variable: T agent - the agent (material item)
End point
Defines where the robot will move the agent to, or will move itself after it reaches the start location. The possible destinations are:
Node - the specified network node
Attractor - the specified attractor
Conveyor - the specified conveyor
Position on conveyor - the specified position on conveyor
(x, y, z) - the point with the specified coordinates
Agent - the specified agent location
Value type: ProcessByRobot.DestinationType
Local variable: T agent - the agent (material item)
Valid values:
ProcessByRobot.DEST_AGENT — Agent
ProcessByRobot.DEST_NODE — Node
ProcessByRobot.DEST_ATTRACTOR — Attractor
ProcessByRobot.DEST_CONVEYOR — Conveyor
ProcessByRobot.DEST_POSITION_ON_CONVEYOR — Position on conveyor
ProcessByRobot.DEST_XYZ — (x, y, z)
Node
[Visible and applies only if the End point is set to Node]
The network node the robot will move to after it reaches the start location.
Value type: Node
Local variable: T agent - the agent (material item)
Attractor
[Visible and applies only if the End point is set to Attractor]
The attractor the robot will move to after it reaches the start location.
Value type: Attractor
Local variable: T agent - the agent (material item)
Conveyor
[Visible and applies only if the End point is set to Conveyor]
The conveyor the robot will move to after it reaches the start location.
Value type: ConveyorPath
Local variable: T agent - the agent (material item)
Offset from
[Visible and applies only if the End point is set to Conveyor]
Defines how to calculate the offset of the exact point on a conveyor the robot will move to after it reaches the start location: either from The beginning of the conveyor, or from The end of the conveyor.
Value type: boolean
Local variable: T agent - the agent (material item)
Default value: true — The beginning of the conveyor
Offset
[Visible and applies only if the End point is set to Conveyor]
The distance from the start or end point of the conveyor (depends on the Offset from parameter) defining the exact destination point for the robot.
Value type: double
Local variable: T agent - the agent (material item)
Position on conveyor
[Visible and applies only if the End point is set to Position on conveyor]
The position on conveyor the robot will move to after it reaches the start location.
Value type: PositionOnConveyor
Local variable: T agent - the agent (material item)
X, Y, Z
[Visible and applies only if the End point is set to (x, y, z)]
X, Y, Z coordinate of the point the robot will move to after it reaches the start location.
Value type: double
Local variable: T agent - the agent (material item)
Agent
[Visible and applies only if the End point is set to Agent]
The agent the robot will move to after it reaches the start location.
Value type: Agent
Local variable: T agent - the current agent (material item)
End effector approaches
Defines from which point the robot approaches the location/agent. The possible options are:
Top side - the robot approaches the location from above.
Nearest side - the robot approaches the location from the side, closest to the robot base.
Value type: RobotApproachType
Local variable: T agent - the agent (material item)
Valid values:
ROBOT_APPROACH_TOP_SIDE — top side
ROBOT_APPROACH_NEAREST_SIDE — nearest side
Safe height
[Visible and applies only if the Pick up agent option is selected]
Specifies the absolute minimum height the robot should raise the agent to in order to move it (e.g., to avoid obstacles).
Value type: double
Local variable: T agent - the agent (material item)
After operation robot
Defines the robot behavior after agent processing is finished and if there are no other agents in the queue. You can choose the robot to do nothing, or return to its initial position, or make it execute a post-process - move its end effector to the specified target after finishing the agent processing.
Value type: ProcessByRobot.ActionAfterOperation
Local variable: T agent - the agent (material item)
Valid values:
ProcessByRobot.AFTER_OPERATION_STAY — stays where it is
ProcessByRobot.AFTER_OPERATION_MOVE_TO_INITIAL_POSITION — returns to initial position
ProcessByRobot.AFTER_OPERATION_MOVE_TO_TARGET — moves end effector to
Target is
Defines where the robot will move its end effector to after the operation. The possible destinations are:
Node - the specified network node
Attractor - the specified attractor
Conveyor - the specified conveyor
Position on conveyor - the specified position on conveyor
(x, y, z) - the point with the specified coordinates
Agent - the specified agent location
Value type: ProcessByRobot.DestinationType
Valid values:
ProcessByRobot.DEST_AGENT — Agent
ProcessByRobot.DEST_NODE — Node
ProcessByRobot.DEST_ATTRACTOR — Attractor
ProcessByRobot.DEST_CONVEYOR — Conveyor
ProcessByRobot.DEST_POSITION_ON_CONVEYOR — Position on conveyor
ProcessByRobot.DEST_XYZ — (x, y, z)
Node
[Visible and applies only if the Target is: Node]
The network node the robot will move its end effector to after the operation.
Value type: Node
Local variable: T agent - the agent (material item)
Attractor
[Visible and applies only if the Target is: Attractor]
The attractor the robot will move its end effector to after the operation.
Value type: Attractor
Local variable: T agent - the agent (material item)
Conveyor
[Visible and applies only if the Target is: Conveyor]
The conveyor the robot will move its end effector to after the operation.
Value type: ConveyorPath
Local variable: T agent - the agent (material item)
Offset from
[Visible and applies only if the Target is: Conveyor]
Defines how to calculate the offset of the exact point on a conveyor the robot will move its end effector to after the operation: either from The beginning of the conveyor, or from The end of the conveyor.
Value type: boolean
Local variable: T agent — the agent (material item)
Default value: true — The beginning of the conveyor
Offset
[Visible and applies only if the Target is: Conveyor]
The distance from the start or end point of the conveyor (depends on the Offset from parameter) defining the exact destination point for the robot.
Value type: double
Local variable: T agent - the agent (material item)
Position on conveyor
[Visible and applies only if the Target is: Position on conveyor]
The position on conveyor the robot will move its end effector to after the operation.
Value type: PositionOnConveyor
Local variable: T agent - the agent (material item)
X, Y, Z
[Visible and applies only if the Target is: (x, y, z)]
X, Y, Z coordinate of the point the robot will move its end effector to after the operation.
Value type: double
Local variable: T agent - the agent (material item)
Agent
[Visible and applies only if the Target is: Agent]
The agent the robot will move its end effector to after the operation.
Value type: Agent
Local variable: T agent - the current agent (material item)
End effector approaches
Defines from which point the robot approaches the target. The possible options are:
Top side - the robot approaches the target from above.
Nearest side - the robot approaches the target from the side, closest to the robot base.
Value type: RobotApproachType
Valid values:
ROBOT_APPROACH_TOP_SIDE — top side
ROBOT_APPROACH_NEAREST_SIDE — nearest side
Post-process time
[Visible and applies only if the After operation robot is not set to stays where it is]
The amount of time provided to the robot to move to the specified location after the agent processing is finished and there are no other agents in the queue.
Value type: double

Actions

On enter
Here you can type Java code that will be executed when the agent (material item) enters the block.
Local variable: T agent - the agent (material item)
On seize
Here you can type Java code that will be executed when the agent (material item) seizes the robot.
Local variables:
T agent - the agent (material item)
Robot robot - the robot seized by the agent
On processing start
Here you can type Java code that will be executed when the robot has reached the agent (material item) and is ready to start processing or transporting.
Local variables:
T agent - the agent (material item)
Robot robot - the robot performing the operation
On processing end
Here you can type Java code that will be executed when the robot has reached the destination, i.e. finished processing or transporting.
Local variables:
T agent - the agent (material item)
Robot robot - the robot performing the operation
On release
Here you can type Java code that will be executed when the agent (material item) releases the robot.
Local variables:
T agent - the agent (material item)
Robot robot - the robot released by the agent
On at exit
Here you can type Java code that will be executed when the agent (material item) decides that it will most likely exit the block.
Local variable: T agent - the agent (material item)
On exit
Here you can type Java code that will be executed when the agent (material item) leaves the block.
Local variable: T agent - the agent (material item)
On remove
Here you can type Java code that will be executed when the agent (material item) is removed from this block.
Local variable: T agent - the agent (material item)
On cancel
Here you can type Java code that will be executed when the agent (material item) exits the block via ccl port.
Local variable: T agent - the agent (material item)

Functions

Function Description
int size() Returns the number of agents (material items) currently located in this block (either being handled by the robot, or waiting for it in the block's internal queue).
T remove(Agent agent) Removes the specified agent (material item) from the block. If the robot is currently transporting this agent at the moment the function is called, the warning is thrown.

agent — the agent to remove
boolean contains(Agent agent) Returns true if this block (including the block's internal queue containing the agents waiting for the robot) contains the specified agent (material item).

agent — the agent to check
void cancel(T agent) Causes the specified agent to immediately exit the block through the ccl port. The On cancel code section is executed for the agent.

agent — the agent to remove through the ccl port

Ports

in
The input port.
out
The output port.
ccl
The output port for agents leaving the block because of the "cancel" event (caused by a call of the cancel() function).
How can we improve this article?