AnyLogic
Expand
Font size

Class OverheadCrane<T extends Agent>

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

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

Field Summary

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

ID_NOT_SET

Constructor Summary

ConstructorDescription
OverheadCrane()
Creates new OverheadCrane with 1 bridge.
OverheadCrane(Agent owner, ShapeDrawMode drawMode, boolean isPublic, boolean isObstacle, com.anylogic.engine.markup.material_handling.IOverheadCraneDescriptor<T> descriptor, double x, double y, double z, double rotation, double runwayLengthMeters, double craneWidthMeters, double craneHeightMeters, double bridgeWidthMeters, double safetyGap, Color color, Color trolleyColor, OverheadCraneDrawingType type, OverheadCraneGirderDrawingType girderType, OverheadCraneBridge... bridges)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. It is public due to technical reasons.

Method Summary

Modifier and TypeMethodDescription
voidaddBridge(OverheadCraneBridge bridge)
The method adds bridge to crane.
voidattachAgentAnimation(OverheadCraneBridge bridge, T agent) 
doubleaverageCycleTime(OverheadCraneBridge bridge, TimeUnits units) 
doublebridgeAcceleration(T agent, boolean isLoaded, AccelerationUnits units)
Returns the bridge acceleration specified by the parameter value of this crane in the specified units.
doublebridgeDeceleration(T agent, boolean isLoaded, AccelerationUnits units)
Returns the bridge deceleration specified by the parameter value of this crane in the specified units.
doublebridgeSpeed(T agent, boolean isLoaded, SpeedUnits units)
Returns the bridge speed specified by the parameter value of this crane in the specified units.
booleancanArriveAt(OverheadCraneBridge bridge, Point hookDestination) 
booleancontains(double px, double py)
Test if the shape contains the point with the given coordinates (relative to this shape's container, i.e.
voiddetachAgentAnimation(OverheadCraneBridge bridge) 
voidfail()
Sets the crane to failed state
voidfail(OverheadCraneBridge overheadCraneBridge) 
PositiongetAbsoluteHookPosition()
Returns the current absolute hook position as an instance of Position in pixels.
PositiongetAbsoluteHookPosition(OverheadCraneBridge overheadCraneBridge)
Returns the current absolute hook position of the specified bridge as an instance of Position in pixels.
AgentgetAgent(OverheadCraneBridge bridge) 
List<Agent>getAgents() 
List<Agent>getAgentsInQueue()
Returns list of agents that represents crane's general queue.
BoundingRectanglegetBoundingRectangle() 
OverheadCraneBridgegetBridge(int index)
Returns crane's bridge with specified index.
doublegetBridgeDistanceTo(OverheadCraneBridge bridge, Point p, LengthUnits units) 
PositiongetBridgePosition(OverheadCraneBridge bridge) 
CraneProgramgetBridgeProgram(OverheadCraneBridge bridge) 
List<OverheadCraneBridge>getBridges()
Returns unmodifiable list of crane's bridges.
List<OverheadCraneBridge>getBridgesOnRouteTo(OverheadCraneBridge bridge, Point p) 
doublegetBridgeWidth()
Returns width of the bridge in pixels
doublegetBridgeWidth(LengthUnits units)
Returns bridge width in specified units.
ColorgetColor()
Returns the color of hook and crane's rails for OVERHEAD_CRANE_BRIDGE crane type
doublegetCraneHeight()
Returns the crane's height in pixels.
doublegetCraneHeight(LengthUnits units)
Returns the crane's height in the specified length units.
doublegetCraneWidth()
Returns the width of the crane in pixels.
doublegetCraneWidth(LengthUnits units)
Returns the width of the crane specified units.
doublegetCurrentBridgeOffset(OverheadCraneBridge bridge, LengthUnits units) 
doublegetCurrentHookOffset(OverheadCraneBridge bridge, LengthUnits units) 
PointgetCurrentHookPosition() 
PointgetCurrentHookPosition(OverheadCraneBridge bridge) 
doublegetCurrentTrolleyOffset(OverheadCraneBridge bridge, LengthUnits units) 
BridgeDirectiongetDirection(OverheadCraneBridge bridge) 
IDowntime<?>[]getDowntimeBlocks() 
OverheadCraneGirderDrawingTypegetGirderType()
Returns the type of the crane's girder.
PositiongetHookPosition(OverheadCraneBridge bridge) 
doublegetInitialBridgePosition(LengthUnits units)
Deprecated.
the method will be removed, use OverheadCraneBridge.getInitialBridgeOffset(LengthUnits) instead
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.
doublegetInitialHookPosition(LengthUnits units)
Deprecated.
the method will be removed, use OverheadCraneBridge.getInitialHookOffset(LengthUnits) instead
doublegetInitialTrolleyPosition(LengthUnits units)
Deprecated.
the method will be removed, use OverheadCraneBridge.getInitialTrolleyOffset(LengthUnits) instead
com.anylogic.engine.markup.material_handling.IOverheadCraneDescriptor<T>getLibraryDescriptor() 
OverheadCraneMovementModegetMovementMode()
Returns the movement mode of the crane.
intgetNumberOfBridges()
Returns number of crane's bridges
doublegetPriority(OverheadCraneBridge bridge) 
List<Agent>getQueue(Crane<Agent> crane) 
doublegetRotation()
Returns rotation of the crane.
doublegetRunwayLength()
Returns runway length in pixels.
doublegetRunwayLength(LengthUnits units)
Returns runway length in specified units.
doublegetSafetyGap()
Returns the safety gap of the crane.
doublegetSafetyGap(LengthUnits units)
Returns the safety gap of the crane.
OverheadCraneBridgeStategetState(OverheadCraneBridge bridge) 
doublegetStatisticsStartTime() 
PointgetTargetPoint(OverheadCraneBridge bridge) 
ColorgetTrolleyColor()
Returns the color of the crane's trolley
PositiongetTrolleyPosition(OverheadCraneBridge bridge) 
OverheadCraneDrawingTypegetType()
Returns the crane's type.
doublegetUtilization()
Returns the crane utilization: the value is calculated as mean of crane's bridges utilization.
doublegetUtilization(OverheadCraneBridge overheadCraneBridge) 
doublehoistSpeed(T agent, boolean isLoaded, SpeedUnits units)
Returns the hoist speed specified by the parameter value of this crane in specified units.
booleanisAccelerationEnabled()
Returns value of parameter isAccelerationEnabled.
booleanisFailed()
Returns true if the crane is failed and false otherwise.
booleanisFailed(OverheadCraneBridge overheadCraneBridge) 
booleanisLoaded() 
booleanisLoaded(OverheadCraneBridge overheadCraneBridge) 
booleanisObstacle()
Returns true if this crane is considered an obstacle by transporters moving in free space mode.
booleanisReady()
Returns true if the crane is ready to work with new agent and false otherwise.
booleanisReady(OverheadCraneBridge overheadCraneBridge) 
voidmoveBridge(OverheadCraneBridge bridge, Point absolutePoint, double safeHeight, boolean remainsAtTarget) 
voidmoveBridgeByProgram(OverheadCraneBridge bridge, CraneProgram program) 
intnumberOfAgentsHandled()
Returns number of agents handled by crane: the value is calculated as sum per crane's bridges.
intnumberOfAgentsHandled(OverheadCraneBridge bridge) 
intnumberOfConflicts(OverheadCraneBridge bridge) 
voidonBridgeMovementFinished(OverheadCraneBridge bridge)
Calls the crane's onBridgeMovementFinished() callback code
voidonBridgeStateChange(T agent, OverheadCraneBridge bridge, OverheadCraneBridgeState type)
Calls the crane's onBridgeStateChange() callback code
voidonLoading(OverheadCraneBridge bridge, T agent)
Calls crane's onLoading() callback code
voidonLoading(T agent) 
voidonRelease(OverheadCraneBridge bridge, T agent)
Calls crane's onRelease() callback code
voidonSeize(OverheadCraneBridge bridge, T agent)
Calls crane's onSeize() callback code
voidonTargetReached(OverheadCraneBridge bridge)
Calls the crane's onTargetReached() callback code
voidonUnloading(OverheadCraneBridge bridge, T agent)
Calls crane's onUnloading() callback code
voidonUnloading(T agent) 
voidrepair()
Repairs the crane from failed state
voidrepair(OverheadCraneBridge overheadCraneBridge) 
voidresetStats()
Resets statistics for all bridges.
voidresetStats(OverheadCraneBridge overheadCraneBridge) 
voidsetAccelerationEnabled(boolean value)
Sets parameter isAccelerationEnabled.
voidsetBridgeWidth(double bridgeWidth, LengthUnits units)
Sets bridge width length in specified units
voidsetColor(Color color)
Sets the specified color of hook and crane's rails for OVERHEAD_CRANE_BRIDGE crane type
voidsetCraneHeight(double craneHeight, LengthUnits units)
Sets crane height in specified units.
voidsetCraneWidth(double craneWidth, LengthUnits units)
Sets crane width in specified units.
voidsetDowtimeBlocks(IDowntime<?>[] downtimeBlocks) 
voidsetGirderType(OverheadCraneGirderDrawingType girderType)
Sets the crane's girder type
voidsetInitialBridgePosition(double bridgePosition, LengthUnits units)
Deprecated.
voidsetInitialHookPosition(double hookPosition, LengthUnits units)
Deprecated.
voidsetInitialTrolleyPosition(double trolleyPosition, LengthUnits units)
Deprecated.
voidsetLevel(Level level) 
voidsetMovementMode(OverheadCraneMovementMode movementMode)
Sets movement mode.
voidsetObstacle(boolean isObstacle)
Sets this crane as an obstacle for transporters moving in free space mode.
voidsetRotation(double rotation)
Sets rotation of crane
voidsetRunwayLength(double length, LengthUnits units)
Sets runway length in specified units
voidsetSafetyGap(double safetyGap, LengthUnits units)
Sets the value for the safety gap of the crane.
voidsetTrolleyColor(Color trolleyColor)
Sets the specified color of the crane's trolley
voidsetType(OverheadCraneDrawingType type)
Sets the crane's type
doubletimeInState(OverheadCraneBridge bridge, OverheadCraneBridgeState state, TimeUnits units) 
doubletotalDistanceInConflict(OverheadCraneBridge bridge, LengthUnits units) 
doubletotalTimeInConflicts(OverheadCraneBridge bridge, TimeUnits units) 
doubletotalTransportationDistance(OverheadCraneBridge bridge, LengthUnits units) 
doubletotalTravelledDistance(OverheadCraneBridge bridge, LengthUnits units) 
doubletotalTravellingTime(OverheadCraneBridge bridge, TimeUnits units) 
doubletrolleyAcceleration(T agent, boolean isLoaded, AccelerationUnits units)
Returns the trolley acceleration specified by the parameter value of this crane in the specified units.
doubletrolleyDeceleration(T agent, boolean isLoaded, AccelerationUnits units)
Returns the trolley deceleration specified by the parameter value of this crane in the specified units.
doubletrolleySpeed(T agent, boolean isLoaded, SpeedUnits units)
Returns the trolley speed specified by the parameter value of this crane in specified units.
voidupdateDynamicProperties()
Updates dynamic properties of this shape only (without structural contents, if any) in a given context.
Method should be overridden for shapes with dynamic properties.
voidvalidateInitialPosition(OverheadCraneBridge bridge, double offsetM) 

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, getLevel

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

error, getFullName, getOutsideLevelZ, getPresentable, getSpace, initialize, isClickHandled, 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.SVGElement

executeUserAction, findSVGElement, getSVGId, removeSVGFromOwner, resetSVGState, updateSVGProperties

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

getOrGenerateUSDId

Constructor Details

OverheadCrane

public OverheadCrane()
Creates new OverheadCrane with 1 bridge. Bridges may be added by addBridge(OverheadCraneBridge). Default bridge may be accessed by getBridges(). Crane and its bridges may be modified until crane's initialization. Initial state of the crane will be verified on first attempt to use the crane.

OverheadCrane

@AnyLogicInternalCodegenAPI
public OverheadCrane(Agent owner,
 ShapeDrawMode drawMode,
 boolean isPublic,
 boolean isObstacle,
 com.anylogic.engine.markup.material_handling.IOverheadCraneDescriptor<T> descriptor,
 double x,
 double y,
 double z,
 double rotation,
 double runwayLengthMeters,
 double craneWidthMeters,
 double craneHeightMeters,
 double bridgeWidthMeters,
 double safetyGap,
 Color color,
 Color trolleyColor,
 OverheadCraneDrawingType type,
 OverheadCraneGirderDrawingType girderType,
 OverheadCraneBridge... bridges)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. It is public due to technical reasons.

Method Details

setLevel

public void setLevel(Level level)
Specified by:
setLevel in interface LevelElement
Overrides:
setLevel in class AbstractLevelMarkup

getAgents

public List<Agent> getAgents()

addBridge

public void addBridge(OverheadCraneBridge bridge)
The method adds bridge to crane. Use this method only to create OverheadCrane by code. NB: bridges may be modified until initialization of the crane.

getAgentsInQueue

public List<Agent> getAgentsInQueue()
Returns list of agents that represents crane's general 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 crane's general queue.

onBridgeMovementFinished

public void onBridgeMovementFinished(OverheadCraneBridge bridge)
Calls the crane's onBridgeMovementFinished() callback code

onTargetReached

public void onTargetReached(OverheadCraneBridge bridge)
Calls the crane's onTargetReached() callback code

onBridgeStateChange

public void onBridgeStateChange(T agent,
 OverheadCraneBridge bridge,
 OverheadCraneBridgeState type)
Calls the crane's onBridgeStateChange() callback code

getState

@AnyLogicInternalAPI
public OverheadCraneBridgeState getState(OverheadCraneBridge bridge)

getTargetPoint

@AnyLogicInternalAPI
public Point getTargetPoint(OverheadCraneBridge bridge)

getAgent

@AnyLogicInternalAPI
public Agent getAgent(OverheadCraneBridge bridge)

getPriority

@AnyLogicInternalAPI
public double getPriority(OverheadCraneBridge bridge)

getDirection

@AnyLogicInternalAPI
public BridgeDirection getDirection(OverheadCraneBridge bridge)

getBridgeDistanceTo

@AnyLogicInternalAPI
public double getBridgeDistanceTo(OverheadCraneBridge bridge,
 Point p,
 LengthUnits units)

getBridgesOnRouteTo

@AnyLogicInternalAPI
public List<OverheadCraneBridge> getBridgesOnRouteTo(OverheadCraneBridge bridge,
 Point p)

getQueue

@AnyLogicInternalAPI
public List<Agent> getQueue(Crane<Agent> crane)

getCurrentBridgeOffset

@AnyLogicInternalAPI
public double getCurrentBridgeOffset(OverheadCraneBridge bridge,
 LengthUnits units)

getCurrentTrolleyOffset

@AnyLogicInternalAPI
public double getCurrentTrolleyOffset(OverheadCraneBridge bridge,
 LengthUnits units)

getCurrentHookOffset

@AnyLogicInternalAPI
public double getCurrentHookOffset(OverheadCraneBridge bridge,
 LengthUnits units)

attachAgentAnimation

@AnyLogicInternalAPI
public void attachAgentAnimation(OverheadCraneBridge bridge,
 T agent)

detachAgentAnimation

@AnyLogicInternalAPI
public void detachAgentAnimation(OverheadCraneBridge bridge)

getHookPosition

@AnyLogicInternalAPI
public Position getHookPosition(OverheadCraneBridge bridge)

getBridgePosition

@AnyLogicInternalAPI
public Position getBridgePosition(OverheadCraneBridge bridge)

getTrolleyPosition

@AnyLogicInternalAPI
public Position getTrolleyPosition(OverheadCraneBridge bridge)

getInitialTrolleyPosition

public double getInitialTrolleyPosition(LengthUnits units)
Deprecated.
the method will be removed, use OverheadCraneBridge.getInitialTrolleyOffset(LengthUnits) instead
Returns the initial offset of the crane's trolley in the specified length units.
Parameters:
units - - a constant defining the length units
Returns:
the initial offset of the crane's trolley in the specified length units.

getInitialHookPosition

public double getInitialHookPosition(LengthUnits units)
Deprecated.
the method will be removed, use OverheadCraneBridge.getInitialHookOffset(LengthUnits) instead
Returns the initial offset of the crane's hook in the specified length units.
Parameters:
units - - a constant defining the length units
Returns:
the initial offset of the crane's hook in the specified length units.

getInitialBridgePosition

public double getInitialBridgePosition(LengthUnits units)
Deprecated.
the method will be removed, use OverheadCraneBridge.getInitialBridgeOffset(LengthUnits) instead
Returns the initial offset of the crane's bridge in the specified length units.
Parameters:
units - - a constant defining the length units
Returns:
the initial offset of the crane's bridge in the specified length units.

setInitialHookPosition

public void setInitialHookPosition(double hookPosition,
 LengthUnits units)
Deprecated.
Sets the initial hook height in the specified length units.
Parameters:
hookPosition - - the new height of the crane's hook
units - - a constant defining the length units

setInitialBridgePosition

public void setInitialBridgePosition(double bridgePosition,
 LengthUnits units)
Deprecated.
Sets the initial bridge position in the specified length units.
Parameters:
bridgePosition - - the new position of the bridge
units - - a constant defining the length units

setInitialTrolleyPosition

public void setInitialTrolleyPosition(double trolleyPosition,
 LengthUnits units)
Deprecated.
Sets the initial trolley position in the specified length units.
Parameters:
trolleyPosition - - the new position of the crane's trolley
units - - a constant defining the length units

canArriveAt

@AnyLogicInternalAPI
public boolean canArriveAt(OverheadCraneBridge bridge,
 Point hookDestination)

updateDynamicProperties

@AnyLogicInternalCodegenAPI
public void updateDynamicProperties()
Description copied from class: AbstractMarkup
Updates dynamic properties of this shape only (without structural contents, if any) in a given context.
Method should be overridden for shapes with dynamic properties. Note that you should call super.updateDynamicProperties() at the end of overridden method
Overrides:
updateDynamicProperties in class AbstractMarkup

isReady

@AnyLogicInternalAPI
public boolean isReady()
Description copied from class: Crane
Returns true if the crane is ready to work with new agent and false otherwise.
Specified by:
isReady in class Crane<T extends Agent>
Returns:
true if the crane is ready to work with new agent and false otherwise

onLoading

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

onLoading

public void onLoading(OverheadCraneBridge bridge,
 T agent)
Calls crane's onLoading() callback code

onUnloading

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

onUnloading

public void onUnloading(OverheadCraneBridge bridge,
 T agent)
Calls crane's onUnloading() callback code

onRelease

public void onRelease(OverheadCraneBridge bridge,
 T agent)
Calls crane's onRelease() callback code

onSeize

public void onSeize(OverheadCraneBridge bridge,
 T agent)
Calls crane's onSeize() callback code

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

resetStats

@AnyLogicInternalAPI
public void resetStats(OverheadCraneBridge overheadCraneBridge)

getUtilization

@AnyLogicInternalAPI
public double getUtilization(OverheadCraneBridge overheadCraneBridge)

isFailed

@AnyLogicInternalAPI
public boolean isFailed()
Description copied from class: Crane
Returns true if the 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 crane is failed and false otherwise

fail

@AnyLogicInternalAPI
public void fail()
Description copied from class: Crane
Sets the 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

@AnyLogicInternalAPI
public void repair()
Description copied from class: Crane
Repairs the 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

@AnyLogicInternalAPI
public boolean isFailed(OverheadCraneBridge overheadCraneBridge)

isReady

@AnyLogicInternalAPI
public boolean isReady(OverheadCraneBridge overheadCraneBridge)

fail

@AnyLogicInternalAPI
public void fail(OverheadCraneBridge overheadCraneBridge)

repair

@AnyLogicInternalAPI
public void repair(OverheadCraneBridge overheadCraneBridge)

isLoaded

@AnyLogicInternalAPI
public boolean isLoaded(OverheadCraneBridge overheadCraneBridge)

getAbsoluteHookPosition

public Position getAbsoluteHookPosition(OverheadCraneBridge overheadCraneBridge)
Returns the current absolute hook position of the specified bridge as an instance of Position in pixels. Position.rotation contains the rotation of crane.
Parameters:
overheadCraneBridge - specified bridge
Returns:
current absolute hook point in pixels with the rotation angle as Position.rotation

moveBridge

@AnyLogicInternalAPI
public void moveBridge(OverheadCraneBridge bridge,
 Point absolutePoint,
 double safeHeight,
 boolean remainsAtTarget)

moveBridgeByProgram

@AnyLogicInternalAPI
public void moveBridgeByProgram(OverheadCraneBridge bridge,
 CraneProgram program)

getBridgeProgram

@AnyLogicInternalAPI
public CraneProgram getBridgeProgram(OverheadCraneBridge bridge)

numberOfAgentsHandled

@AnyLogicInternalAPI
public int numberOfAgentsHandled(OverheadCraneBridge bridge)

numberOfConflicts

@AnyLogicInternalAPI
public int numberOfConflicts(OverheadCraneBridge bridge)

totalTravelledDistance

@AnyLogicInternalAPI
public double totalTravelledDistance(OverheadCraneBridge bridge,
 LengthUnits units)

totalTransportationDistance

@AnyLogicInternalAPI
public double totalTransportationDistance(OverheadCraneBridge bridge,
 LengthUnits units)

totalDistanceInConflict

@AnyLogicInternalAPI
public double totalDistanceInConflict(OverheadCraneBridge bridge,
 LengthUnits units)

totalTravellingTime

@AnyLogicInternalAPI
public double totalTravellingTime(OverheadCraneBridge bridge,
 TimeUnits units)

averageCycleTime

@AnyLogicInternalAPI
public double averageCycleTime(OverheadCraneBridge bridge,
 TimeUnits units)

timeInState

@AnyLogicInternalAPI
public double timeInState(OverheadCraneBridge bridge,
 OverheadCraneBridgeState state,
 TimeUnits units)

totalTimeInConflicts

@AnyLogicInternalAPI
public double totalTimeInConflicts(OverheadCraneBridge bridge,
 TimeUnits units)

getLibraryDescriptor

@AnyLogicInternalAPI
public com.anylogic.engine.markup.material_handling.IOverheadCraneDescriptor<T> getLibraryDescriptor()

getMovementMode

public OverheadCraneMovementMode getMovementMode()
Returns the movement mode of the crane. See OverheadCraneMovementMode
Returns:
the movement mode of the crane

getType

public OverheadCraneDrawingType getType()
Returns the crane's type. See OverheadCraneDrawingType
Returns:
the crane's type

getGirderType

public OverheadCraneGirderDrawingType getGirderType()
Returns the type of the crane's girder. See OverheadCraneGirderDrawingType
Returns:
the crane's type

getColor

public Color getColor()
Returns the color of hook and crane's rails for OVERHEAD_CRANE_BRIDGE crane type
Returns:
the color of hook and crane's rails for OVERHEAD_CRANE_BRIDGE crane type

setColor

public void setColor(Color color)
Sets the specified color of hook and crane's rails for OVERHEAD_CRANE_BRIDGE crane type
Parameters:
color - - specified color of of hook and crane's rails for OVERHEAD_CRANE_BRIDGE crane type

getTrolleyColor

public Color getTrolleyColor()
Returns the color of the crane's trolley
Returns:
color of the crane's trolley

setTrolleyColor

public void setTrolleyColor(Color trolleyColor)
Sets the specified color of the crane's trolley
Parameters:
trolleyColor - - specified color. Use null to hide the trolley.

setType

public void setType(OverheadCraneDrawingType type)
Sets the crane's type
Parameters:
type - - see OverheadCraneDrawingType

setGirderType

public void setGirderType(OverheadCraneGirderDrawingType girderType)
Sets the crane's girder type
Parameters:
girderType - - see OverheadCraneGirderDrawingType

getRotation

public double getRotation()
Returns rotation of the crane.
Specified by:
getRotation in interface AbstractPositionalMarkup
Returns:
rotation of the crane

getCraneWidth

public double getCraneWidth()
Returns the width of the crane in pixels.
Returns:
the width of the crane in pixels

getCraneWidth

public double getCraneWidth(LengthUnits units)
Returns the width of the crane specified units.
Parameters:
units - - constant value that specifies units
Returns:
the width of the crane

setCraneWidth

public void setCraneWidth(double craneWidth,
 LengthUnits units)
Sets crane width in specified units.
Parameters:
craneWidth - - the width of the crane
units - - constant value that specifies units

setCraneHeight

public void setCraneHeight(double craneHeight,
 LengthUnits units)
Sets crane height in specified units.
Parameters:
craneHeight - - the height of the crane
units - - constant value that specifies units

getRunwayLength

public double getRunwayLength()
Returns runway length in pixels.
Returns:
runway length in pixels

getRunwayLength

public double getRunwayLength(LengthUnits units)
Returns runway length in specified units.
Parameters:
units - - a constant defining the length units
Returns:
runway length in specified units

setRunwayLength

public void setRunwayLength(double length,
 LengthUnits units)
Sets runway length in specified units
Parameters:
length - - length value
units - - a constant defining the length units

setRotation

public void setRotation(double rotation)
Sets rotation of crane
Parameters:
rotation - - angle in radians

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

getBridges

public List<OverheadCraneBridge> getBridges()
Returns unmodifiable list of crane's bridges. Note: list will be sorted (and bridge's indexes will be setted) by MarkupShape.initialize() method. You may determine order of bridges via their parking position before call of MarkupShape.initialize() method. Afterwards order is unmodifiable.
Returns:
unmodifiable list of crane's bridges.

