AnyLogic
Expand
Font size

RackSystem

This is a legacy block. We recommend using Material Handling Library blocks (Store, Retrieve, Storage System) and library-specific space markup shape Storage to simulate storages.

RackSystem is used to represent a number of storages as a single block with multiple rows and aisles and serves as a central access and management point for them. This makes sense if the storages are used in a similar way.

To create a rack system you first need to define each individual storage graphically with a pallet rack, and specify the rack’s number of positions and levels. The storages do not need to be identical: they can have different capacities and cell sizes; neither do they need to be graphically aligned. Then you should provide the list of storages to the Storages parameter of the RackSystem.

RackSystem exposes exactly the same API as a pallet rack, but the row numbering goes from 0 to the 2 * (number of storages) - 1, so that the storage that is, say, 5th in the list will have row numbers 8 and 9 in the zone. Additionally, the zone has a function cellExists( row, position, level ) to check whether the cell with given coordinates exists in the zone, and getMaxPositions() to obtain the number of positions in the longest storage, which is useful when you iterate over the zone cells.

The actions entered in the zone’’s extension points (like On put, On reserve, etc.) do not override the corresponding actions of individual storages and are executed after them.

It is important that the blocks RackStore and RackPick can work transparently both with a single storage and with the zone.

Parameters

Agent type
The type of the agents that are stored in the rack system.
Default value: Agent
Local variable: T
Pallet racks
The list of pallet racks that should be included in the rack system.
Syntax: PalletRack[] palletRacks

Advanced

Force statistics collection
This block collects statistics. If the statistics collection is turned off for all Process Modeling Library blocks in the model by the PML Settings block, this option enables you to override this setting and collect the statistics for this specific block. Otherwise, the statistics will be collected regardless this setting.
Syntax: boolean forceStatisticsCollection
Default value: false
Draw stored agents
Here you can choose where you want to display agents stored in the storage: Don't draw, use color indication only (fast), At the default position, At the top left corner of the cell, or At the center of the cell. In the first option Don't draw, use color indication only (fast) individual agent animation is hidden, and the cell is filled with the agent color or blend of vertically stored agents’ colors: this allows more informing view on multi-level racks and has much better performance for large-scale warehouses. The agent color may be set by calling agent.setColor() function.
Get value: drawMode
Default value: Don't draw, use color indication only (fast) (RackSystem.DRAW_INDICATION_ONLY)
Valid values:
RackSystem.DRAW_INDICATION_ONLY
RackSystem.DRAW_DEFAULT
RackSystem.DRAW_TOPLEFT
RackSystem.DRAW_CENTER

Actions

On put
Code executed when the agent is put in the rack system (after the corresponding code of the individual storage is executed).
Local variables:
agent — the agent.
int row — the row of the cell.
int position — the position of the cell.
int level — the level of the cell.
On remove
Code executed when the agent is removed from the rack system (after the corresponding code of the individual storage is executed).
Local variables:
T agent — the agent.
int row — the row of the cell.
int position — the position of the cell.
int level — the level of the cell.
On reserve
Code executed when the cell is marked as reserved (after the corresponding code of the individual storage is executed).
Local variables:
T agent — the agent.
int row — the row of the cell.
int position — the position of the cell.
int level — the level of the cell.
On release
Code executed when the cell reservation is dropped (after the corresponding code of the individual storage is executed).
Local variables:
int row — the row of the cell.
int position — the position of the cell.
int level — the level of the cell.

Functions

Finding out the number of cells
Function Description
int nRows() Returns the number of rows in this rack system.
int nLevels(int row) Returns the number of levels in the given row.
int nPositions(int row) Returns the number of positions in the given row. The total number of positions can be calculated by multiplying this number by the number of deep positions and by the number of levels.
int nDeepPositions(int row) [If cells have depth]
Returns the number of deep positions in the given row.
int capacity() Returns the capacity of the rack system, which is the sum of capacities of its individual pallet racks.
int getMaxPositions() Returns the number of positions per row of the longest pallet rack in the rack system.
Cell reservation
Function Description
void reserve(int row, int position, int level, boolean leftAisle) Marks a given cell [row, position, level] as reserved. The cell must be free.
int nReserved(int row, int position, int level) Tests if a given cell [row,position,level] is reserved.
int reserved() Returns the number of reserved cells in the rack system.
void release(int row, int position, int level, boolean leftAisle) Discards a reservation of a given cell [row, position, level]. The cell must be reserved.
boolean cellExists(int row, int position, int level) Tests if a given cell [row, position, level] exists in the rack system (this is useful when different pallet racks in the rack system have different lengths or number of levels).
boolean contains(Agent agent) Tests if the rack system contains a given agent.
T get(int row, int position, int level, int deepPosition) Returns the agent stored at the specified cell [row, position, level], or null if the cell is reserved or free.
PalletRackApproachDirection getApproachDirection(Agent agent, int rowToSearch) Returns the array containing the coordinates of a cell with a given agent [row, position, level], or null if the agent is not stored here.
Putting and picking agents to and from cells
Function Description
void put(int row, int position, int level, boolean leftAisle, Agent agent) Puts the agent into the cell with the specified coordinates [row, position, level]. If the cell is occupied, signals error. Does not check if the cell is reserved.
T randomAgent() Returns a random agent in the rack system, or null if the rack system is empty.
T remove(Agent agent) Removes a given agent from the rack system and returns it. If the agent is not stored here, returns null.
T removeFromCell(int row, int position, int level, boolean leftAisle) Removes the agent stored in a given cell [row,position,level] from the rack system and returns it.
T removeFromCell(PalletRackLocation location, boolean leftAisle) Removes the agent stored in a given cell [row,position,level] from the rack system and returns it.
T getByIndex(int index) Returns the stored agent with a given index. The order of agents is internal and may change when agents are added or removed. If the index is greater than (number of agents - 1), returns null.
PalletRackLocation getCellOf(Agent agent) Returns the array containing the coordinates of a cell with a given agent [row,position,level], or null if the agent is not stored here.
PalletRackLocation getFreeCell(boolean infront) Returns the array [row,position,level] with the coordinates of a free cell that is closest to either front of back of the rack system, depending on the parameter infront. If the rack system is full, returns null.
Position getPositionAtCell(int row, int position, int level, int deepPosition, double offset, double depth, boolean leftAisle, Position out) Returns the position at the given cell.
Position getPositionAtCellEntry(int row, int position, int level, boolean leftAisle, Position out) Returns the position at the enter to the given cell.
Position getPositionInAisle(int row, int position, boolean leftAisle, Position out) Returns the position in the pallet rack aisle located in front of a cell with a given row and position (level does not matter as cells located one above the other have same position).
PalletRack getPalletRack(int row) Returns the pallet rack containing a given row.
boolean hasSpace() Tests if the rack system has free space, i.e. if there are cells that are neither occupied nor reserved.
boolean isFree(int row, int position, int level) Tests if a given cell [row,position,level] is free, i.e. neither occupied nor reserved.
int nFree(int row, int position, int level) Tests if a given cell [row,position,level] is free, i.e. neither occupied nor reserved and returns the number of free slots in the depth of the cell.
int size() Returns the current number of agents in the rack system.
Statistics
Function Description
boolean isStatisticsCollected() Returns true if the block collects statistics.
void resetStats() Resets the statistics collected for this block.

Statistics

StatisticsContinuous statsUtilization
Continuous statistics on the rack system utilization (the utilization at each moment of time is calculated as size()/capacity). Is collected if the statistics collection is not turned off by PML Settings block.
.
How can we improve this article?