MoveByCrane

This block performs transportation of an agent (material item) by a crane.

When describing the crane's operation, the two major parameters are speed and time. The crane operation speed is usually defined by the movement speed of the crane's individual parts, such as jib, hoisting winch and trolley. You can specify these values in the corresponding Crane space markup element and the system will automatically calculate the time it takes the crane to move an agent from one point to another. In case where this level of detail is excessive or the data available to you are incomplete, you can simply select option Use operation time in the block's Properties view and specify the time directly.

You can set the safe height for agent transportation to satisfy the conditions of the environment you are modeling.

The default pattern in which this block selects agents for transportation is based on FIFO rule (first-in, first-out). You can customize the selection pattern to fit your simulation requirements.

Crane seize rules

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

Demo model: MoveByCrane

Parameters

Destination is
Defines where the crane will take the agent to. The possible destinations are:
Node - agent is moved to the specified network node
Attractor - agent is moved to the specified attractor
Conveyor - agent is moved to the specified conveyor
Position on conveyor - agent is moved to the specified position on conveyor
(x, y, z) - agent is moved to the point with the specified coordinates
Agent - agent is moved to the specified Agent
Syntax: DestinationType destinationType
Node [dynamic]
[Visible and applies only if Destination is: Node] The network node the crane will move to.
Note that the value is evaluated right after the crane picks up the agent.
Type of value: Node
Local variable: T agent - the agent (material item)
Attractor [dynamic]
[Visible and applies only if Destination is: Attractor] The attractor the crane will move to.
Note that the value is evaluated right after the crane picks up the agent.
Type of value: Attractor
Local variable: T agent - the agent (material item)
Conveyor [dynamic]
[Visible and applies only if Destination is: Conveyor] The conveyor the crane will move to.
Note that the value is evaluated right after the crane picks up the agent.
Type of value: ConveyorPath
Local variable: T agent - the 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 the crane will move to: either from the beginning of the conveyor, or from the end of the conveyor.
Note that the value is evaluated right after the crane picks up the agent.
Type of value: boolean
Local variable: T agent - the agent (material item)
Offset [dynamic]
[Visible and applies only if Destination 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 crane.
Note that the value is evaluated right after the crane picks up the agent.
Type of value: double
Local variable: T agent - the agent (material item)
Position on conveyor [dynamic]
[Visible and applies only if Destination is: Position on conveyor] The position on conveyor the crane will move to.
Note that the value is evaluated right after the crane picks up the agent.
Type of value: PositionOnConveyor
Local variable: T agent - the agent
Change orientation [dynamic]
[Visible and applies only if Destination is: Position on conveyor] 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 agent
Orientation [dynamic]
[Visible and applies only if Destination is: Position on conveyor] If you need to rotate the material item when it is placed on the conveyor, here you can choose 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 agent
X, Y, Z [dynamic]
[Visible and applies only if Destination is: (x, y, z)] X, Y, Z coordinate of the point the crane will move to.
Note that the value is evaluated right after the crane picks up the agent.
Type of value: double
Local variable: T agent - the agent (material item)
... located in [dynamic]
[Visible and applies only if Destination is: (x, y, z)] Specifies where the agent (material item) will be added to when the crane drops it: either Level or Network.
Type of value: boolean destinationInNetwork
Default value: false
Level [dynamic]
[Visible and applies only if ...located: in Level] The level the agent will be added to once the crane drops it.
Type of value: Level
Local variables: T agent - the agent
Agent unit - the crane
Network [dynamic]
[Visible and applies only if ...located: in Network] The network the agent will be added to once the crane drops it.
Type of value: INetwork
Local variables: T agent - the agent Agent unit - the crane
Agent [dynamic]
[Visible and applies only if Destination is: Agent] The agent the crane will move to.
Note that the value is evaluated right after the crane picks up the agent.
Type of value: Agent
Local variable: T agent - the 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).
Type of value: double
Local variable: T agent - the 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) and then transport it from one point to another. 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 set] The amount of time provided to the crane to transport the agent. Depending on how the crane is seized and released, the total operation time is calculated differently:
- the crane is seized and released by the MoveByCrane block - total operation time includes Loading time, movement time, and Unloading time
- the crane is seized by the SeizeCrane block - operation time doesn't include the Loading time
- the crane is released by the ReleaseCrane - operation time doesn't include the Unloading time
The value is evaluated for every agent after On at enter action is executed and is remembered until the agent is released.
Type of value: double
Local variable: T agent - the agent (material item)
Seize crane
Seize crane
[Enabled by default] Allows this block to seize a crane or a bridge from a multibridge crane. A crane or a bridge must be seized to move the agent. Make sure that either this option is selected or use a properly configured SeizeCrane block in your flowchart placed before this MoveByCrane block.
Syntax: boolean seizeCrane
Crane [dynamic]
The crane or the bridge that moves the agent (material item).
Type of value: Crane
Local variable: Agent agent - the agent (material item)
Loading time [dynamic]
Specifies the amount of time the crane or the bridge will spend to pick up the agent (material item).
Note that the value is evaluated right before the crane or the bridge picks up the agent.
Type of value: double
Local variable: T agent - the 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
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 to select agents.
Type of value: int
Local variable: T agent - the agent (material item)
Release crane
Release crane
[Enabled by default] Allows this block to release the previously seized crane or bridge. A crane or a bridge could have been seized either by this block or by the SeizeCrane block.
Syntax: boolean seizeCrane
Unloading time [dynamic]
Specifies the amount of time the crane or the bridge will spend to drop off the agent (material item).
Note that the value is evaluated right before the crane or the bridge drops off the agent.
Type of value: double
Local variable: T agent - the agent (material item)
After release, hook
Here you can specify the behaviour of the lifting device after the crane or the bridge has released the material item: either the lifting device Stays where it is or Returns to initial position if no other tasks. For jib cranes, the initial position of the hook will be calculated according to the values specified in the Initial jib angle and Trolley position parameters of the crane's properties. For overhead cranes, it will depend on the value specified in the Bridge parking position parameter of the bridge's properties and Trolley position parameter of the crane's properties.
Type of value: MoveByCrane.CraneReleaseMovingPolicy
Local variable: Crane crane - the crane
Actions
On at enter [code]
Here you can type Java code that will be executed when the agent (material item) decides that it will most likely go through the block.
Local variable: T agent - the agent (material item)
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 agent (material item)
On at exit [code]
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 [code]
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 cancel [code]
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)
On remove [code]
Here you can type Java code that will be executed when the agent (material item) is removed from a crane.
Local variable: T agent - the agent (material item)
On crane seize [code]
[Visible and applies only if Seize crane option is enabled]. Here you can type Java code that will be executed when the agent (material item) seizes the crane or the bridge.
Local variables:
T agent - the agent (material item)
Crane crane - the crane
On crane release [code]
[Visible and applies only if Release crane option is enabled]. Here you can type Java code that will be executed when the agent (material item) releases the crane or the bridge.
Local variables:
T agent - the agent (material item)
Crane crane - the crane

Functions

int size() - Returns the number of agents that are currently transported by this crane.

T remove(Agent agent) - Removes the given agent from the crane it is transported by.

T get(int index) - Returns the agent by its index number. The order of the agents corresponds to the order in which they are picked up by the crane.

boolean contains(Agent agent) - Returns true if the block contains the given agent.

void cancel(T agent) - Causes the specified agent to immediately leave the block via ccl port. On cancel code section is executed for the 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 cancel() function).