Station

Use the Station space markup element to draw a simple processing station on a conveyor. The installed station doesn't break the conveyor into two conveyors.

The station can process more than 1 material item at a time.The maximum number of material items it can hold inside simultaneously is defined by the Capacity parameter.

The station has two processing modes:

The time required to process the specified number of material items is defined by the Delay parameter.

Note: Conveyor expects items of the same type after the station.

To draw a station

  1. Drag the Station element from the Space Markup section of the Material Handling Library palette to the agent diagram containing a conveyor. A station can be drawn only if the conveyor has been previously drawn. When moving the mouse over the agent diagram, you will see that all elements but the conveyor are temporarily hidden.
  2. Place the mouse over the conveyor just where you want to place the element. You will see that the station connects to the conveyor. Move your mouse to properly locate the element and release the mouse button when done. You may change its location by dragging it along the conveyor.
  3. You can change the length of the station by dragging the rectangle point located on the element's end with the mouse or by specifying the Length value in the element's properties. The width of the station is automatically adjusted once you change the width of the conveyor.
To adjust position of a station
  1. Click the station you need to edit.
  2. Drag the station to the desired position on the current conveyor (please note that you cannot drag it to the other conveyor). Alternatively, you can change the station position by modifying the Offset from conveyor start parameter in the element's properties.

Properties

General

Name - The name of this station. The name is used to identify and access the element from code and properties of Material Handling Library blocks.

Ignore - If selected, the station is excluded from the model.

Visible on upper agent - If selected, the station is also visible on the upper agent where this agent lives.

Lock - If selected, the station 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 station. This type is automatically taken from the conveyor this station is located on. Do not change the material item type since the conveyor expects items of the same type after the station.

Delay type - The type of item release trigger:
Specified time - the processing ends when the specified time elapses.
Until stopProcess() is called - the user should end the processing and release the agent by calling the function stopProcess(). If the station is in the mode, use the stopProcess(Agent agent) function.

Process time - [Visible if Delay type is set to Specified time] Expression evaluated to obtain the processing time for the agent.
The current material item can be accessed as local variable agent.

Capacity - The maximum number of material items that the station can contain simultaneously.

Processing - Defines the processing mode of material items inside the station:
starts when capacity is full - the station waits until its Capacity is full and processes all material items simultaneously.
starts when agent enters station - the station begins the processing of each material item individually when its leading edge enters the station.

Loading - [Only visible if Processing: starts when capacity is full] Defines the loading mode of new material items to the station:
Simultaneous with unloading - Loading of a material item to the station may be performed simultaneously with the unloading of the processed material item from the station.
Starts when unloading completes - Loading of a new material item will be started when all the processed material items have left the station.

Resources

Note: In the Processing starts when agent enters station mode, the resources are used with the whole station and not with individual agents (material items). Therefore, all dynamic parameters and callbacks with agent and allAgents arguments, which are related to the resources, will be called only for those agents (material items) that activate the station from its idle state.

If the station is already active, i.e. it is processing the material items, such functions will not be called. In this mode the list passed as the allAgents argument will contain only the first agent that enters the station.

Use resources - Defines if the station uses a set of resource units.

Seize - Here you can choose whether the station requires resource(s) of just one single resource type (units of the same pool), or resources of different types (alternative) resource sets).
Please refer to the details below.

Resource sets - [Visible if Seize is set to (alternative) resource sets] Here you define set(s) of resources required to perform the item processing. You can define several alternative resource sets (add new list by clicking the Add list button). The resource set is chosen based on the availability of resource units.
Please refer to the details below.

Resource pool - [Visible if Seize is set to units of the same pool] Here you specify the ResourcePool block defining the resources requested to perform the item processing.
Please refer to the details below.

Number of units - [Visible if Seize is set to units of the same pool] Expression evaluated to obtain the required number of resource units for the agent.

Send seized resources - If selected (true), the seized resources will be sent to the specified location.
The current material item can be accessed as local variable agent.

Destination is - [Visible if Send seized resources is selected]
Defines where the resources will be sent. The resources can be sent to:
Network node - the specified network node.
Attractor
- the specified attractor.
(x, y, z) - the specified coordinates.

Customize resource choice - If the option is selected, you can choose some specific resource units for the operation (using the Resource choice condition below).
Syntax: boolean customizeResourceChoice
Default value: false

Resource choice condition [dynamic] - [Visible if Customize resource choice is selected] Here you can specify boolean expression that will be checked to find the specific resource unit(s) that may perform the operation. If none currently available resource unit(s) satisfy the specified condition (the condition returns false), Station will wait for the first resource unit that matches the condition.
Usually you define some field inside the agent type (say, myAssistant), store there the reference to the resource unit when it starts working with this agent (agent.myAssistant = unit), and then specify here the condition agent.myAssistant == unit enabling only this particular unit to continue working with this particular agent.
Value type: boolean
Default value: true
Local variables: T agent - the material item
Agent unit - the unit
List allAgents - the list of material items

Actions

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

On process started - Here you can type Java code executed when the station starts processing the item.

On process finished - Here you can type Java code executed when the station stops processing the item.

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

