Custom station is the space markup element used in material handling models. It defines a station / working zone where material items are processed. The process is not set up in this element, you should define it on your own (Process Modeling Library and Material Handling Library blocks).
If the processing can be defined simply as a delay for the specified time, use the Station element instead.
Custom station is a part of a conveyor network. Custom station can act as a transit point in a conveyor network, any number of conveyors can lead to/from the custom station. It can also be a destination for material items transportation defined by the Convey block.
Custom station is drawn as a polygonal area. The shape and size of the area does not have any logical meaning.
Demo model: Custom Station
To add a custom station
Name – The name of the custom station. The name is used to identify and access the custom station from code and Material Handling Library blocks.
Ignore – If selected, the custom station is excluded from the model.
Visible on upper agent – If selected, the custom station is also visible on the upper agent where this agent lives.
Lock – If selected, the custom station 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.
Agent location
– Here you can choose where agents (material items) should be placed
while being inside the custom station. The options are:
Near conveyor
- item(s) will be placed near the conveyor they were transported by to this custom station.
Center
- item(s) will be placed in the center point of this custom station.
Random
- item(s) will be placed in random points inside the station area.
On enter – Here you can type Java code that will be executed when the agent (material item) enters the custom station. In the action code, the current material item is accessible as the local variable agent.
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.
X – X-coordinate of the custom station's starting point.
Y – Y-coordinate of the custom station's starting point.
Z – Z-coordinate of the custom station's starting point.
The table located in the Points property section enables users to view and adjust coordinates of the area points.
Here
you define relative coordinates, not the absolute ones. The first point
always has coordinates (0,0) that can not be changed.
Other rows of
the table define relative coordinates of the successive points.
Coordinates of each point are actually offsets of the corresponding
point from the start point along X and Y axes correspondingly. The
z-coordinates of each point are equal to the z-coordinate to the custom
station's starting point (specified in the Z
parameter).
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.
Function |
Description |
double getX() |
Returns the X coordinate of the custom station's start point. |
double getY() |
Returns the Y coordinate of the custom station's start point. |
double getZ() |
Returns the Z coordinate of the custom station's start point. |
void setXYZ |
Sets new coordinates for the custom station's start point.
Parameters: |
Point getCenter() |
Returns the point of the shape's center. |
Function |
Description |
Level getLevel() |
Returns the
level
where this station is located. |
Function |
Description |
boolean isVisible() |
Returns true if the custom station is visible; returns false otherwise. |
void setVisible(boolean v) |
Sets the visibility of the custom station.
Parameter: |
Function |
Description |
Color getFillColor() |
Returns the fill color of the custom station, or null if the custom station has no fill color or has textured fill (in this case use getFillTexture() to get the custom station's texture). |
Texture getFillTexture() |
Returns the fill texture of the custom station or null if the custom station has no fill texture or has color fill (in this case use getFillColor() to get the custom station's fill color). |
void setFillColor |
Sets the fill
color
(or
Texture) of the custom station.
|
Function |
Description |
Color getLineColor() |
Returns the color of the custom station's outline, or null if custom station has no outline color or has textured outline (in this case use getLineTexture() to get the outline's texture). |
Texture getLineTexture() |
Returns the outline texture of the custom station or null if custom station has no outline texture or has colored outline (in this case use getLineColor() to get the outline's color). |
void setLineColor(Paint lineColor) |
Sets the outline color (or
Texture).
|
Function |
Description |
ConveyorNetwork getNetwork() |
Returns the conveyor network this markup element belongs to or null if this element is not a part of a network. |
int getConnectionsCount() |
Returns the number of conveyors connected to the custom station. |
ConveyorPath getConnection(int index) |
Returns the conveyor with the provided index from this node's connections list.
Parameter: |
List<ConveyorPath> getConnections() |
Returns the list of all conveyors connected to this custom station. |
List<ConveyorPath> getIncomingPaths() |
Returns the list of all incoming conveyors connected to this custom station. |
List<ConveyorPath> getOutgoingPaths() |
Returns the list of all outgoing conveyors connected to this custom station. |
Function |
Description |
boolean contains |
Returns
true
if the custom station shape contains the point with the given coordinates; returns
false
otherwise. |
Point randomPointInside() |
Returns the randomly chosen point inside the area; utilises the default random number generator (the one of the agent containing this shape). |
Point randomPointInside(Point out) |
Returns the randomly chosen point inside the area; utilises the default random number generator (the one of the agent containing this shape).
Parameter: |
Point randomPointInside(Random rng) |
Returns the randomly chosen point inside the area; utilises the given Random Number Generator.
Parameters: |
Point randomPointInside |
Returns the randomly chosen point inside the area; utilises the given Random Number Generator.
Parameters: |
double getNearestPoint (Point givenPoint, Point out) |
Calculates the point in this custom station nearest to the given point and writes the result into the the out object. Returns the square of distance to the point (in the XY-projection). All calculations are performed in the horizontal projection (z-coordinates are not used, as if all of the Z coordinates were zero).
Parameters: |
Function |
Description |
void remove() |
Removes
the custom station from the presentation. If the custom station is not
a part of presentation, the function does nothing. |