Package com.anylogic.engine.markup
- All Superinterfaces:
Serializable
public interface StorageCell extends Serializable
Modifier and Type | Method | Description |
---|---|---|
Agent | cancelReservation() |
Cancels reservation for the agent that reserved this cell.
|
void | deactivate() |
Deactivates the cell and disallows all operations with it.
|
Agent | getAgent() |
Returns the agent that occupies this cell or null if the cell is not occupied
|
int | getBay() |
Returns the index of the bay that this cell belongs to
|
int | getDeepPosition() |
Returns the index of this cell in the slot
|
int | getRack() |
Returns the index of the rack that this cell belongs to
|
int | getShelf() |
Returns the index of the shelf that this cell belongs to
|
StorageCellState | getState() | |
Storage | getStorage() |
Returns the rack storage that this cell belongs to
|
boolean | isActive() |
Returns
true if the cell is NOT disabled and operates normally, false otherwise. |
boolean | isAvailableToRetrieve() |
Returns
true if the cell is both accessible and contains an agent, false otherwise. |
boolean | isAvailableToStore() |
Returns
true if the cell is both open for reservation and accessible, false otherwise. |
boolean | isFree() |
Returns
true if the cell is empty, active, and not reserved by any agent, false otherwise. |
Agent | retrieve() |
Removes the agent that currently occupies this cell.
|
void | setReservation |
Reserves this cell for the specified agent.
|
void | store |
Stores the specified agent in this cell.
|
Storage getStorage()
Returns the rack storage that this cell belongs to
- Returns:
- the rack storage that this cell belongs to
int getRack()
Returns the index of the rack that this cell belongs to
- Returns:
- the index of the rack that this cell belongs to
int getShelf()
Returns the index of the shelf that this cell belongs to
- Returns:
- the index of the shelf that this cell belongs to
int getBay()
Returns the index of the bay that this cell belongs to
- Returns:
- the index of the bay that this cell belongs to
int getDeepPosition()
Returns the index of this cell in the slot
- Returns:
- the index of this cell in the slot
Agent getAgent()
Returns the agent that occupies this cell or null if the cell is not occupied
- Returns:
- the agent inside the cell
void store(Agent agent)
Stores the specified agent in this cell.
The agent is stored in the cell immediately and without animation.
Note that the specified agent cannot have another cell reserved, while this
cell has to be open for reservations. Refer to help article for more info.
This method cannot be used with LIFO and FIFO flow storage types.
- Parameters:
agent
- - agent to be stored in this cell.
Agent retrieve()
Removes the agent that currently occupies this cell. The cell must not be empty.
This method cannot be used with LIFO and FIFO flow storage types.
- Returns:
- an agent that is currently occupying this cell
boolean isFree()
Returns
true
if the cell is empty, active, and not reserved by any agent, false
otherwise.- Returns:
true
if the cell is empty, active, and not reserved by any agent,false
otherwise.
@AnyLogicInternalLibraryAPI StorageCellState getState()
void setReservation(Agent agent)
Reserves this cell for the specified agent. Note that this cell cannot be reserved by any
other agent at the time of the call of this method.
This method cannot be used with LIFO and FIFO flow storage types.
- Parameters:
agent
- - agent that this cell is reserved for
Agent cancelReservation()
Cancels reservation for the agent that reserved this cell. The cell must be explicitly reserved by some agent.
This method cannot be used with LIFO and FIFO flow storage types.
- Returns:
- an agent for whom the reservation of this cell was canceled
boolean isActive()
Returns
true
if the cell is NOT disabled and operates normally, false
otherwise.- Returns:
true
if the cell is NOT disabled and operates normally,false
otherwise.
void deactivate()
Deactivates the cell and disallows all operations with it. May be useful to model rack storages that are interrupted
by physical obstacles (pillar or wall). Once disabled, the cell cannot be activated again during runtime.
boolean isAvailableToStore()
Returns
true
if the cell is both open for reservation and accessible, false
otherwise.- Returns:
true
if the cell is both open for reservation and accessible,false
otherwise.
boolean isAvailableToRetrieve()
Returns
true
if the cell is both accessible and contains an agent, false
otherwise.- Returns:
true
if the cell is both accessible and contains an agent,false
otherwise.