getNumberOfBridges

public int getNumberOfBridges()
Returns number of crane's bridges
Returns:
number of crane's bridges

getBridge

public OverheadCraneBridge getBridge(int index)
Returns crane's bridge with specified index.
Parameters:
index - - index of bridge. An integer value from 0 to numberOfBridges - 1 Indexes are setted by MarkupShape.initialize() method in order of increasing bridge's offset (from left to right for crane with zero rotation). Indexes may not be changed afterwards. You may get bridge index via OverheadCraneBridge.getIndex() method
Returns:
crane's bridge with specified index.

getBridgeWidth

public double getBridgeWidth()
Returns width of the bridge in pixels
Returns:
bridge width in pixels

getBridgeWidth

public double getBridgeWidth(LengthUnits units)
Returns bridge width in specified units.
Parameters:
units - - a constant defining the length units
Returns:
bridge width in specified units

setBridgeWidth

public void setBridgeWidth(double bridgeWidth,
 LengthUnits units)
Sets bridge width length in specified units
Parameters:
bridgeWidth - - width value
units - - a constant defining the length units

getSafetyGap

public double getSafetyGap()
Returns the safety gap of the crane. At any given time two bridges have to be at least one safety gap apart.
Returns:
the safety gap of the crane

getSafetyGap

public double getSafetyGap(LengthUnits units)
Returns the safety gap of the crane. At any given time two bridges have to be at least one safety gap apart.
Parameters:
units - - a constant defining the length units
Returns:
the safety gap of the crane

