AnyLogic
Expand
Font size

Conveyor spur

Conveyor spur is the space markup element that is used to define a junction between a branch conveyor and the main conveyor. Agents (material items) passing through it keep their current orientation on conveyor.

Unlike such elements as Turntable or Turn station, conveyor spur does not divide the main conveyor into two independent conveyors. One conveyor spur can only connect a single conveyor to the main conveyor.

The transfer of material items from the branch conveyor onto the main conveyor is automatically calculated so that it does not affect the normal operation of the main conveyor. If necessary, the material items on the branch conveyor will be delayed until the flows of both conveyors can be safely merged. The merge is executed at the maximum speed of the main conveyor.

If two branch conveyors with incoming flows are connected to the left and to the right side of the main conveyor at roughly the same offset via a conveyor spur element, AnyLogic will compare Priority values specified for both conveyors and the agents (material items) incoming from the conveyor with the higher Priority value will get preference. If the items with higher priority are coming in a queue, i.e. with minimum safety gap, the whole queue will get priority until the first item in a queue that does not need to pass through this spur or has lower priority.

If the Priority values of the branch conveyors are equal, the "first come, first served" policy is applied to the items.

Demo model: Conveyor Singulator Open the model page in AnyLogic Cloud. There you can run the model or download it (by clicking Model source files).

To draw a conveyor spur

The conveyor spur can be drawn in either of the following ways:

  1. Drag the  Conveyor Spur element from the Space Markup section of the  Material Handling Library palette to the side of the main conveyor.
  2. Connect two conveyors at any desired angle. The conveyor spur will be automatically created at the junction point.

Properties

General

Name — The name of the conveyor spur. The name is used to identify and access the element from code.

Ignore — If selected, the element is excluded from the model.

Visible on upper agent — If selected, the element is visible on the upper agent where this agent lives.

Lock — If selected, the element’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.

Appearance

Fill color — Shape’s fill color. Choose No color if you do not want the area to be filled.

Line color — Outline color. Choose No color if you do not want outline to be drawn.

Position and size

Offset from conveyor start — The distance from the starting point of the main conveyor to the center point of conveyor spur element.

Connecting conveyors located on different levels

If your conveyor branch and the main conveyor belong to different agents, you can connect them via conveyor spur and network port while maintaining the main conveyor’s integrity.

To connect conveyors from different levels

  1. Drag the  Conveyor Spur element from the Space Markup section of the  Material Handling Library palette to the agent diagram and place it close to the shape of the main conveyor where you want to create a connection.
  2. Open the graphical diagram of the agent where your branch conveyor is located.
  3. Add a network port to the end point of the branch conveyor where it will join the main conveyor.
  4. In the port’s Properties view, switch the Pair with parameter to dynamic value editor and type in the corresponding <agent name>.<conveyor spur name>.
  5. Drag the agent to the graphical diagram where the main conveyor is drawn. Adjust the placement of the branch conveyor presentation so that the network port and the conveyor spur overlap.

Functions

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

Conveyor
Function Description
ConveyorPath getConveyor() Returns the main conveyor this element is attached to.
void setConveyor(ConveyorPath conveyor) Specifies the main conveyor this element is attached to.

conveyor — a new conveyor.
Position
Function Description
double getOffset(LengthUnits units) Returns the distance from the starting point of the main conveyor to the center of the conveyor spur element (in the specified length units).

units — one of the length unit constants.
void setOffset(double offset, LengthUnits units) Sets the distance from the starting point of the main conveyor to the center of the conveyor spur element (in the specified length units).

offset — a new distance value.
units — one of the length unit constants.
boolean isOnRightSide() Returns true if the conveyor spur is situated on the right-hand side of the main conveyor. Otherwise returns false.
void setOnRightSide(boolean isOnRightSide) Sets the conveyor spur element on the given side of the main conveyor.

isOnRightSide — if true is passed, conveyor spur will be placed on the right-hand side of the magistral conveyor. To place it on the left-hand side, pass false.
Point getXYZ() Returns the coordinates of the conveyor spur element (conveyor spur is considered a single point).
Paired port
Function Description
NetworkPort getPairedPort() Returns the paired port for this conveyor spur.
void setPairedPort(NetworkPort pairedPort) Sets the paired port for this conveyor spur.

pairedPort — a network port from another network.
Visibility
Function Description
boolean isVisible() Returns true if the conveyor spur is visible; returns false otherwise.
void setVisible(boolean v) Sets the visibility of the conveyor spur.

v — visibility. If v is true — the turn station is set to be visible, if it is false — not visible.
Color / Texture
Function Description
Color getLineColor() Returns the line color of the shape, or null if the shape has no color or uses a texture (in this case use getLineTexture() to get the shape’s texture).
Texture getLineTexture() Returns the line texture of the shape or null if the shape has no texture but uses a color (in this case use getLineColor() to get the shape’s color).
void setLineColor(Color lineColor) Sets the line color of the shape.

lineColor — the new color.
void setLineColor(Paint lineColor) Sets the line color (or texture) of the shape.

lineColor — the new texture.
Color getFillColor() Returns the fill color of the shape, or null if shape has no fill color or has textured fill (in this case getFillTexture() should be used instead).
Texture getFillTexture() Returns the fill texture of the shape, if the shape has fill texture, or null if the shape has no texture but uses a color (in this case use getFillColor() to get the shape’s color).
void setFillColor(Color fillColor) Sets the fill color of the shape.

fillColor — the new fill color, if null, the shape is not filled.
void setFillColor(Paint fillColor) Sets the fill color (or Texture) of the shape.

fillColor — the new fill color, if null, the shape is not filled.
Level
Function Description
Level getLevel() Returns the level, where this element is located.
Removal
Function Description
void remove() Removes the conveyor spur element from the presentation. If the element is not a part of presentation, the function does nothing.
Note that 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?