AnyLogic
Expand
Font size

Jib crane

Jib crane in graphical editor Jib crane at model runtime in 3D animation

Jib crane is the space markup element that graphically defines a tower crane. You can use Material Handling Library block MoveByCrane to simulate how the crane transports agents (material items) between two points of simulated environment.

Jib crane has two different modes of operation depending on how its components move in relation to each other.

The maximum height an agent (material item) can reach when raised by jib crane equals the height of the crane itself.

Jib crane can serve as an obstacle on the way of pedestrians and transporters moving in free space navigation mode.

Jib crane element provides users with a set of actions, which are used to define additional agent behavior.

To draw a crane

  1. Drag the  Jib Crane element from the Material Handling section of the  Space Markup palette into the graphical editor. You will see the circle shape with the single horizontal shape of crane’s jib.

  2. Crane can pick up or drop off material items directly from or to a path, a conveyor, and a railway track. In this case you should connect the crane to the corresponding space markup element by placing it close enough so that the crane shape is highlighted in green (it means the connection has been established).

  3. After crane has been successfully connected, the crane shape will be filled with color as displayed in the image below.

  4. You can adjust the initial angle of the jib and its length.
  5. You can set up a sector in the crane’s rotational periphery where the jib cannot move. To enable this feature for the crane, select Has blocked zone option in Properties view. Blocked zone can be adjusted from the graphical editor.

  6. The default placement of the crane’s blocked zone is always as displayed in the image above. If you place the jib in this area before enabling the blocked zone, the movement of the crane during the model run will be impossible and an error will occur.
  7. To customize the crane’s appearance, select the type of crane in Properties view: either Industrial jib crane, Cat-head tower crane or Flat-top tower crane. You can change Crane color in Properties view for all the types and Cabin color for the last two.

Properties

General

Name — The name of the jib crane. The name is used to identify and access the crane from code and Material Handling Library blocks.

Ignore — If selected, the jib crane is excluded from the model.

Visible on upper agent — If selected, the jib crane is also visible on the upper agent where this agent lives.

Lock — If selected, the crane’s shape is locked. Locked shapes do not react to mouse clicks — it is impossible to select them in the graphical editor until you unlock them. It is frequently needed when you want to prevent editing this shape while drawing other shapes over it.

Visible — Here you specify whether the shape is visible on animation at model runtime, or not. Using the control, choose yes or no.

Material item type — The type of the material item that is transported by this jib crane.

Is obstacle — If selected, this jib crane will be considered an obstacle for pedestrians and transporters moving in free space mode.

Component movement mode — Here you can choose how the crane’s jib, trolley, and hook should move in relation to each other. The options are:

  • Step-by-step — the components will move one at a time. This mode satisfies the safety conditions of operating a crane.
  • Concurrent — the movement of all components will be executed at the same time. This mode is considerably faster than Step-by-step mode, but not as safe.

Trolley speed — Here you can specify the crane’s trolley moving speed. The property is dynamic, therefore you can set up the speed change on runtime depending on whether the crane is loaded or not. Using the local isLoaded variable of boolean type, you can, for example, set up the speed change with the conditional operator: isLoaded ? agent.mySpeed : 1. When the crane is unloaded, the agent variable is null. If you haven’t specified any particular speed value for the unloaded crane, the trolley will move with the default speed of 0.5 meters per second.

Lifting speed — Here you can define the hoist lifting speed. The property is dynamic, therefore you can set up the speed change on runtime depending on whether the crane is loaded or not. Using the local isLoaded variable of boolean type, you can, for example, set up the speed change with the conditional operator: isLoaded ? agent.mySpeed : 1. When the crane is unloaded, the agent variable is null. If you haven’t specified any particular speed value for the unloaded crane, the hoist will move with the default speed of 0.1 meters per second.

Jib rotation speed — Here you can define the rotation speed of the crane’s jib. The property is dynamic, therefore you can set up the speed change on runtime depending on whether the crane is loaded or not. Using the local isLoaded variable of boolean type, you can, for example, set up the speed change with the conditional operator: isLoaded ? agent.mySpeed : 1. When the crane is unloaded, the agent variable is null. If you haven’t specified any particular speed value for the unloaded crane, the jib will rotate with the default speed of 0.5 rotations per minute.

Actions

In all the actions, the current material item is accessible as the local variable agent.

On failed — Here you can type Java code that will be executed in case of jib crane failure.

On repaired — Here you can type Java code that will be executed when the jib crane is repaired.

On loading — Here you can type Java code that will be executed directly after the jib crane takes hold of the material item.

On unloading — Here you can type Java code that will be executed directly after the jib crane releases the material item.

Appearance

