public interface PalletRackAccess<T extends Agent>
Modifier and Type | Method and 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(Agent 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. |
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) |
T |
getByIndex(int index)
Returns the stored agent with a given index.
|
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.
|
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.
|
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 aisle position).
|
boolean |
hasSpace()
Returns
true if there is enough space for at least one more agents |
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 |
nReserved(int row,
int position,
int level)
Tests if a given cell [row,position,level] is reserved.
|
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].
|
T |
randomAgent()
Returns a random agent in the rack system, or
null if the rack system is empty. |
void |
release(int row,
int position,
int level,
boolean leftAisle)
Discards a reservation of a given cell [row,position,level].
|
T |
remove(Agent agent)
Removes a given agent from the rack system and returns it.
|
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.
|
void |
reserve(int row,
int position,
int level,
boolean leftAisle)
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()
number of rows * number of positions along row * number of deep positions * number of levels
int size()
boolean hasSpace()
true
if there is enough space for at least one more agentstrue
if there is enough space for at least one more agentsint reserved()
boolean contains(Agent agent)
true
if the given agent is contained within this objectagent
- the agenttrue
if the given agent is contained within this objectT get(int row, int position, int level, int deepPosition)
null
if the cell is reserved or free.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)T getByIndex(int index)
null
.index
- the indexnull
T randomAgent()
null
if the rack system is empty.PalletRackLocation getCellOf(Agent agent)
agent
- the agentnull
PalletRackApproachDirection getApproachDirection(Agent agent, int rowToSearch)
null
if agent is unreachable (lies deep in the cell, behind other entities)agent
- the agentrowToSearch
- optional parameter - the row previously found by getCellOf(Agent)
(set to -1 if unknown)boolean isFree(int row, int position, int level)
row
- the row (0, 1, ..)position
- the position in row (0, 1, ..)level
- the level (0 is the lowest)true
if freeint nFree(int row, int position, int level)
row
- the row (0, 1, ..)position
- the position in row (0, 1, ..)level
- the level (0 is the lowest)PalletRackLocation getFreeCell(boolean infront)
infront
- if true
, the returned object will have the smallest available positionPosition getPositionAtCell(int row, int position, int level, int deepPosition, double offset, double depth, boolean leftAisle, Position out)
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
- any Position
object (to be used for output) or null
(in this case, new Position object will be created)Position getPositionAtCellEntry(int row, int position, int level, boolean leftAisle, Position out)
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
- any Position
object (to be used for output) or null
(in this case, new Position object will be created)Position getPositionInAisle(int row, int position, boolean leftAisle, Position out)
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
- any Position
object (to be used for output) or null
(in this case, new Position object will be created)void put(int row, int position, int level, boolean leftAisle, Agent agent)
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 agentT removeFromCell(int row, int position, int level, boolean leftAisle)
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 oneT removeFromCell(PalletRackLocation location, boolean leftAisle)
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 oneT remove(Agent agent)
agent
- the agent to removenull
void reserve(int row, int position, int level, boolean leftAisle)
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 placedvoid release(int row, int position, int level, boolean leftAisle)
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 releasedint nReserved(int row, int position, int level)
row
- the row (0, 1, ..)position
- the position in row (0, 1, ..)level
- the level (0 is the lowest)void resetStats()
Copyright © AnyLogic North America, LLC. All Rights Reserved.