Seize Crane

Seizes the crane and sends it to the specified location. The agent enters the SeizeCrane block and is placed in the queue of the crane specified in the block's properties where it waits until the crane arrives at the destination. When the crane reaches the specified destination, the agent leaves the block.

You can use this block to model complex crane logic, where you need to separate the crane's movement to the agent from the transportation of the agent by the crane, e.g. you want to insert some processing of the agent (material item) between these two processes. The additional handling of the agent can be modeled with the help of the Process Modeling Library blocks.

Use the ReleaseCrane block or the MoveByCrane block to release the seized crane.

Demo model: SeizeCrane and ReleaseCrane

Crane seize rules

You can select either a whole crane or a specific bridge.

Note: All seized cranes must be released before the agent (material item) is disposed of in the Sink block.

Parameters

Crane [dynamic]
The crane or bridge that moves the agent (material item).
Type of value: Crane
Local variable: T agent - the current agent (material item)
Destination is
Defines where the crane will be sent. Possible destinations are:
Agent - the current agent location
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
Syntax: DestinationType destinationType
Valid values:
SeizeCrane.DEST_AGENT - specified agent
SeizeCrane.DEST_NODE - specified network node
SeizeCrane.DEST_ATTRACTOR - specified attractor
SeizeCrane.DEST_CONVEYOR - specified conveyor
SeizeCrane.DEST_POSITION_ON_CONVEYOR - specified position on conveyor
SeizeCrane.DEST_XYZ - point with specified coordinates
Node [dynamic]
[Visible and applies only if Destination is: Node] The network node where the crane or bridge will be sent.
Type of value: Node
Local variable: T agent - the current agent
Attractor [dynamic]
[Visible and applies only if Destination is: Attractor] The attractor where the crane or bridge will be sent.
Type of value: Attractor
Local variable: T agent - the current agent (material item)
Conveyor [dynamic]
[Visible and applies only if Destination is: Conveyor] The conveyor where the crane or bridge will be sent.
Type of value: ConveyorPath
Local variable: T agent - the current agent (material item)
Offset from [dynamic]
[Visible and applies only if Destination is: Conveyor] Defines how to calculate the offset of the exact point on a conveyor where the crane or bridge will be sent: from the beginning of the conveyor, or from the end of the conveyor.
Type of value: boolean
Local variable: T agent - the current agent (material item)
Offset [dynamic]
[Visible and applies only if Destination is: Conveyor] The distance from the starting or ending point of the conveyor (depends on the Offset from parameter) that defines the exact destination point for the crane.
Type of value: double
Local variable: T agent - the current agent (material item)
Position on conveyor [dynamic]
[Visible and applies only if Destination is: Position on conveyor] The position on conveyor where the crane or bridge will be sent.
Type of value: PositionOnConveyor
Local variable: T agent - the current agent (material item)
X, Y, Z [dynamic]
[Visible and applies only if Destination is: (x, y, z)] X, Y, Z coordinate of the point where the crane or bridge will move to.
Type of value: double
Local variable: T agent - the current agent (material item)
... located in [dynamic]
[Visible and applies only if Destination is: (x, y, z)] Specifies where the point is located: either on Level or in Network.
Type of value: boolean destinationInNetwork
Default value: false
Level [dynamic]
[Visible and applies only if ...located: in Level] The level where the destination point is located.
Type of value: Level
Local variable: T agent - the current agent (material item)
Network [dynamic]
[Visible and applies only if ...located: in Network] The network where the destination point is located.
Type of value: Network
Local variable: T agent - the current agent (material item)
Use operation time
If this option is selected, you can directly specify the time it takes the crane to reach the agent (material item). Speed values will be recalculated for every agent to satisfy operation time.
Syntax: boolean useOperationTime
Operation time [dynamic]
[Visible and applies only if Use operation time option is selected] The amount of time provided to the crane to transport the agent. The value is evaluated for every agent after On at enter action is executed.
Type of value: double
Local variable: T agent - the current agent (material item)
Agent selection pattern
Defines how the crane selects agents for transportation: based either on FIFO pattern (default setting) or on Custom pattern specified by expression you have to enter in the Custom pattern parameter.
Syntax: boolean customPriority
Set new value at runtime: set_customPriority(new value)
Valid values:
true - Custom
false - FIFO
Custom pattern [dynamic]
[Visible and applies only if Custom option is selected] Defines the custom pattern for the crane or bridge to select agents. The expression specified here is interpreted by the crane or bridge as the agent's priority. The crane or bridge will serve the agents with the highest priority first.
Type of value: double
Local variable: T agent - the current agent (material item)
Safe height [dynamic]
Specifies the minimum height the crane should raise the agent to in order to transport it (e.g., to avoid obstacles). It is calculated as distance between the hook and the crane's Z coordinate.
Type of value: double
Local variable: Crane crane - the crane
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 agent (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 agent (material item)
On remove [code]
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 current agent (material item)
On seize crane [code]
Here you can type Java code that will be executed when the agent (material item) seizes the crane.
Local variables:
T agent - the current agent (material item)
Crane crane - the crane

Functions

boolean contains(Agent agent) - Returns true if this block contains the specified agent. Parameter: agent - the agent (material item)

int size() - Returns the number of agents that are currently inside this block.

T get(int index) - Returns the agent with the specified index. The order of the agents corresponds to the order in which they are picked up by the block.
Parameter: index - the index of the agent

T remove(Agent agent) - Removes the specified agent from the block. If the agent is still in the queue, it is removed both from the queue and the block. If the crane is already moving to the agent, on the function's call the crane will be released and the agent will be removed from the block. The crane will stop.
Parameter: agent - the agent (material item)

Ports

in
The input port.
out
The output port.