Conveyors that can change their movement directions on request have many applications in modeling. Here are just a few:
- stations located off the main conveyor network, where branch conveyors can ferry the items between these stations and main production flow
- buffer conveyors that accumulate items off the main conveyors and then put them back into the main production flow
Reversible conveyors are an integral part of the conveyor network. You can include them into routes defined in the Convey block just like common one-direction conveyors.
How to make a conveyor reversible
- Select the conveyor that you want to make reversible.
- In the properties of this conveyor select the Reversible check-box.
Reversible conveyors are marked with two arrows and a dot between them. In the graphical editor the highlighted arrow and the dot indicate the conveyor's initial direction. During model runtime the arrow that indicates the conveyor's current direction will be highlighted instead.
Demo model: Reversible Conveyors Open the model page in AnyLogic Cloud. There you can run the model or download it (by clicking Model source files).Let's take a closer look at what exactly happens when you tell the conveyor to change direction by calling either setDirection() or changeDirection().
- If deceleration speed is over 0, the conveyor begins gradual deceleration until its speed of movement reaches 0. If deceleration speed is 0, the conveyor stops at once.
- The conveyor's direction changes. The leading edge of every agent (material item) on the conveyor becomes is trailing edge.
- On direction changed action code is executed.
- AnyLogic cancels the movement tasks of the agents (material items) on this conveyor. The agents leave the corresponding Convey block via the outRedirect port. Here are just a few examples of where these agents can go:
- another Convey block with a new destination
- the same Convey block where the route is recalculated
- ConveyorExit block which takes the agents off the conveyor for further processing elsewhere
- If acceleration speed of the conveyor is over 0, the conveyor begins gradual acceleration in the new direction until it reaches its maximum speed. If the acceleration speed is 0, the conveyor reaches the maximum movement speed at once.
When agent (material item) enters the Convey block, it is placed on the specified conveyor. The placement depends on the conveyor’s direction.
Let's say the block places the agent on the conveyor which initially moves from left to right. The placement of the agent’s leading edge remains the same, while the trailing edge is located:
- to the left of the leading edge — if the conveyor moves in its initial direction
- to the right of the leading edge — if the movement is reversed
Let’s suppose that the item’s leading edge offset from the beginning of conveyor is 10 meters. The item itself is 2 meters long. It means the trailing edge offset is 10 - 2 = 8 meters. After direction reversal, the trailing edge offset will be 10 + 2 = 12 meters.
The orientation (FRONT or REAR) of the material item changes to the opposite one when conveyor changes direction.
If the direction of the conveyor where the agent (material item) must be placed is opposite to the agent's route, the agent waits in the previous block until the conveyor changes direction to acceptable. When the direction changes, the agent enters Convey.
As of now, Convey blocks can use reversible conveyors only in the automatic routing mode. Using reversible conveyors in the Sequence of conveyors routing mode is not supported.
Reversible conveyors in the network may affect the agent’s route. Let’s take a look at possible scenarios.
The route doesn't include the reversible conveyor explicitly |
|
The reversible conveyor is specified in the Include conveyors property of the Convey block |
|
The source conveyor is reversible |
|
The target conveyor is reversible |
|
When agent has to wait until the direction of the reversible conveyor changes to fit the agent's route, the waiting location depends on two aspects:
- which element connects the conveyors
- location of the agent at the moment of the direction reversal
- if agent is located on another conveyor, it will wait before the connecting element
- if the agent is located on the connecting element, it will wait on the element's inner conveyor
- if agent is located on another conveyor, it will wait before the connecting element
-
if the agent is located on the connecting element, it means it is already on the reversible conveyor and will be handled accordingly
When conveyor changes direction while the agent (material item) is located on the conveyor point node between a reversible conveyor and a one-direction conveyor, the agent changes its orientation to the opposite one. It means that the agent's leading edge becomes its trailing edge, and this leading edge is now on the conveyor whose direction is opposite to the agent's route. In this case an error message will appear.
The same error message will appear if the agent is long enough that its leading edge and trailing edge are located on conveyors that start moving in opposite directions.
- if agent is at the branch conveyor, it will wait at the branch conveyor before the spur element
- if the agent is at the main conveyor, it will wait at the main conveyor at the point where this conveyor connects to the spur element
- if the agent is at the spur element, an error message will appear
- Changing movement direction
-
Function Description void changeDirection() Changes the current direction of conveyor. If at the moment of the function call the conveyor was decelerating to change the direction, the previous command to change the direction gets cancelled and the conveyor starts accelerating according to the current function call. ConveyorDirection getDirection() Returns the current conveyor direction: either CONVEYOR_FORWARD or CONVEYOR_BACKWARD. If at the moment of the function call the conveyor is decelerating to change the direction, still returns its current direction. In case of a non-reversible conveyor, returns CONVEYOR_FORWARD. void setDirection(ConveyorDirection direction) Defines the direction of conveyor movement by passing one of the following constants as the value of direction argument: CONVEYOR_FORWARD — items move from the starting point of the conveyor to its end point
If the value of direction argument corresponds to the conveyor’s current direction, there are two possible behaviors after the function call:
CONVEYOR_BACKWARD — items move from the end point of the conveyor to its starting point- if the conveyor was not decelerating to reverse its direction, nothing happens and the function is ignored
- if the conveyor was decelerating to reverse its direction, then the previous command to reverse direction gets cancelled and the conveyor starts to accelerate in the given direction
boolean isChangingDirection() Returns true if the conveyor is decelerating to reverse the direction. Otherwise, returns false. Also returns false for non-reversible conveyors.
The following simple model demonstrates how the reversible conveyor feature can be used to create accumulation buffers within a conveyor network:
Demo model: Reversible Conveyor Buffer Open the model page in AnyLogic Cloud. There you can run the model or download it (by clicking Model source files).The following model demonstrates how to build custom logic to control an item flow at an intersection with a reversible conveyor:
Demo model: Item Flow Control on a Reversible Conveyor Spur Open the model page in AnyLogic Cloud. There you can run the model or download it (by clicking Model source files).-
How can we improve this article?
-