Package com.anylogic.engine.markup
- All Known Implementing Classes:
PalletRack
public interface PalletRackAccess<T extends Agent>
Modifier and Type | Method | Description |
---|---|---|
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 |
boolean | contains |
Returns
true if the given agent is contained within this object |
T | get |
Returns the agent stored at the specified cell [row,position,level,deepPosition], or
null if the cell is reserved or free. |
PalletRackApproachDirection | getApproachDirection |
Return the approach direction to the given agent or
null
if agent is unreachable (lies deep in the cell, behind other entities) |
T | getByIndex |
Returns the stored agent with a given index.
|
PalletRackLocation | getCellOf |
Returns the coordinates of a cell with a given agent [row,position,level], or null if the agent is not stored here.
|
PalletRackLocation | getFreeCell |
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.
|
Position | getPositionAtCell |
Returns the position at the given cell
|
Position | getPositionAtCellEntry |
Returns the position at the enter to the given cell
|
Position | getPositionInAisle |
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).
|
boolean | hasSpace() |
Returns
true if there is enough space for at least one more agents |
boolean | isFree |
Tests if a given cell [row,position,level] is free, i.e.
|
int | nFree |
Tests if a given cell [row,position,level] is free, i.e.
|
int | nReserved |
Tests if a given cell [row,position,level] is reserved.
|
void | put |
Puts the agent into the cell with the specified coordinates [row,position,level].
|
T | randomAgent() |
Returns a random agent in the rack system, or
null if the rack system is empty. |
void | release |
Discards a reservation of a given cell [row,position,level].
|
T | remove |
Removes a given agent from the rack system and returns it.
|
T | removeFromCell |
Removes the agent stored in a given cell [row,position,level] from the rack system and returns it.
|
T | removeFromCell |
Removes the agent stored in a given cell [row,position,level] from the rack system and returns it.
|
void | reserve |
Marks a given cell [row,position,level] as reserved.
|
int | reserved() |
Returns the number of reserved cells in the pallet rack(s).
|
void | resetStats() |
Resets the statistics collected for this object.
|
int | size() |
Returns the number of entities inside
|
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
int size()
Returns the number of entities inside
- Returns:
- the number of entities inside
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
int reserved()
Returns the number of reserved cells in the pallet rack(s).
- Returns:
- the number of reserved cells in the pallet rack(s).
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
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
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
T randomAgent()
Returns a random agent in the rack system, or
null
if the rack system is empty.- Returns:
- random agent
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
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 agentrowToSearch
- optional parameter - the row previously found bygetCellOf(Agent)
(set to -1 if unknown)- Returns:
- the approach direction
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
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
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
- iftrue
, the returned object will have the smallest available position- Returns:
- the [row,position,level]
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 celldepth
- depth within cellleftAisle
- [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 oneout
- anyPosition
object (to be used for output) ornull
(in this case, new Position object will be created)- 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
- 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 oneout
- anyPosition
object (to be used for output) ornull
(in this case, new Position object will be created)- 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 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 oneout
- anyPosition
object (to be used for output) ornull
(in this case, new Position object will be created)- Returns:
- the position in the pallet rack aisle located in front of a cell
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 oneagent
- the agent
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
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
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
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
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
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)
void resetStats()
Resets the statistics collected for this object.