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. If the route is calculated automatically, users can set the block to include or avoid some specific conveyors in the route.

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.

Demo model: Convey

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 [dynamic]
[Visible and applies only if the Convey from option is set to 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.
Type of value: PositionOnConveyor
Local variable:  T agent - the current material item
Source conveyor [dynamic]
[Visible and applies only if the Convey from option is set to Conveyor] The conveyor where the material items will be placed. 
Type of value: ConveyorPath
Local variable:  T agent - the current material item
Source offset from [dynamic]
[Visible and applies only if the Convey from option is set to Conveyor] Choose here where to count the source offset from: The beginning of the conveyor, or The end of the conveyor.
Type of value: boolean
Default value: The beginning of the conveyor (true)
Local variable:  T agent - the current material item
Source offset [dynamic]
[Visible and applies only if the Convey from option is set to 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.
Type of value: double
Local variable:  T agent - the current material item
Change orientation [dynamic]
[Visible and applies only if the Convey from option is not set to 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.
Type of value: boolean
Local variable:  T agent - the current material item
Orientation [dynamic]
[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 or Right.
Type of value: 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_OFFSETConvey.TARGET_POSITION_ON_CONVEYORConvey.TARGET_STATIONConvey.TARGET_CUSTOM_STATION
Target position [dynamic]
[Visible and applies only if the Convey to option is set 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.
Type of value: PositionOnConveyor
Local variable:  T agent - the current material item
Target conveyor [dynamic]
[Visible and applies only if the Convey to option is set to Conveyor] The conveyor that is the destination for material items transported by this block.
Type of value: ConveyorPath
Local variable:  T agent - the current material item
Target offset from [dynamic]
[Visible and applies only if the Convey to option is set to Conveyor] Choose here where to count the target offset from: The beginning of the conveyor, or The end of the conveyor.
Type of value: boolean
Default value: The end of the conveyor (false)
Local variable:  T agent - the current material item
Target offset [dynamic]
[Visible and applies only if the Convey to option is set 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.
Type of value: double
Local variable:  T agent - the current material item
Target station [dynamic]
[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.
Type of value: ConveyorStation
Local variable:  T agent - the current material item
Custom station [dynamic]
[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.
Type of value: 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 [dynamic]
[Visible and applies only if the Route is option is set to 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.  
Type of value: ConveyorPath[]
Local variable:  T agent - the current material item
Include conveyors [dynamic]
[Visible and applies only if the Route is option is set to 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.  
Type of value: ConveyorPath[]
Local variable:  T agent - the current material item
Sequence of conveyors [dynamic]
[Visible and applies only if the Route is option is set to 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. 
Type of value: ConveyorPath[]
Local variable:  T agent - the current material item
Leave conveyor on exit [dynamic]
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.   
Type of value: boolean
Local variable:  T agent - the current material item
Exiting agents [dynamic]
[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 [code]
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 exit [code]
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 [code]
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]
Code executed when the agent (material item) exits the block via ccl port.
Local variable:  T agent - the current material item.

Functions

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.

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