Type — Here you can choose the type of crane: either Industrial jib crane, Cat-head tower crane or Flat-top tower crane.

Industrial jib crane    Cat-head tower crane    Flat-top tower crane

You only change the visual appearance of your crane: your choice doesn’t affect the logic of its operation.

Cabin color — [Visible if Style option is set to either Cat-head tower crane or Flat-top tower crane] Crane cabin’s fill color. Choose No color, if you do not want the area to be filled.

Crane color — Crane shape’s color. Choose No color, if you do not want the area to be filled.

Position and size

Level — Level to which this element belongs.

X — X-coordinate of the point where the crane is located.

Y — Y-coordinate of the point where the crane is located.

Z — Z-coordinate of the point where the crane is located.

Jib length — Here you can specify the crane’s jib length.

Crane height — Here you can specify the height of the jib crane itself.

Initial jib angle — Here you can specify the initial angle of the crane’s jib in either positive or negative degrees or radians. A graphical tip located to the right of the control element displays the specified angle.

Trolley position — Here you can specify the initial position of the crane’s trolley.

Has blocked zone — If selected, this option allows you to define a sector in the crane’s rotational periphery where the jib will not be able to enter.

Zone start angle — [Visible if Has blocked zone is selected] Here you can specify the angle where the blocked zone will start. A graphical tip located to the right of the control element displays the specified angle.

Zone angle, ° — [Visible if Has blocked zone is selected] Here you will specify the sector of the blocked zone itself. It will be calculated starting from.

Advanced

Show in — Here you can choose whether you want the shape to be shown both in 2D and 3D animation, or in 2D only, or in 3D only.

Show name — If selected, the shape’s name is displayed on the graphical diagram.

To adjust the initial angle of the jib

  1. Drag the handle located at the end on the jib’s shape either clockwise or counter-clockwise to specify the initial angle of the jib. To prevent changing the current length of the jib in the process, press and hold the Shift key while dragging the handle.

  2. As you move the handle, the actual jib angle will be displayed in the AnyLogic status bar.

To adjust the length of the jib

  1. Drag the handle along the jib’s shape to change the length of the jib. To prevent changing the initial angle of the jib in the process, press and hold the Ctrl key while dragging the handle.

  2. As you move the handle, the actual jib length will be displayed in the AnyLogic status bar.

To adjust the crane’s blocked zone

  1. To enable the crane’s blocked zone, select Has blocked zone option in the crane’s Properties view. In the graphic editor it will be displayed as a blue-colored sector of the crane’s circle shape. The sector will have two handles for adjustment.
  2. Drag the blue handle either clockwise or counter-clockwise to specify where the angle where the blocked zone of the crane should start.

  3. To prevent changing current size of the blocked zone, press and hold Ctrl button while dragging the blue handle.
  4. Drag the white handle to adjust the size of the blocked zone.

  5. If you want to increase or decrease the blocked zone by changing both start and end angles in equal measure, press and hold Shift key while dragging either handle.

Functions

You can dynamically modify crane properties at model runtime using the following API.

Working state
Function Description
boolean isReady() Returns true if the crane is ready to operate, otherwise returns false.
boolean isFailed() Returns true if the crane failed (broke down) and is not operating, otherwise returns false.
boolean isLoaded() Returns true, if the crane is currently loaded with an material item. Otherwise, this function returns false.
void fail() Initiates the crane’s failure. The crane stops working.
void repair() Repairs the crane. The crane becomes available again.
Utilization statistics
Function Description
double getUtilization() Returns the crane utilization: the fraction of the time the crane was busy. The returned crane utilization value lies in the range [0..1].
void resetStats() Resets the crane utilization statistics.
Level
Function Description
Level getLevel() Returns the level where this crane is located.
Obstacle
Function Description
boolean isObstacle() Returns true if this crane is considered an obstacle by pedestrians and transporters moving in free space mode. Otherwise, returns false.
void setObstacle(boolean isObstacle) Sets this crane as an obstacle for pedestrians and transporters moving in free space mode.

isObstacle — if true, the crane is set as an obstacle. Otherwise, not.
Movement
Function Description
JibCraneMovementMode getMovementMode() Returns the mode for the movement of the crane’s trolley, jib, and hook in relation to each other.

Valid values:
JIB_CRANE_MOVEMENT_STEP_BY_STEP
JIB_CRANE_MOVEMENT_CONCURRENT
void setMovementMode(JibCraneMovementMode movementMode) Sets the mode for the movement of crane’s trolley, jib, and hook in relation to each other.

movementMode — components movement mode.
Valid values:
JIB_CRANE_MOVEMENT_STEP_BY_STEP
JIB_CRANE_MOVEMENT_CONCURRENT
double trolleySpeed(Agent agent, SpeedUnits units) Returns the speed of the crane’s trolley, which set in the crane’s properties, in the specified speed units.

