AnyLogic
Expand
Font size

Convey

Transports the incoming agents (material items) by conveyor(s) to the specified destination point of a conveyor network. The one and only block that controls material items movement within a conveyor network.

A route can be specified explicitly as a sequence of conveyors or calculated automatically. Automatically calculated route is the shortest sequence of conveyors between the source and target points. If required, you can customize this route by including or avoiding specific conveyors in the route (Avoid conveyors and Include conveyors options).

To enable the material item to make decisions about the route while it is moving, a continuous movement must be modeled by a sequence of multiple Convey blocks, possibly with SelectOutput blocks in between.

Parameters

Convey from
Choose the type of place within the conveyor network where material items start their movement. The options are:
Conveyor — Material items will start their movement from the specified conveyor (from the conveyor start, or with some offset).
Position on conveyor — Material items will start their movement from the point marked graphically with the position on conveyor shape.
Current position — Material items will start their movement from their current location in the conveyor network.
Syntax: SourceType sourceType
Set new value at runtime: set_sourceType(new value)
Valid values:
Convey.SOURCE_CONVEYOR_OFFSET
Convey.SOURCE_POSITION_ON_CONVEYOR
Convey.SOURCE_CURRENT_POSITION
Source position
[Visible and applies only if the Convey from: Position on conveyor]
Select the space markup element Position on conveyor defining the exact place on the conveyor where material items will be placed by this block.
Value type: PositionOnConveyor
Local variable: T agent — the current material item
Source conveyor
[Visible and applies only if the Convey from: Conveyor]
The conveyor where the material items will be placed.
Value type: ConveyorPath
Local variable: T agent — the current material item
Source offset from
[Visible and applies only if the Convey from: Conveyor]
Choose here where to count the source offset from: The beginning of the conveyor, or The end of the conveyor.
Value type: boolean
Default value: The beginning of the conveyor (true)
Local variable: T agent — the current material item
Source offset
[Visible and applies only if the Convey from: Conveyor]
The distance from the start or end point of the conveyor (depends on the Source offset from parameter) to the leading edge of the material item being placed on the conveyor by this block.
Value type: double
Local variable: T agent — the current material item
Change orientation
[Visible and applies only if the Convey from: Current position]
If selected, you will be able to change the orientation of the material item that enters the conveyor by selecting the new leading edge of the item in the Orientation field below.
Value type: boolean
Local variable: T agent — the current material item
Orientation
[Visible and applies only if the Change orientation option is set]
If you need to rotate the material item when it is placed on the conveyor, choose here the side of the item that must be facing the direction of travel:
Front
Rear
Left
Right
Value type: AgentOrientation
Local variable: T agent — the current material item
Valid values:
AGENT_ORIENTATION_FRONT
AGENT_ORIENTATION_REAR
AGENT_ORIENTATION_LEFT
AGENT_ORIENTATION_RIGHT
Convey to

Choose the type of model element defining the place within the conveyor network where material items will move to. The options are:

Conveyor — Material items will move to the specified conveyor (to the conveyor end, or to some other point defined via offset).
Position on conveyor — Material items will move to the point marked graphically with the position on conveyor shape.
Station — Material items will move to the specified station.
Custom station — Material items will move to the specified custom station.
Syntax: TargetType targetType Set new value at runtime: set_targetType(new value)
Valid values:
Convey.TARGET_CONVEYOR_OFFSET
Convey.TARGET_POSITION_ON_CONVEYOR
Convey.TARGET_STATION
Convey.TARGET_CUSTOM_STATION
Target position
[Visible and applies only if the Convey to: Position on conveyor]
Select the space markup element Position on conveyor defining the exact place on the conveyor the material items will be moved to by this block.
Value type: PositionOnConveyor
Local variable: T agent — the current material item
Target conveyor
[Visible and applies only if the Convey to: Conveyor]
The conveyor that is the destination for material items transported by this block.
Value type: ConveyorPath
Local variable: T agent — the current material item
Target offset from
[Visible and applies only if the Convey to: Conveyor]
Choose here where to count the target offset from The beginning of the conveyor or The end of the conveyor.
Value type: boolean
Default value: The end of the conveyor (false)
Local variable: T agent — the current material item
Target offset
[Visible and applies only if the Convey to: Conveyor]
The distance from the start or end point of the conveyor (depends on the Target offset from parameter) to the leading edge of the material item.
Value type: double
Local variable: T agent — the current material item
Target station
[Visible and applies only if the Convey to: Station option is selected]
The station that is the destination for material items transported by this block.
Value type: ConveyorStation
Local variable: T agent — the current material item
Custom station
[Visible and applies only if the Custom station option is set]
The custom station that is the destination for material items transported by this block.
Value type: ConveyorCustomStation
Local variable: T agent — the current material item
Route is
Defines the routing options:
Calculated automatically – The shortest route from the source position to the target position within the conveyor network will be automatically used.
Sequence of conveyors – You explicitly specify all the conveyors composing the route (in the Sequence of conveyors list below).
Syntax: RouteType routeIs Set new value at runtime: set_routeIs(new value) Valid values:
Convey.ROUTE_CALCULATED_AUTOMATICALLY
Convey.ROUTE_LIST_OF_CONVEYORS
Avoid conveyors
[Visible and applies only if Rout is: Calculated automatically]
The list of conveyors (it may contain one or several conveyors) that are forbidden to include in the automatically calculated route for material items.
Value type: ConveyorPath[]
Local variable: T agent — the current material item
Include conveyors
[Visible and applies only if Route is: Calculated automatically]
The list of conveyors (it may contain one or several conveyors) that must be included in the automatically calculated route for material items.
Value type: ConveyorPath[]
Local variable: T agent — the current material item
Sequence of conveyors
[Visible and applies only if the Route is: Sequence of conveyors]
The list of conveyors composing the route that should be used for transporting material items by this block. The source and the target conveyors are included in the sequence. You specify conveyors exactly in the same order they should be used.
Value type: ConveyorPath[]
Local variable: T agent — the current material item
Leave conveyor on exit
Here you can select whether you want to leave material items on the conveyor on reaching the target point, or remove them from the conveyor. If you select not to remove the items (and probably do it later by the ConveyorExit block), select what to do with the item animation in the Exiting agents parameter below.
Value type: boolean
Local variable: T agent — the current material item
Exiting agents
[Visible and applies only if the Leave conveyor on exit option is set]
Here you can choose what happens to the material item's animation when the material item leaves the Convey block. There are two alternative options:
stay where they are — When the agent leaves the Convey block, its animation resides at its current place.
are removed from space — When the agent leaves the Convey block, its animation is removed from presentation.
Value type: boolean
Default value: stay where they are (false)
Local variable: T agent — the current material item

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 current material item
On at exit
Here you can type Java code that will be executed when the agent (material item) decides that it will most likely leave the block.
Local variable: T agent — the current 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 current material item
On remove
Here you can type Java code that will be executed when the agent (material item) is removed from a conveyor.
Local variable: T agent — the current material item
On cancel
Code executed when the agent (material item) exits the block via ccl port.
Local variable: T agent — the current material item.

Functions

Function Description
int size() Returns the number of agents that are currently transported by this block.
Agent remove(Agent agent) Removes the given agent from the conveyor where it is currently located.
void cancel(Agent agent) Causes the given agent to exit the block immediately via ccl port. On cancel code section is executed for the agent.
void cancelAll() Causes all agents to leave the block immediately via ccl port.

On cancel

code section is executed for every agent.
boolean contains(Agent agent) Checks whether the block currently has the given agent inside.
T get(int index) Returns the agent by its index number. The order of the agents corresponds to the order in which they are moving along the conveyor.

Ports

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