Position on conveyor is the graphical element that is used to define the exact position on the conveyor.
It can be used to:
Note: Both blocks place the leading edge of the added material item at the Position on conveyor location.
To define the position on conveyor
A position on conveyor can be drawn only if the conveyor has been previously drawn.
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.
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.
Offset from conveyor start – Offset of this element from the start point of the conveyor, measured in pixels.
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.
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. |
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. Parameter: 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 hasn't reached the position yet. If the agent have been removed
successfully, the function returns the agent, otherwise, it returns
null. |
Function |
Description |
double getOffset |
Returns the offset of this element from the start point of the conveyor, measured in given length units. Parameter: 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. |
Function |
Description |
boolean isVisible() |
Returns true if the element is visible; returns false otherwise. |
void setVisible(boolean v) |
Sets the visibility of the element. Parameter: v - visibility. If v is true - the element is set to be visible, if it is false - not visible. |
Function |
Description |
ConveyorPath getConveyor() |
Returns the conveyor where this element is located. |
ConveyorNetwork getNetwork() |
Returns the conveyor network this element belongs to. |
Function |
Description |
void remove() |
Removes this 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. |