AnyLogic
Expand
Font size

Class StackerCrane<T extends Agent>

All Implemented Interfaces:
AbstractPositionalMarkup, AggregatableAnimationElement, HasLevel, LevelElement, LevelMarkup, com.anylogic.engine.markup.material_handling.IMaterialFallible, StorageResourceManagementUnit<com.anylogic.engine.markup.material_handling.stacker_crane.StackerCraneState>, SVGElement, UsdElement, Serializable

public class StackerCrane<T extends Agent>
extends Crane<T>
implements AbstractPositionalMarkup, StorageResourceManagementUnit<com.anylogic.engine.markup.material_handling.stacker_crane.StackerCraneState>, com.anylogic.engine.markup.material_handling.IMaterialFallible
See Also:
Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from interface com.anylogic.engine.markup.StorageResourceManagementUnit

StorageResourceManagementUnit.UnitType

Field Summary

Fields inherited from interface com.anylogic.engine.presentation.UsdElement

ID_NOT_SET

Constructor Summary

ConstructorDescription
StackerCrane() 
StackerCrane(double railLocation) 

Method Summary

Modifier and TypeMethodDescription
doubleaveragePickingTime() 
doubleaveragePickingTime(TimeUnits units) 
doubleaverageStorageTime() 
doubleaverageStorageTime(TimeUnits units) 
booleancontains(double px, double py)
Test if the shape contains the point with the given coordinates (relative to this shape's container, i.e.
voidfail()
Sets the stacker crane to failed state
PositiongetAbsoluteHookPosition()
Returns the current hook position as an instance of Position in pixels.
List<Agent>getAgents()
Returns list of agents that have seized the stacker crane.
List<Agent>getAgentsInQueue()
Returns list of agents that represents stacker crane's own queue.
doublegetBaseLength()
Returns the length of the stacker crane base in pixels.
doublegetBaseLength(LengthUnits units)
Returns the length of the stacker crane base in length units.
doublegetCraneHeight() 
doublegetCraneHeight(LengthUnits units) 
PositiongetFramePosition()
Returns the current position of the stacker crane base center at z=0 (coordinates and rotation).
intgetIndex() 
PointgetInitialHookPoint()
Returns the initial hook point in pixels, calculated according to the crane's dimensions and converted to pixels with crane's space.
PointgetInitialHookPoint(LengthUnits units)
Returns the initial hook point in the specified length units.
PointgetInitialHookPoint(Function<Double,Double> meterToPx) 
PointgetInitialLiftPoint() 
PointgetInitialLiftPoint(LengthUnits units) 
ConveyorPathgetInputConveyor() 
PointNodegetInputNode() 
LevelgetLevel()
Returns level associated with this space markup element or null if this element has no level
PositiongetMastPosition()
Returns the current position of the mast (coordinates and rotation).
ConveyorPathgetOutputConveyor() 
PointNodegetOutputNode() 
doublegetRailLocation()
Returns the horizontal offset in pixels of the stacker crane rail relative to the left boundary of the stacker crane system.
doublegetRailLocation(LengthUnits units)
Returns the horizontal offset in length units of the stacker crane rail relative to the left boundary of the stacker crane system.
StorageRetrievalSystemgetRetrievalSystem() 
doublegetRotation()
Returns rotation of the system.
AgentgetServicedAgent()
Returns the agent that have seized the stacker crane if crane is loaded.
StackerCraneSystemgetStackerCraneSystem() 
com.anylogic.engine.markup.material_handling.stacker_crane.StackerCraneStategetState()
Returns the stacker crane's current state.
doublegetStatisticsStartTime() 
PositiongetTrolleyPosition()
Returns the current position of the center of the trolley at z=0 (coordinates and rotation).
StorageResourceManagementUnit.UnitTypegetType() 
doublegetUtilization()
Returns the crane utilization: the fraction of time the crane was operating.
booleanisFailed()
Returns true if the stacker crane is failed and false otherwise.
booleanisLoaded() 
booleanisReady()
Returns true if stacker crane is ready to operate, i.e.
voidmoveToInputStation()
Orders the stacker crane to move to nearest accessible input station with chosen type.
intnumberOfAgentsHandled() 
voidonLoading(T agent) 
voidonUnloading(T agent) 
voidrepair()
Repairs the stacker crane from failed state
voidresetStats()
Resets the crane utilization statistics.
voidsetRetrievalSystem(StorageRetrievalSystem system) 
voidsetStackerCraneSystem(StackerCraneSystem<T> stackerCraneSystem) 
voidsetState(com.anylogic.engine.markup.material_handling.stacker_crane.StackerCraneState state) 
doubletimeInState(com.anylogic.engine.markup.material_handling.stacker_crane.StackerCraneState state)
Returns total time in model time units spent by the stacker crane in the given state.
doubletimeInState(com.anylogic.engine.markup.material_handling.stacker_crane.StackerCraneState state, TimeUnits units)
Returns total time in specified time units spent by the stacker crane in the given state.

Methods inherited from class com.anylogic.engine.markup.Crane

getX, getXYZ, getY, getZ, notifyDirtyState, setX, setXYZ, setY, setZ

Methods inherited from class com.anylogic.engine.markup.AbstractLevelMarkup

getDrawMode, setLevel

Methods inherited from class com.anylogic.engine.markup.MarkupShape

error, getFullName, getOutsideLevelZ, getPresentable, getSpace, initialize, isClickHandled, isOnly3D, isPublic, onClick, remove, setDrawMode, setOwner

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface com.anylogic.engine.markup.AbstractPositionalMarkup

getSpace, getX, getY, getZ, isVisible

Methods inherited from interface com.anylogic.engine.markup.AggregatableAnimationElement

initializeInternal, onAggregatorVisibilityChanged, postInitialize

Methods inherited from interface com.anylogic.engine.presentation.UsdElement

getOrGenerateUSDId

Constructor Details

StackerCrane

public StackerCrane()

StackerCrane

@AnyLogicInternalCodegenAPI
public StackerCrane(double railLocation)

Method Details

getState

public com.anylogic.engine.markup.material_handling.stacker_crane.StackerCraneState getState()
Returns the stacker crane's current state.

Possible values are:

  • IDLE - the stacker crane has no tasks
  • WAITING - the stacker crane stays unmovable awaiting further tasks
  • LOADING - the stacker crane stays unmovable during agent loading
  • UNLOADING - the stacker crane stays unmovable during agent unloading
  • MOVING_UNLOADED - the stacker crane moves without any attached agent except movement to its parking position
  • MOVING_LOADED - the stacker crane moves with attached agent
  • MOVING_HOME - the stacker crane moves to its parking position
Specified by:
getState in interface StorageResourceManagementUnit<T extends Agent>
Returns:
the stacker cranes's current state.

timeInState

public double timeInState(com.anylogic.engine.markup.material_handling.stacker_crane.StackerCraneState state)
Returns total time in model time units spent by the stacker crane in the given state.
Parameters:
state - - one of StackerCraneState
Returns:
total time in model time units spent by the stacker crane in the given state.

timeInState

public double timeInState(com.anylogic.engine.markup.material_handling.stacker_crane.StackerCraneState state,
 TimeUnits units)
Returns total time in specified time units spent by the stacker crane in the given state.
Parameters:
state - - one of StackerCraneState
units - - time units
Returns:
total time in specified time units spent by the stacker crane in the given state.

averageStorageTime

public double averageStorageTime()

averageStorageTime

public double averageStorageTime(TimeUnits units)

averagePickingTime

public double averagePickingTime()

averagePickingTime

public double averagePickingTime(TimeUnits units)

getUtilization

public double getUtilization()
Description copied from class: Crane
Returns the crane utilization: the fraction of time the crane was operating. The returned crane utilization value lies in the range [0..1].
Specified by:
getUtilization in class Crane<T extends Agent>

numberOfAgentsHandled

public int numberOfAgentsHandled()

resetStats

public void resetStats()
Description copied from class: Crane
Resets the crane utilization statistics.
Specified by:
resetStats in class Crane<T extends Agent>

getInitialHookPoint

@AnyLogicInternalAPI
public Point getInitialHookPoint()
Description copied from class: Crane
Returns the initial hook point in pixels, calculated according to the crane's dimensions and converted to pixels with crane's space.
Specified by:
getInitialHookPoint in class Crane<T extends Agent>
Returns:
initial hook point in pixels

getInitialHookPoint

@AnyLogicInternalAPI
public Point getInitialHookPoint(LengthUnits units)
Description copied from class: Crane
Returns the initial hook point in the specified length units.
Specified by:
getInitialHookPoint in class Crane<T extends Agent>
Parameters:
units - - a constant defining the length units
Returns:
initial hook point in the specified LengthUnits

getInitialHookPoint

@AnyLogicInternalLibraryAPI
public Point getInitialHookPoint(Function<Double,Double> meterToPx)

fail

public void fail()
Sets the stacker crane to failed state
Specified by:
fail in interface com.anylogic.engine.markup.material_handling.IMaterialFallible
Specified by:
fail in class Crane<T extends Agent>

repair

public void repair()
Repairs the stacker crane from failed state
Specified by:
repair in interface com.anylogic.engine.markup.material_handling.IMaterialFallible
Specified by:
repair in class Crane<T extends Agent>

isFailed

public boolean isFailed()
Returns true if the stacker crane is failed and false otherwise.
Specified by:
isFailed in interface com.anylogic.engine.markup.material_handling.IMaterialFallible
Specified by:
isFailed in class Crane<T extends Agent>
Returns:
true if the stacker crane is failed and false otherwise

isReady

public boolean isReady()
Returns true if stacker crane is ready to operate, i.e. idle and not failed.
Specified by:
isReady in class Crane<T extends Agent>
Returns:
true if stacker crane is ready to operate, i.e. idle and not failed

onLoading

@AnyLogicInternalLibraryAPI
public void onLoading(T agent)
Specified by:
onLoading in class Crane<T extends Agent>

onUnloading

@AnyLogicInternalLibraryAPI
public void onUnloading(T agent)
Specified by:
onUnloading in class Crane<T extends Agent>

isLoaded

@AnyLogicInternalLibraryAPI
public boolean isLoaded()

getAbsoluteHookPosition

@AnyLogicInternalAPI
public Position getAbsoluteHookPosition()
Description copied from class: Crane
Returns the current hook position as an instance of Position in pixels. Also updates animation. Position.rotation contains the hook's current rotation angle in radians.
Specified by:
getAbsoluteHookPosition in class Crane<T extends Agent>
Returns:
current hook point in pixels with the angle as Position.rotation

getCraneHeight

@AnyLogicInternalLibraryAPI
public double getCraneHeight()
Specified by:
getCraneHeight in class Crane<T extends Agent>

getCraneHeight

@AnyLogicInternalLibraryAPI
public double getCraneHeight(LengthUnits units)
Specified by:
getCraneHeight in class Crane<T extends Agent>

getStatisticsStartTime

@AnyLogicInternalAPI
public double getStatisticsStartTime()
Specified by:
getStatisticsStartTime in class Crane<T extends Agent>

contains

public boolean contains(double px,
 double py)
Description copied from class: MarkupShape
Test if the shape contains the point with the given coordinates (relative to this shape's container, i.e. in the same system with the coordinates of this shape, x and y)
Specified by:
contains in class MarkupShape
Parameters:
px - the x coordinate relative to this shape's container
py - the y coordinate relative to this shape's container
Returns:
true if the shape contains the point with the given coordinates

getRotation

public double getRotation()
Returns rotation of the system.
Specified by:
getRotation in interface AbstractPositionalMarkup
Overrides:
getRotation in class Crane<T extends Agent>
Returns:
rotation of the system

getServicedAgent

public Agent getServicedAgent()
Returns the agent that have seized the stacker crane if crane is loaded. Otherwise, returns null.
Returns:
the agent that have seized the stacker crane if crane is loaded. Otherwise, returns null.

setStackerCraneSystem

@AnyLogicInternalLibraryAPI
public void setStackerCraneSystem(StackerCraneSystem<T> stackerCraneSystem)

getLevel

@AnyLogicInternalAPI
public Level getLevel()
Description copied from interface: HasLevel
Returns level associated with this space markup element or null if this element has no level
Specified by:
getLevel in interface HasLevel
Overrides:
getLevel in class AbstractLevelMarkup
Returns:
the level associated with this space markup element

getStackerCraneSystem

@AnyLogicInternalLibraryAPI
public StackerCraneSystem getStackerCraneSystem()

getBaseLength

public double getBaseLength()
Returns the length of the stacker crane base in pixels.
Parameters:
units - - length units
Returns:
length of the stacker crane base in pixels.

getBaseLength

public double getBaseLength(LengthUnits units)
Returns the length of the stacker crane base in length units.
Parameters:
units - - length units
Returns:
length of the stacker crane base in length units.

getInitialLiftPoint

@AnyLogicInternalLibraryAPI
public Point getInitialLiftPoint()

getInitialLiftPoint

@AnyLogicInternalLibraryAPI
public Point getInitialLiftPoint(LengthUnits units)

getAgents

public List<Agent> getAgents()
Returns list of agents that have seized the stacker crane.
Returns:
list of agents that have seized the stacker crane.

getAgentsInQueue

public List<Agent> getAgentsInQueue()
Returns list of agents that represents stacker crane's own queue. The list is ordered by priority (from high to low). List is modifiable but changes will not affect real queue.
Returns:
list of agents that represents stacker crane's own queue.

getTrolleyPosition

public Position getTrolleyPosition()
Returns the current position of the center of the trolley at z=0 (coordinates and rotation).
Returns:
current position of the center of the trolley at z=0 (coordinates and rotation).

getFramePosition

public Position getFramePosition()
Returns the current position of the stacker crane base center at z=0 (coordinates and rotation).
Returns:
current position of the stacker crane base center at z=0 (coordinates and rotation).

getMastPosition

public Position getMastPosition()
Returns the current position of the mast (coordinates and rotation).
Returns:
current position of the mast (coordinates and rotation).

moveToInputStation

public void moveToInputStation()
Orders the stacker crane to move to nearest accessible input station with chosen type. Note: this method should not conflict with stacker crane movement induced by blocks: Store, Retrieve. Otherwise an exception will occur.

setRetrievalSystem

@AnyLogicInternalLibraryAPI
public void setRetrievalSystem(StorageRetrievalSystem system)
Specified by:
setRetrievalSystem in interface StorageResourceManagementUnit<T extends Agent>

getRetrievalSystem

@AnyLogicInternalLibraryAPI
public StorageRetrievalSystem getRetrievalSystem()
Specified by:
getRetrievalSystem in interface StorageResourceManagementUnit<T extends Agent>

getIndex

@AnyLogicInternalLibraryAPI
public int getIndex()

getType

@AnyLogicInternalAPI
public StorageResourceManagementUnit.UnitType getType()
Specified by:
getType in interface StorageResourceManagementUnit<T extends Agent>

setState

@AnyLogicInternalLibraryAPI
public void setState(com.anylogic.engine.markup.material_handling.stacker_crane.StackerCraneState state)
Specified by:
setState in interface StorageResourceManagementUnit<T extends Agent>

getRailLocation

public double getRailLocation()
Returns the horizontal offset in pixels of the stacker crane rail relative to the left boundary of the stacker crane system.
Returns:
horizontal offset in pixels of the stacker crane rail relative to the left boundary of the stacker crane system.

getRailLocation

public double getRailLocation(LengthUnits units)
Returns the horizontal offset in length units of the stacker crane rail relative to the left boundary of the stacker crane system.
Parameters:
units - - length units
Returns:
horizontal offset in length units of the stacker crane rail relative to the left boundary of the stacker crane system.

getInputNode

@AnyLogicInternalAPI
public PointNode getInputNode()

getOutputNode

@AnyLogicInternalAPI
public PointNode getOutputNode()

getInputConveyor

@AnyLogicInternalAPI
public ConveyorPath getInputConveyor()

getOutputConveyor

@AnyLogicInternalAPI
public ConveyorPath getOutputConveyor()