setSafetyGap

public void setSafetyGap(double safetyGap,
 LengthUnits units)
Sets the value for the safety gap of the crane. At any given time two bridges have to be at least one safety gap apart.
Parameters:
safetyGap - - safety gap value
units - - a constant defining the length units

getCurrentHookPosition

@AnyLogicInternalAPI
public Point getCurrentHookPosition()

getCurrentHookPosition

@AnyLogicInternalAPI
public Point getCurrentHookPosition(OverheadCraneBridge bridge)

getAbsoluteHookPosition

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

setAccelerationEnabled

public void setAccelerationEnabled(boolean value)
Sets parameter isAccelerationEnabled. If the value is true than crane will move with specified accelerations.
Parameters:
value - - boolean value to be setted to parameter isAccelerationEnabled

trolleySpeed

public double trolleySpeed(T agent,
 boolean isLoaded,
 SpeedUnits units)
Returns the trolley speed specified by the parameter value of this crane in specified units. Note that this value does not correspond to the actual trolley speed if the carried agent is currently in the MoveByCrane block which has useOperationTime option enabled.
Parameters:
agent - - the item that the crane is going to move. It is null when the crane moves without load.
isLoaded - - a flag that you can use to specify different values for the crane's movement with and without load.
units - - a constant defining the speed units
Returns:
trolley speed specified by the parameter value of this crane

