AnyLogic
Expand
Font size
All Known Implementing Classes:
PalletRack

public interface PalletRackAccess<T extends Agent>

Method Summary

Modifier and TypeMethodDescription
intcapacity()
Returns the total number of cell positions (all the levels and all racks, if there are several), which is number of rows * number of positions along row * number of deep positions * number of levels
booleancontains(Agent agent)
Returns true if the given agent is contained within this object
Tget(int row, int position, int level, int deepPosition)
Returns the agent stored at the specified cell [row,position,level,deepPosition], or null if the cell is reserved or free.
PalletRackApproachDirectiongetApproachDirection(Agent agent, int rowToSearch)
Return the approach direction to the given agent or null if agent is unreachable (lies deep in the cell, behind other entities)
TgetByIndex(int index)
Returns the stored agent with a given index.
PalletRackLocationgetCellOf(Agent agent)
Returns the coordinates of a cell with a given agent [row,position,level], or null if the agent is not stored here.
PalletRackLocationgetFreeCell(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.
PositiongetPositionAtCell(int row, int position, int level, int deepPosition, double offset, double depth, boolean leftAisle, Position out)
Returns the position at the given cell
PositiongetPositionAtCellEntry(int row, int position, int level, boolean leftAisle, Position out)
Returns the position at the enter to the given cell
PositiongetPositionInAisle(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 aisle position).
booleanhasSpace()
Returns true if there is enough space for at least one more agents
booleanisFree(int row, int position, int level)
Tests if a given cell [row,position,level] is free, i.e.
intnFree(int row, int position, int level)
Tests if a given cell [row,position,level] is free, i.e.
intnReserved(int row, int position, int level)
Tests if a given cell [row,position,level] is reserved.
voidput(int row, int position, int level, boolean leftAisle, Agent agent)
Puts the agent into the cell with the specified coordinates [row,position,level].
TrandomAgent()
Returns a random agent in the rack system, or null if the rack system is empty.
voidrelease(int row, int position, int level, boolean leftAisle)
Discards a reservation of a given cell [row,position,level].
Tremove(Agent agent)
Removes a given agent from the rack system and returns it.
TremoveFromCell(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.
TremoveFromCell(PalletRackLocation location, boolean leftAisle)
Removes the agent stored in a given cell [row,position,level] from the rack system and returns it.
voidreserve(int row, int position, int level, boolean leftAisle)
Marks a given cell [row,position,level] as reserved.
intreserved()
Returns the number of reserved cells in the pallet rack(s).
voidresetStats()
Resets the statistics collected for this object.
intsize()
Returns the number of entities inside

Method Details

capacity

int capacity()
Returns the total number of cell positions (all the levels and all racks, if there are several), which is number of rows * number of positions along row * number of deep positions * number of levels
Returns:
the total number of cells

size

int size()
Returns the number of entities inside
Returns:
the number of entities inside

hasSpace

boolean hasSpace()
Returns true if there is enough space for at least one more agents
Returns:
true if there is enough space for at least one more agents

reserved

int reserved()
Returns the number of reserved cells in the pallet rack(s).
Returns:
the number of reserved cells in the pallet rack(s).

contains

boolean contains(Agent agent)
Returns true if the given agent is contained within this object
Parameters:
agent - the agent
Returns:
true if the given agent is contained within this object

get

T get(int row,
 int position,
 int level,
 int deepPosition)
Returns the agent stored at the specified cell [row,position,level,deepPosition], or null if the cell is reserved or free.
Parameters:
row - the row (0, 1, ..)
position - the position in row (0, 1, ..)
level - the level (0 is the lowest)
deepPosition - [if cells have depth] the index (0, 1, ..), counted from the aisle (or from the left aisle, if there are several aisles near this row)
Returns:
the agent stored at the specified cell

getByIndex

T getByIndex(int index)
Returns the stored agent with a given index. The order of entities is internal and may change when entities are added or removed. If the index is greater than the number of entities-1, returns null.
Parameters:
index - the index
Returns:
agent by index or null

randomAgent

T randomAgent()
Returns a random agent in the rack system, or null if the rack system is empty.
Returns:
random agent

getCellOf

PalletRackLocation getCellOf(Agent agent)
Returns the coordinates of a cell with a given agent [row,position,level], or null if the agent is not stored here.
Parameters:
agent - the agent
Returns:
[row,position,level], or null

getApproachDirection

PalletRackApproachDirection getApproachDirection(Agent agent,
 int rowToSearch)
Return the approach direction to the given agent or null if agent is unreachable (lies deep in the cell, behind other entities)
Parameters:
agent - the agent
rowToSearch - optional parameter - the row previously found by getCellOf(Agent) (set to -1 if unknown)
Returns:
the approach direction

isFree

boolean isFree(int row,
 int position,
 int level)
Tests if a given cell [row,position,level] is free, i.e. neither occupied nor reserved.
Parameters:
row - the row (0, 1, ..)
position - the position in row (0, 1, ..)
level - the level (0 is the lowest)
Returns:
true if free

nFree

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
Parameters:
row - the row (0, 1, ..)
position - the position in row (0, 1, ..)
level - the level (0 is the lowest)
Returns:
the number of free slots in the depth of the cell

getFreeCell

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.
Parameters:
infront - if true, the returned object will have the smallest available position
Returns:
the [row,position,level]

getPositionAtCell

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
Parameters:
row - the row (0, 1, ..)
position - the position in row (0, 1, ..)
level - the level (0 is the lowest)
deepPosition - [if cells have depth] the index (0, 1, ..), counted from the aisle (or from the left aisle, if there are several aisles near this row)
offset - offset within cell
depth - depth within cell
leftAisle - [for 2-aisle pallet racks, needed for orientation calculation]: where the face of agent should be oriented: as it was put from the left aisle or from the right one
out - any Position object (to be used for output) or null (in this case, new Position object will be created)
Returns:
the position at the given cell

getPositionAtCellEntry

Position getPositionAtCellEntry(int row,
 int position,
 int level,
 boolean leftAisle,
 Position out)
Returns the position at the enter to the given cell
Parameters:
row - the row (0, 1, ..)
position - the position in row (0, 1, ..)
level - the level (0 is the lowest)
leftAisle - [for 2-aisle pallet racks, needed for orientation calculation]: where the face of agent should be oriented: as it was put from the left aisle or from the right one
out - any Position object (to be used for output) or null (in this case, new Position object will be created)
Returns:
the position at the enter to the given cell

getPositionInAisle

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 aisle position).
Parameters:
row - the row (0, 1, ..)
position - the position in row (0, 1, ..)
leftAisle - [for 2-aisle pallet racks, needed for orientation calculation]: where the face of agent should be oriented: as it was put from the left aisle or from the right one
out - any Position object (to be used for output) or null (in this case, new Position object will be created)
Returns:
the position in the pallet rack aisle located in front of a cell

put

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.
Parameters:
row - the row (0, 1, ..)
position - the position in row (0, 1, ..)
level - the level (0 is the lowest)
leftAisle - [for 2-aisle pallet racks]: from which aisle the agent should be put to the cell: from the left or from the right one
agent - the agent

removeFromCell

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.
Parameters:
row - the row (0, 1, ..)
position - the position in row (0, 1, ..)
level - the level (0 is the lowest)
leftAisle - [for 2-aisle pallet racks]: from which aisle the agent should be removed: from the left or from the right one
Returns:
the removed agent

removeFromCell

T removeFromCell(PalletRackLocation location,
 boolean leftAisle)
Removes the agent stored in a given cell [row,position,level] from the rack system and returns it.
Parameters:
location - the [row,position,level]
leftAisle - [for 2-aisle pallet racks]: from which aisle the agent should be removed: from the left or from the right one
Returns:
the removed agent

remove

T remove(Agent agent)
Removes a given agent from the rack system and returns it. If the agent is not stored here, returns null.
Parameters:
agent - the agent to remove
Returns:
the agent if was removed, otherwise null

reserve

void reserve(int row,
 int position,
 int level,
 boolean leftAisle)
Marks a given cell [row,position,level] as reserved. The cell must be free.
Parameters:
row - the row (0, 1, ..)
position - the position in row (0, 1, ..)
level - the level (0 is the lowest)
leftAisle - [for 2-aisle pallet racks]: from which aisle the cell reserve should be placed

release

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.
Parameters:
row - the row (0, 1, ..)
position - the position in row (0, 1, ..)
level - the level (0 is the lowest)
leftAisle - [for 2-aisle pallet racks]: from which aisle the cell reserve should be released

nReserved

int nReserved(int row,
 int position,
 int level)
Tests if a given cell [row,position,level] is reserved.
Parameters:
row - the row (0, 1, ..)
position - the position in row (0, 1, ..)
level - the level (0 is the lowest)
Returns:
the number of reserved locations (may be > 1 for pallet racks with depth)

resetStats

void resetStats()
Resets the statistics collected for this object.