AnyLogic AnyLogic
Expand
Font size
All Implemented Interfaces:
AggregatableAnimationElement, HasLevel, LevelElement, LevelMarkup, com.anylogic.engine.markup.material_handling.IMaterialFallible, SVGElement, java.io.Serializable
Direct Known Subclasses:
JibCrane, OverheadCrane, OverheadCraneBridge

public abstract class Crane<T extends Agent>
extends AbstractLevelMarkup
implements com.anylogic.engine.markup.material_handling.IMaterialFallible
See Also:
Serialized Form

Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods 
abstract void fail()
Sets the crane to failed state
abstract Position getAbsoluteHookPosition()
Returns the current hook position as an instance of Position in pixels.
abstract double getCraneHeight()  
abstract double getCraneHeight​(LengthUnits units)  
abstract Point getInitialHookPoint()
Returns the initial hook point in pixels, calculated according to the crane's dimensions and converted to pixels with crane's space.
abstract Point getInitialHookPoint​(LengthUnits units)
Returns the initial hook point in the specified length units.
abstract double getStatisticsStartTime()  
abstract double getUtilization()
Returns the crane utilization: the fraction of time the crane was operating.
double getX()
Returns the X coordinate of this crane
Point getXYZ()
Returns the point location of this element
double getY()
Returns the Y coordinate of this crane
double getZ()
Returns Z-coordinate of this crane relative to crane's level
abstract boolean isFailed()
Returns true if the crane is failed and false otherwise.
abstract boolean isReady()
Returns true if the crane is ready to work with new agent and false otherwise.
void notifyDirtyState()
should be called by controller, when it forces the changing of markup's state
abstract void onFailed()
Calls the crane's onFailed() callback code
abstract void onLoading​(T agent)  
abstract void onRepaired()
Calls the crane's onRepaired() callback code
abstract void onUnloading​(T agent)  
abstract void repair()
Repairs the crane from failed state
abstract void resetStats()
Resets the crane utilization statistics.
void setX​(double x)
Sets the X coordinate of this crane
void setXYZ​(Point point)
Places the crane into the argument point location
void setY​(double y)
Sets the Y coordinate of this crane
void setZ​(double z)
Sets the Z coordinate of this crane
Modifier and Type Method Description

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

getDrawMode, getLevel, setLevel

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

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

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

discardOwner, executeUserAction, findSVGElement, getName, getSVGId, initializeInternal, isVisible, onAggregatorInitialized, onAggregatorVisibilityChanged, removeSVGFromOwner, resetSVGState, setVisible, updateDynamicProperties, updateDynamicPropertiesStructural, updateSVGProperties

Methods inherited from class java.lang.Object

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

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

initializeInternal, onAggregatorVisibilityChanged, postInitialize

Method Detail

notifyDirtyState

@AnyLogicInternalAPI
public void notifyDirtyState()
should be called by controller, when it forces the changing of markup's state
Parameters:
currentPosition -

getX

public double getX()
Returns the X coordinate of this crane
Returns:
the X coordinate of this crane

getY

public double getY()
Returns the Y coordinate of this crane
Returns:
the Y coordinate of this crane

getInitialHookPoint

public abstract Point getInitialHookPoint()
Returns the initial hook point in pixels, calculated according to the crane's dimensions and converted to pixels with crane's space.
Returns:
initial hook point in pixels

getInitialHookPoint

public abstract Point getInitialHookPoint​(LengthUnits units)
Returns the initial hook point in the specified length units.
Parameters:
units - - a constant defining the length units
Returns:
initial hook point in the specified LengthUnits

getZ

public double getZ()
Returns Z-coordinate of this crane relative to crane's level

getXYZ

public Point getXYZ()
Returns the point location of this element
Returns:
the Point object with coordinates of the node

setX

public void setX​(double x)
Sets the X coordinate of this crane
Parameters:
x - the X coordinate of this crane

setY

public void setY​(double y)
Sets the Y coordinate of this crane
Parameters:
y - the Y coordinate of this crane

setZ

public void setZ​(double z)
Sets the Z coordinate of this crane
Parameters:
z - the Z coordinate of this crane

setXYZ

public void setXYZ​(Point point)
Places the crane into the argument point location
Parameters:
point - the location that the crane should be placed into

fail

public abstract void fail()
Sets the crane to failed state
Specified by:
fail in interface com.anylogic.engine.markup.material_handling.IMaterialFallible

repair

public abstract void repair()
Repairs the crane from failed state
Specified by:
repair in interface com.anylogic.engine.markup.material_handling.IMaterialFallible

onFailed

public abstract void onFailed()
Calls the crane's onFailed() callback code
Specified by:
onFailed in interface com.anylogic.engine.markup.material_handling.IMaterialFallible

onRepaired

public abstract void onRepaired()
Calls the crane's onRepaired() callback code
Specified by:
onRepaired in interface com.anylogic.engine.markup.material_handling.IMaterialFallible

isFailed

public abstract boolean isFailed()
Returns true if the crane is failed and false otherwise.
Specified by:
isFailed in interface com.anylogic.engine.markup.material_handling.IMaterialFallible
Returns:
true if the crane is failed and false otherwise

isReady

public abstract boolean isReady()
Returns true if the crane is ready to work with new agent and false otherwise.
Returns:
true if the crane is ready to work with new agent and false otherwise

getUtilization

public abstract double getUtilization()
Returns the crane utilization: the fraction of time the crane was operating. The returned crane utilization value lies in the range [0..1].

resetStats

public abstract void resetStats()
Resets the crane utilization statistics.

onLoading

public abstract void onLoading​(T agent)

onUnloading

public abstract void onUnloading​(T agent)

getAbsoluteHookPosition

public abstract Position getAbsoluteHookPosition()
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.
Returns:
current hook point in pixels with the angle as Position.rotation

getCraneHeight

public abstract double getCraneHeight()

getCraneHeight

public abstract double getCraneHeight​(LengthUnits units)

getStatisticsStartTime

@AnyLogicInternalAPI
public abstract double getStatisticsStartTime()
How can we improve this article?