AnyLogic
Expand
Font size
All Superinterfaces:
Serializable

public interface StorageCell
extends Serializable

Method Summary

Modifier and TypeMethodDescription
AgentcancelReservation()
Cancels reservation for the agent that reserved this cell.
voiddeactivate()
Deactivates the cell and disallows all operations with it.
AgentgetAgent()
Returns the agent that occupies this cell or null if the cell is not occupied
intgetBay()
Returns the index of the bay that this cell belongs to
intgetDeepPosition()
Returns the index of this cell in the slot
intgetRack()
Returns the index of the rack that this cell belongs to
intgetShelf()
Returns the index of the shelf that this cell belongs to
StorageCellStategetState() 
StoragegetStorage()
Returns the rack storage that this cell belongs to
booleanisActive()
Returns true if the cell is NOT disabled and operates normally, false otherwise.
booleanisAvailableToRetrieve()
Returns true if the cell is both accessible and contains an agent, false otherwise.
booleanisAvailableToStore()
Returns true if the cell is both open for reservation and accessible, false otherwise.
booleanisFree()
Returns true if the cell is empty, active, and not reserved by any agent, false otherwise.
Agentretrieve()
Removes the agent that currently occupies this cell.
voidsetReservation(Agent agent)
Reserves this cell for the specified agent.
voidstore(Agent agent)
Stores the specified agent in this cell.

Method Details

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. This method cannot be used with LIFO and FIFO flow storage types.
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. This method cannot be used with LIFO and FIFO flow storage types.
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. This method cannot be used with LIFO and FIFO flow storage types.
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. This method cannot be used with LIFO and FIFO flow storage types.
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.