hoistSpeed

public double hoistSpeed(T agent,
 boolean isLoaded,
 SpeedUnits units)
Returns the hoist speed specified by the parameter value of this crane in specified units. Note that this value does not correspond to the actual hoister speed if the carried agent is currently in the MoveByCrane block which has useOperationTime option enabled.
Parameters:
agent - - the item that the crane is going to move. It is null when the crane moves without load.
isLoaded - - a flag that you can use to specify different values for the crane's movement with and without load.
units - - a constant defining the speed units
Returns:
hoist speed specified by the parameter value of this crane

bridgeSpeed

public double bridgeSpeed(T agent,
 boolean isLoaded,
 SpeedUnits units)
Returns the bridge speed specified by the parameter value of this crane in the specified units. Note that this value does not correspond to the actual bridge speed if the carried agent is currently in the MoveByCrane block which has useOperationTime option enabled.
Parameters:
agent - - the item that the crane is going to move. It is null when the crane moves without load.
isLoaded - - a flag that you can use to specify different values for the crane's movement with and without load.
units - - a constant defining the speed units
Returns:
bridge speed specified by the parameter value of this crane

setMovementMode

public void setMovementMode(OverheadCraneMovementMode movementMode)
Sets movement mode. See OverheadCraneMovementMode
Parameters:
movementMode - - constant value, specified crane's operation pattern.