agent — a material item transferred by the crane.
units — a constant defining the speed units.
double liftingSpeed(Agent agent, SpeedUnits units) Returns the speed of the hoisting winch operation, which is set in the crane’s properties, in the specified speed units.

agent — a material item transferred by the crane.
units — a constant defining the speed units.
double rotationSpeed(Agent agent, RotationSpeedUnits units) Returns the speed of the crane’s jib rotation, which is set in the crane’s properties, in the specified rotation speed units.

agent — a material item transferred by the crane.
units — a constant defining the rotation speed units.
Position getCurrentHookPosition() Returns current hook position in pixels with the crane’s jib angle as Position.rotation.
Position getAbsoluteHookPosition() Returns the current hook position relative to the origin of coordinates of the agent, where the crane is located. The position is returned in pixels with the crane's jib angle as Position.rotation.
Dimensions and components
Function Description
double getCraneHeight(LengthUnits units) Returns the crane’s height in specified units.

units — a constant defining the length units.
void setCraneHeight(double height, LengthUnits units) Sets the crane’s height in specified units.

height — a new height value.
units — a constant defining the length units.
double getJibLength() Returns the crane’s jib length in pixels.
double getJibLength(LengthUnits units) Returns the crane’s jib length in specified units.

units — a constant defining the length units.
void setJibLength(double length, LengthUnits units) Sets the crane’s jib length in specified units.

length — a new length value.
units — a constant defining the length units.
double getInitialJibAngle(AngleUnits units) Returns initial angle of the crane’s jib position.

units — a constant defining the angle units.
void setInitialJibAngle(double angle, AngleUnits units) Sets initial angle of the crane’s jib position.

angle — a new angle value.
units — a constant defining the angle units.
Blocked zone
Function Description
boolean isBlockedZoneEnabled() Returns true if the crane’s blocked zone is enabled, otherwise returns false.
double getBlockedZoneStartAngle() Returns the angle where the crane’s blocked zone starts.
double getBlockedZoneAngle() Returns the delta angle of the crane’s blocked zone.
void setBlockedZoneEnabled(boolean hasBlockedZone) Enables or disables the blocked zone.

hasBlockedZone — blocked zone. If this parameter is true, blocked zone is enabled. If false, blocked zone is disabled.
void setBlockedZoneStartAngle(double angle, AngleUnits units) Sets the angle where the crane’s blocked zone starts.

angle — a new angle value.
units — a constant defining the angle units.
void setBlockedZoneAngle(double angle, AngleUnits units) Sets the delta angle of the crane’s blocked zone.

angle — a new angle value.
units — a constant defining the angle units.
void setBlockedZone(double startAngle, double deltaAngle, AngleUnits units) Enables blocked zone with specified parameters.

startAngle — a start angle of blocked zone value.
deltaAngle — a delta angle of blocked zone value.
units — a constant defining the angle units.
Crane type
Function Description
JibCraneType getType() Returns the type of the crane’s appearance.

Valid values:
JIB_CRANE_INDUSTRIAL
JIB_CRANE_CAT_HEAD
JIB_CRANE_FLAT_TOP
void setType(JibCraneType type) Sets the type of the crane’s appearance.

type — new type of the crane’s appearance.
Valid values:
JIB_CRANE_INDUSTRIAL
JIB_CRANE_CAT_HEAD
JIB_CRANE_FLAT_TOP
Color
Function Description
Color getColor() Returns the color of the crane, or null if the crane has no color.
void setColor(Color color) Sets the color of the crane.

color — the new color/
Color getTrolleyColor() Returns the color of the crane’s cabin, or null if the crane’s cabin has no color.
void setTrolleyColor(Color trolleyColor) Sets the color of the crane’s cabin.

cabinColor — the new color.
Visibility
Function Description
boolean isVisible() Returns true if the crane is visible; returns false otherwise.
void setVisible(boolean v) Sets the visibility of the crane.

v — visibility. If v is true — the crane is set to be visible, if it is false — not visible.
Position
Function Description
double getX() Returns the X coordinate of the center point of the crane.
double getY() Returns the Y coordinate of the center point of the crane.
double getZ() Returns the Z coordinate of the center point of the crane.
Point getXYZ(Point out) Returns the (X, Y, Z) coordinates of the center point of the given crane.

out — the output Point object to write the result to. The object may be null.
Removal
Function Description
void remove() Removes the crane from the presentation. If the crane is not a part of presentation, the function does nothing.
Removal from the presentation does not necessarily mean removing from the model logic, since logical networks and routes may have been created before the removal and survive it.
How can we improve this article?