AnyLogic
Expand
Font size
All Superinterfaces:
java.io.Serializable

public interface StorageCell
extends java.io.Serializable

Method Summary

All Methods Instance Methods Abstract Methods 
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​(Agent agent)
Reserves this cell for the specified agent.
void store​(Agent agent)
Stores the specified agent in this cell.
Modifier and Type Method Description

Method Detail

getStorage

Storage getStorage()
Returns the rack storage that this cell belongs to
Returns:
the rack storage that this cell belongs to

getRack

int getRack()
Returns the index of the rack that this cell belongs to
Returns:
the index of the rack that this cell belongs to

getShelf

int getShelf()
Returns the index of the shelf that this cell belongs to
Returns:
the index of the shelf that this cell belongs to

getBay

int getBay()
Returns the index of the bay that this cell belongs to
Returns:
the index of the bay that this cell belongs to

getDeepPosition

int getDeepPosition()
Returns the index of this cell in the slot
Returns:
the index of this cell in the slot

getAgent

Agent getAgent()
Returns the agent that occupies this cell or null if the cell is not occupied
Returns:
the agent inside the cell

store

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.
Parameters:
agent - - agent to be stored in this cell.

retrieve

Agent retrieve()
Removes the agent that currently occupies this cell. The cell must not be empty.
Returns:
an agent that is currently occupying this cell

isFree

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.

getState

@AnyLogicInternalLibraryAPI
StorageCellState getState()

setReservation

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.
Parameters:
agent - - agent that this cell is reserved for

cancelReservation

Agent cancelReservation()
Cancels reservation for the agent that reserved this cell. The cell must be explicitly reserved by some agent.
Returns:
an agent for whom the reservation of this cell was canceled

isActive

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.

deactivate

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.

isAvailableToStore

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.

isAvailableToRetrieve

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.
How can we improve this article?