trolleyDeceleration

public double trolleyDeceleration(T agent,
 boolean isLoaded,
 AccelerationUnits units)
Returns the trolley deceleration specified by the parameter value of this crane in the specified units. Note that this value does not correspond to the actual trolley deceleration if the carried agent is currently in the MoveByCrane block which has useOperationTime option enabled.
Parameters:
agent - - the item that the crane is going to move. It is null when the crane moves without load.
isLoaded - - a flag that you can use to specify different values for the crane's movement with and without load.
units - - a constant defining the acceleration units
Returns:
trolley deceleration specified by the parameter value of this crane

trolleyAcceleration

public double trolleyAcceleration(T agent,
 boolean isLoaded,
 AccelerationUnits units)
Returns the trolley acceleration specified by the parameter value of this crane in the specified units. Note that this value does not correspond to the actual trolley acceleration if the carried agent is currently in the MoveByCrane block which has useOperationTime option enabled.
Parameters:
agent - - the item that the crane is going to move. It is null when the crane moves without load.
isLoaded - - a flag that you can use to specify different values for the crane's movement with and without load.
units - - a constant defining the acceleration units
Returns:
trolley acceleration specified by the parameter value of this crane

bridgeDeceleration

public double bridgeDeceleration(T agent,
 boolean isLoaded,
 AccelerationUnits units)