On trailing edge enter - Here you can type Java code that will be executed when the trailing edge of the material item reaches the station.

On leading edge exit - Here you can type Java code that will be executed when the leading edge of the material item leaves the station.

On trailing edge exit - Here you can type Java code that will be executed when the trailing edge of the material item leaves the station.

On failed - Here you can type Java code that will be executed in case of station failure.

On repaired - Here you can type Java code that will be executed when the station is repaired.

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 (in pixels) from the starting point of the conveyor to the ending point of the station, in pixels.

Length - Defines the length of the station in the length units that you choose in the drop-down menu to the right of this field. The default length of the station is 4 meters.

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

State

Function

Description

boolean isProcessing()

Returns true if the station is processing agents (material items), returns false otherwise.
boolean isProcessing(Agent agent)

Returns true if the station is processing the given agent (material item), returns false otherwise (or if the station is broken).

Parameter:
agent - material item

 void stopProcess()

Stops the station when called.
void stopProcess(Agent agent)

Stops the station if the given agent (material item) is being processed. This function can only be called when the station is in the Processing starts when agent enters station mode. If the station is in the other processing mode, use the stopProcess() function.

Parameter:
agent - material item

boolean isFailed()

Returns true if the station failed (broke down) and is not operating, returns false otherwise.

boolean fail()

Initiates station failure. The station stops processing.

boolean repair()

Repairs station, makes it available again. Resumes station processing.

Agent (material item)

Function

Description

T getAgent()

Returns the agent (material item) that is currently located in the station, returns null if none.

List<T> getAgents()

Returns the list of agents (material items) that are currently located in the station, returns null if none.

boolean contains(Agent agent)

Returns true if the given agent (material item) is inside the station, returns false otherwise.

boolean removeAgent(Agent agent)

Removes the given agent from the station. The agent will be removed only if it is currently located inside the station.

If the agent was removed successfully, returns true, otherwise returns false.

Parameter: agent - the agent (material item) to be removed from the station.


Resources

Function

Description

boolean isUseResources()

Returns true if the station is using resource units, returns false otherwise.

boolean isSeizeFromOnePool()

Returns true if the station is using resource units of the same pool, returns false otherwise.

Object getResourceDestinationType()

Returns the type of destination the resources are sent to.

Valid values: Seize.DestinationType.DEST_NODE - the node the resources are sent to.
Seize.DestinationType.DEST_ATTRACTOR - the attractor the resources are sent to.
Seize.DestinationType.DEST_XYZ - the coordinates the resources are sent to.


Capacity

Function

Description

int getCapacity()

Returns the maximum number of agents (material items) that may be processed by this station simultaneously.

void setCapacity(int capacity)

Sets the number of agents (material items) that may be be processed by this station simultaneously.

Parameter: capacity - the number of agents (material items).

int size()

Returns the current number of agents (material items) inside the station, returns null if none.

Loading mode

Function

Description

void setLoadingMode
(
ConveyorSimpleStationLoadingMode mode)

Defines the loading mode of new material items to the station

Parameter:
mode
- new loading mode
Valid values:
SIMPLE_STATION_LOADING_MODE_SIMULTANEOUS_WITH_UNLOADING - loading of a material item to the station will be performed simultaneously with the unloading of the processed material item from the station
SIMPLE_STATION_LOADING_MODE_AFTER_UNLOADING - loading of a new material item will be started when all the processed material items have left the station

ConveyorSimpleStationLoadingMode
getLoadingMode()

Returns the loading mode of new material items to the station

Valid values:
SIMPLE_STATION_LOADING_MODE_SIMULTANEOUS_WITH_UNLOADING - loading of a material item to the station will be performed simultaneously with the unloading of the processed material item from the station
SIMPLE_STATION_LOADING_MODE_AFTER_UNLOADING - loading of a new material item will be started when all the processed material items have left the station


Level

Function

Description

Level getLevel()

Returns the level where this station is located.


Conveyor and network

Function

Description

int getConveyor()

Returns the conveyor the station is located on.

double getOffset()

Returns the offset from the conveyor's starting point.

ConveyorNetwork getNetwork()

Returns the network the station belongs to.

Visibility

Function

Description

boolean isVisible()

Returns true if the station is visible; returns false otherwise.

void setVisible(boolean v)

Sets the visibility of the station.

Parameter: v - visibility. If v is true - the station is set to be visible, if it is false - not visible.


Advanced

Function

Description

double length(LengthUnits units)

Returns the length of the station calculated in 3D space.

Parameter: units - one of the length unit constants

ConveyorSimpleStationDelayType getDelayType()

Returns the station's delay type.

Valid values: CONVEYOR_SIMPLE_STATION_DELAY_TYPE_MANUAL - the user ends the processing by calling the Delay function stopProcess().
CONVEYOR_SIMPLE_STATION_DELAY_TYPE_TIMEOUT - the processing ends when the specified time elapses.


Removal

Function

Description

void remove()

Removes the station from the presentation. If the station 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.


Using resources

Processing may involve resource usage - in this case you should check the Use resources checkbox, and specify the resource(s) required to perform the processing.


Related topics

Space markup for material handling models

Conveyor

Material Handling Library

API reference: ConveyorSimpleStation class