AnyLogic
Expand
Font size

Position on conveyor

Position on conveyor is the graphical element that is used to define the exact position on the conveyor.

It can be used to:

  • Define the location where new material items will be placed on the conveyor (by the Convey and ConveyorEnter blocks).
    Both blocks place the leading edge of the added material item at the Position on conveyor location.
  • Set the destination point for the material items being transported by conveyor(s) (in the Convey block).
  • Simulate photo eyes, scanners, and other devices that perform some instant actions with the conveyed material items. To model the operation, use the callbacks actions in the element’s Actions properties section. If the operation requires some time, use station instead.
  • Model different types of stops and escapement devices (e.g. blade stop, claw stop, pneumatic escapements). You can simulate the conveyor blocking and unblocking operations by calling the element’s block() and unblock() functions.

To define the position on conveyor

A position on conveyor can be drawn only if the conveyor has been previously drawn.

  1. Drag the  Position on Conveyor element from the Space Markup section of the  Material Handling Library palette to the agent diagram.
  2. When moving the mouse over the agent diagram, you will see that only conveyors are shown, other shapes and elements are temporarily hidden.
  3. Place the mouse over the conveyor just where you want to place it and release the mouse button. The element will be placed on the conveyor.
  4. You can change its location on the conveyor by dragging the element with the mouse.

Properties

General

Name — The name of this position on conveyor. The name is used to identify and access this element from code and flowchart blocks properties.

Ignore — If selected, the position on conveyor is excluded from the model.

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

Lock — If selected, the position on conveyor is locked. Locked shapes do not react to mouse clicks — it is impossible to select them in the graphical editor until you unlock them.

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 processed at this position on conveyor. This type is automatically taken from the conveyor this position on conveyor is located on. Do not change the material item type since the conveyor expects items of the same type after the position on conveyor.

Initially blocked — Toggles the state of the position on conveyor element. If selected, the position on conveyor will be blocking the flow of material items on the current conveyor once the model is launched.

Actions

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

On leading edge enter — Here you can type Java code that will be executed when the leading edge of the material item reaches the position on the conveyor.

On trailing edge exit — Here you can type Java code that will be executed when the trailing edge of the material item leaves the position on the conveyor.

On cell enter — Here you can type Java code that will be executed when the leading edge of the cell reaches the position on the conveyor.

On cell exit — Here you can type Java code that will be executed when the trailing edge of the cell leaves the position on the conveyor.

Position and size

Offset from conveyor start — Offset of this element from the start point of the conveyor, measured in pixels.

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 name is displayed on the graphical diagram.

Functions

Control
Function Description
boolean isBlocked() Returns true if this Position on conveyor element is currently set to block the conveyor movement., returns false otherwise.
void block() Blocks the conveyor movement. If some material item is currently passing this Position on conveyor element, the conveyor will be blocked when this item completely passes through the element.
void unblock() Unblocks the conveyor movement.
Agent (material item)
Function Description
boolean contains(Agent agent) Returns true if the given agent (material item) is currently located at the position on conveyor, returns false otherwise.

agent — the agent (material item) to be checked for being at the Position on conveyor location.
T getAgent() Returns the agent (material item) that is currently located at the position on conveyor, returns null if none.
T removeAgent() Removes the agent which is currently located at this position on conveyor. The agent’s leading edge must have reached or already passed the position and its trailing edge has not reached the position yet. If the agent have been removed successfully, the function returns the agent, otherwise, it returns null.
Offset
Function Description
double getOffset(LengthUnits units) Returns the offset of this element from the start point of the conveyor, measured in given length units.

units — a constant defining the length units
double getOffset() Returns the offset of this element from the start point of the conveyor, measured in pixels.
Visibility
Function Description
boolean isVisible() Returns true if the element is visible; returns false otherwise.
void setVisible(boolean v) Sets the visibility of the element.

v — visibility. If v is true — the element is set to be visible, if it is false — not visible.
Conveyor
Function Description
ConveyorPath getConveyor() Returns the conveyor where this element is located.
ConveyorNetwork getNetwork() Returns the conveyor network this element belongs to.
Level
Function Description
Level getLevel() Returns the level, where this element is located.
Removal
Function Description
void remove() Removes this element from the presentation. If the element 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?