Returns the bridge deceleration specified by the parameter value of this crane in the specified units. Note that this value does not correspond to the actual bridge deceleration if the carried agent is currently in the MoveByCrane block which has useOperationTime option enabled.
Parameters:
agent - - the item that the crane is going to move. It is null when the crane moves without load.
isLoaded - - a flag that you can use to specify different values for the crane's movement with and without load.
units - - a constant defining the acceleration units
Returns:
bridge deceleration specified by the parameter value of this crane

bridgeAcceleration

public double bridgeAcceleration(T agent,
 boolean isLoaded,
 AccelerationUnits units)
Returns the bridge acceleration specified by the parameter value of this crane in the specified units. Note that this value does not correspond to the actual bridge acceleration if the carried agent is currently in the MoveByCrane block which has useOperationTime option enabled.
Parameters:
agent - - the item that the crane is going to move. It is null when the crane moves without load.
isLoaded - - a flag that you can use to specify different values for the crane's movement with and without load.
units - - a constant defining the acceleration units
Returns:
bridge acceleration specified by the parameter value of this crane

validateInitialPosition

@AnyLogicInternalAPI
public void validateInitialPosition(OverheadCraneBridge bridge,
 double offsetM)

getStatisticsStartTime

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

getUtilization

public double getUtilization()
Returns the crane utilization: the value is calculated as mean of crane's bridges utilization. The returned value lies in the range [0..1].
Specified by:
getUtilization in class Crane<T extends Agent>

resetStats

public void resetStats()
Resets statistics for all bridges.
Specified by:
resetStats in class Crane<T extends Agent>

numberOfAgentsHandled

public int numberOfAgentsHandled()
Returns number of agents handled by crane: the value is calculated as sum per crane's bridges.
Returns:

setObstacle

public void setObstacle(boolean isObstacle)
Sets this crane as an obstacle for transporters moving in free space mode.
Parameters:
isObstacle - - if true, the crane is set as an obstacle. Otherwise, not.

getCraneHeight

public double getCraneHeight(LengthUnits units)
Returns the crane's height in the specified length units.
Specified by:
getCraneHeight in class Crane<T extends Agent>
Parameters:
units - - a constant defining the length units
Returns:
crane's height in the specified units

getCraneHeight

public double getCraneHeight()
Returns the crane's height in pixels.
Specified by:
getCraneHeight in class Crane<T extends Agent>
Returns:
crane's height in pixels

isLoaded

@AnyLogicInternalAPI
public boolean isLoaded()

isAccelerationEnabled

public boolean isAccelerationEnabled()
Returns value of parameter isAccelerationEnabled. If it is true, than acceleration and deceleration values will be considered.
Returns:
value of parameter isAccelerationEnabled. If it is true, than acceleration and deceleration values will be considered

getBoundingRectangle

@AnyLogicInternalAPI
public BoundingRectangle getBoundingRectangle()

isObstacle

public boolean isObstacle()
Returns true if this crane is considered an obstacle by transporters moving in free space mode. Otherwise, returns false.
Returns:
true if this crane is considered an obstacle by transporters moving in free space mode. Otherwise, returns false

getDowntimeBlocks

public IDowntime<?>[] getDowntimeBlocks()

setDowtimeBlocks

public void setDowtimeBlocks(IDowntime<?>[] downtimeBlocks)