Package com.anylogic.engine.markup
- Field Summary
- Constructor Summary
- Method Summary
- Methods inherited from class com.anylogic.engine.markup.Crane
- Methods inherited from class com.anylogic.engine.markup.AbstractLevelMarkup
- Methods inherited from class com.anylogic.engine.markup.MarkupShape
- Methods inherited from class com.anylogic.engine.markup.AbstractMarkup
- Methods inherited from class java.lang.Object
- Methods inherited from interface com.anylogic.engine.markup.AbstractPositionalMarkup
- Methods inherited from interface com.anylogic.engine.markup.AggregatableAnimationElement
- Methods inherited from interface com.anylogic.engine.presentation.SVGElement
- Methods inherited from interface com.anylogic.engine.presentation.UsdElement
- Constructor Details
- Method Details
- setLevel
- getAgents
- addBridge
- getAgentsInQueue
- onBridgeMovementFinished
- onTargetReached
- onBridgeStateChange
- getState
- getTargetPoint
- getAgent
- getPriority
- getDirection
- getBridgeDistanceTo
- getBridgesOnRouteTo
- getQueue
- getCurrentBridgeOffset
- getCurrentTrolleyOffset
- getCurrentHookOffset
- attachAgentAnimation
- detachAgentAnimation
- getHookPosition
- getBridgePosition
- getTrolleyPosition
- getInitialTrolleyPosition
- getInitialHookPosition
- getInitialBridgePosition
- setInitialHookPosition
- setInitialBridgePosition
- setInitialTrolleyPosition
- canArriveAt
- updateDynamicProperties
- isReady
- onLoading
- onLoading
- onUnloading
- onUnloading
- onRelease
- onSeize
- contains
- resetStats
- getUtilization
- isFailed
- fail
- repair
- isFailed
- isReady
- fail
- repair
- isLoaded
- getAbsoluteHookPosition
- moveBridge
- moveBridgeByProgram
- getBridgeProgram
- numberOfAgentsHandled
- numberOfConflicts
- totalTravelledDistance
- totalTransportationDistance
- totalDistanceInConflict
- totalTravellingTime
- averageCycleTime
- timeInState
- totalTimeInConflicts
- getLibraryDescriptor
- getMovementMode
- getType
- getGirderType
- getColor
- setColor
- getTrolleyColor
- setTrolleyColor
- setType
- setGirderType
- getRotation
- getCraneWidth
- getCraneWidth
- setCraneWidth
- setCraneHeight
- getRunwayLength
- getRunwayLength
- setRunwayLength
- setRotation
- getInitialHookPoint
- getInitialHookPoint
- getBridges
- getNumberOfBridges
- getBridge
- getBridgeWidth
- getBridgeWidth
- setBridgeWidth
- getSafetyGap
- getSafetyGap
- setSafetyGap
- getCurrentHookPosition
- getCurrentHookPosition
- getAbsoluteHookPosition
- setAccelerationEnabled
- trolleySpeed
- hoistSpeed
- bridgeSpeed
- setMovementMode
- trolleyDeceleration
- trolleyAcceleration
- bridgeDeceleration
- bridgeAcceleration
- validateInitialPosition
- getStatisticsStartTime
- getUtilization
- resetStats
- numberOfAgentsHandled
- setObstacle
- getCraneHeight
- getCraneHeight
- isLoaded
- isAccelerationEnabled
- getBoundingRectangle
- isObstacle
- getDowntimeBlocks
- setDowtimeBlocks
- java.lang.Object
- com.anylogic.engine.markup.AbstractMarkup
- com.anylogic.engine.markup.MarkupShape
- com.anylogic.engine.markup.AbstractLevelMarkup
- com.anylogic.engine.markup.Crane<T>
- com.anylogic.engine.markup.OverheadCrane<T>
- 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
Constructor | Description |
---|---|
OverheadCrane() |
Creates new OverheadCrane with 1 bridge.
|
OverheadCrane |
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. |
Modifier and Type | Method | Description |
---|---|---|
void | addBridge |
The method adds bridge to crane.
|
void | attachAgentAnimation | |
double | averageCycleTime | |
double | bridgeAcceleration |
Returns the bridge acceleration specified by the parameter value of this crane in the specified
units . |
double | bridgeDeceleration |
Returns the bridge deceleration specified by the parameter value of this crane in the specified
units . |
double | bridgeSpeed |
Returns the bridge speed specified by the parameter value of this crane in the specified
units . |
boolean | canArriveAt | |
boolean | contains |
Test if the shape contains the point with the given coordinates (relative
to this shape's container, i.e.
|
void | detachAgentAnimation | |
void | fail() |
Sets the crane to
failed state |
void | fail | |
Position | getAbsoluteHookPosition() |
Returns the current absolute hook position as an instance of
Position in pixels. |
Position | getAbsoluteHookPosition |
Returns the current absolute hook position of the specified bridge
as an instance of
Position in pixels. |
Agent | getAgent | |
List<Agent> | getAgents() | |
List<Agent> | getAgentsInQueue() |
Returns list of agents that represents crane's general queue.
|
BoundingRectangle | getBoundingRectangle() | |
OverheadCraneBridge | getBridge |
Returns crane's bridge with specified index.
|
double | getBridgeDistanceTo | |
Position | getBridgePosition | |
CraneProgram | getBridgeProgram | |
List<OverheadCraneBridge> | getBridges() |
Returns unmodifiable list of crane's bridges.
|
List<OverheadCraneBridge> | getBridgesOnRouteTo | |
double | getBridgeWidth() |
Returns width of the bridge in pixels
|
double | getBridgeWidth |
Returns bridge width in specified units.
|
Color | getColor() |
Returns the color of hook and crane's rails for
OVERHEAD_CRANE_BRIDGE crane type |
double | getCraneHeight() |
Returns the crane's height in pixels.
|
double | getCraneHeight |
Returns the crane's height in the specified length units.
|
double | getCraneWidth() |
Returns the width of the crane in pixels.
|
double | getCraneWidth |
Returns the width of the crane specified units.
|
double | getCurrentBridgeOffset | |
double | getCurrentHookOffset | |
Point | getCurrentHookPosition() | |
Point | getCurrentHookPosition | |
double | getCurrentTrolleyOffset | |
BridgeDirection | getDirection | |
IDowntime<?>[] | getDowntimeBlocks() | |
OverheadCraneGirderDrawingType | getGirderType() |
Returns the type of the crane's girder.
|
Position | getHookPosition | |
double | getInitialBridgePosition |
Deprecated.
|
Point | getInitialHookPoint() |
Returns the initial hook point in pixels, calculated according to the crane's dimensions and converted to pixels with crane's space.
|
Point | getInitialHookPoint |
Returns the initial hook point in the specified length units.
|
double | getInitialHookPosition |
Deprecated.
the method will be removed, use
OverheadCraneBridge.getInitialHookOffset(LengthUnits) instead |
double | getInitialTrolleyPosition |
Deprecated.
the method will be removed, use
OverheadCraneBridge.getInitialTrolleyOffset(LengthUnits) instead |
com.anylogic.engine.markup.material_handling.IOverheadCraneDescriptor<T> | getLibraryDescriptor() | |
OverheadCraneMovementMode | getMovementMode() |
Returns the movement mode of the crane.
|
int | getNumberOfBridges() |
Returns number of crane's bridges
|
double | getPriority | |
List<Agent> | getQueue | |
double | getRotation() |
Returns rotation of the crane.
|
double | getRunwayLength() |
Returns runway length in pixels.
|
double | getRunwayLength |
Returns runway length in specified units.
|
double | getSafetyGap() |
Returns the safety gap of the crane.
|
double | getSafetyGap |
Returns the safety gap of the crane.
|
OverheadCraneBridgeState | getState | |
double | getStatisticsStartTime() | |
Point | getTargetPoint | |
Color | getTrolleyColor() |
Returns the color of the crane's trolley
|
Position | getTrolleyPosition | |
OverheadCraneDrawingType | getType() |
Returns the crane's type.
|
double | getUtilization() |
Returns the crane utilization: the value is calculated as mean of crane's bridges utilization.
|
double | getUtilization | |
double | hoistSpeed |
Returns the hoist speed specified by the parameter value of this crane in specified
units . |
boolean | isAccelerationEnabled() |
Returns value of parameter isAccelerationEnabled.
|
boolean | isFailed() |
Returns
true if the crane is failed and false otherwise. |
boolean | isFailed | |
boolean | isLoaded() | |
boolean | isLoaded | |
boolean | isObstacle() |
Returns
true if this crane is considered an obstacle by transporters moving in free space mode. |
boolean | isReady() |
Returns
true if the crane is ready to work with new agent and false otherwise. |
boolean | isReady | |
void | moveBridge | |
void | moveBridgeByProgram | |
int | numberOfAgentsHandled() |
Returns number of agents handled by crane: the value is calculated as sum per crane's bridges.
|
int | numberOfAgentsHandled | |
int | numberOfConflicts | |
void | onBridgeMovementFinished |
Calls the crane's
onBridgeMovementFinished() callback code |
void | onBridgeStateChange |
Calls the crane's
onBridgeStateChange() callback code |
void | onLoading |
Calls crane's
onLoading() callback code |
void | onLoading | |
void | onRelease |
Calls crane's
onRelease() callback code |
void | onSeize |
Calls crane's
onSeize() callback code |
void | onTargetReached |
Calls the crane's
onTargetReached() callback code |
void | onUnloading |
Calls crane's
onUnloading() callback code |
void | onUnloading | |
void | repair() |
Repairs the crane from
failed state |
void | repair | |
void | resetStats() |
Resets statistics for all bridges.
|
void | resetStats | |
void | setAccelerationEnabled |
Sets parameter isAccelerationEnabled.
|
void | setBridgeWidth |
Sets bridge width length in specified units
|
void | setColor |
Sets the specified color of hook and crane's rails for
OVERHEAD_CRANE_BRIDGE crane type |
void | setCraneHeight |
Sets crane height in specified units.
|
void | setCraneWidth |
Sets crane width in specified units.
|
void | setDowtimeBlocks | |
void | setGirderType |
Sets the crane's girder type
|
void | setInitialBridgePosition |
Deprecated.
the method will be removed, use
OverheadCraneBridge.setInitialBridgeOffset(double, LengthUnits) |
void | setInitialHookPosition |
Deprecated.
the method will be removed, use
OverheadCraneBridge.setInitialHookOffset(double, LengthUnits) |
void | setInitialTrolleyPosition |
Deprecated.
the method will be removed, use
OverheadCraneBridge.setInitialTrolleyOffset(double, LengthUnits) |
void | setLevel | |
void | setMovementMode |
Sets movement mode.
|
void | setObstacle |
Sets this crane as an obstacle for transporters moving in free space mode.
|
void | setRotation |
Sets rotation of crane
|
void | setRunwayLength |
Sets runway length in specified units
|
void | setSafetyGap |
Sets the value for the safety gap of the crane.
|
void | setTrolleyColor |
Sets the specified color of the crane's trolley
|
void | setType |
Sets the crane's type
|
double | timeInState | |
double | totalDistanceInConflict | |
double | totalTimeInConflicts | |
double | totalTransportationDistance | |
double | totalTravelledDistance | |
double | totalTravellingTime | |
double | trolleyAcceleration |
Returns the trolley acceleration specified by the parameter value of this crane in the specified
units . |
double | trolleyDeceleration |
Returns the trolley deceleration specified by the parameter value of this crane in the specified
units . |
double | trolleySpeed |
Returns the trolley speed specified by the parameter value of this crane in specified
units . |
void | updateDynamicProperties() |
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. |
void | validateInitialPosition |
error, getFullName, getOutsideLevelZ, getPresentable, getSpace, initialize, isClickHandled, isPublic, onClick, remove, setDrawMode, setOwner
discardOwner, executeUserAction, findSVGElement, getName, getOrGenerateUSDId, getSVGId, initializeInternal, isVisible, onAggregatorInitialized, onAggregatorVisibilityChanged, removeSVGFromOwner, resetSVGState, setVisible, updateDynamicPropertiesStructural, updateSVGProperties
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.@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.
it may be removed/renamed in future. It is public due to technical reasons.
public void setLevel(Level level)
- Specified by:
setLevel
in interfaceLevelElement
- Overrides:
setLevel
in classAbstractLevelMarkup
public List<Agent> getAgents()
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.
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.
public void onBridgeMovementFinished(OverheadCraneBridge bridge)
Calls the crane's
onBridgeMovementFinished()
callback codepublic void onTargetReached(OverheadCraneBridge bridge)
Calls the crane's
onTargetReached()
callback codepublic void onBridgeStateChange(T agent, OverheadCraneBridge bridge, OverheadCraneBridgeState type)
Calls the crane's
onBridgeStateChange()
callback code@AnyLogicInternalAPI public OverheadCraneBridgeState getState(OverheadCraneBridge bridge)
@AnyLogicInternalAPI public Point getTargetPoint(OverheadCraneBridge bridge)
@AnyLogicInternalAPI public Agent getAgent(OverheadCraneBridge bridge)
@AnyLogicInternalAPI public double getPriority(OverheadCraneBridge bridge)
@AnyLogicInternalAPI public BridgeDirection getDirection(OverheadCraneBridge bridge)
@AnyLogicInternalAPI public double getBridgeDistanceTo(OverheadCraneBridge bridge, Point p, LengthUnits units)
@AnyLogicInternalAPI public List<OverheadCraneBridge> getBridgesOnRouteTo(OverheadCraneBridge bridge, Point p)
@AnyLogicInternalAPI public List<Agent> getQueue(Crane<Agent> crane)
@AnyLogicInternalAPI public double getCurrentBridgeOffset(OverheadCraneBridge bridge, LengthUnits units)
@AnyLogicInternalAPI public double getCurrentTrolleyOffset(OverheadCraneBridge bridge, LengthUnits units)
@AnyLogicInternalAPI public double getCurrentHookOffset(OverheadCraneBridge bridge, LengthUnits units)
@AnyLogicInternalAPI public void attachAgentAnimation(OverheadCraneBridge bridge, T agent)
@AnyLogicInternalAPI public void detachAgentAnimation(OverheadCraneBridge bridge)
@AnyLogicInternalAPI public Position getHookPosition(OverheadCraneBridge bridge)
@AnyLogicInternalAPI public Position getBridgePosition(OverheadCraneBridge bridge)
@AnyLogicInternalAPI public Position getTrolleyPosition(OverheadCraneBridge bridge)
public double getInitialTrolleyPosition(LengthUnits units)
Deprecated.
the method will be removed, use
OverheadCraneBridge.getInitialTrolleyOffset(LengthUnits)
insteadReturns 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.
public double getInitialHookPosition(LengthUnits units)
Deprecated.
the method will be removed, use
OverheadCraneBridge.getInitialHookOffset(LengthUnits)
insteadReturns 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.
public double getInitialBridgePosition(LengthUnits units)
Deprecated.
the method will be removed, use
OverheadCraneBridge.getInitialBridgeOffset(LengthUnits)
insteadReturns 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.
public void setInitialHookPosition(double hookPosition, LengthUnits units)
Deprecated.
the method will be removed, use
OverheadCraneBridge.setInitialHookOffset(double, LengthUnits)
Sets the initial hook height in the specified length units.
- Parameters:
hookPosition
- - the new height of the crane's hookunits
- - a constant defining the length units
public void setInitialBridgePosition(double bridgePosition, LengthUnits units)
Deprecated.
the method will be removed, use
OverheadCraneBridge.setInitialBridgeOffset(double, LengthUnits)
Sets the initial bridge position in the specified length units.
- Parameters:
bridgePosition
- - the new position of the bridgeunits
- - a constant defining the length units
public void setInitialTrolleyPosition(double trolleyPosition, LengthUnits units)
Deprecated.
the method will be removed, use
OverheadCraneBridge.setInitialTrolleyOffset(double, LengthUnits)
Sets the initial trolley position in the specified length units.
- Parameters:
trolleyPosition
- - the new position of the crane's trolleyunits
- - a constant defining the length units
@AnyLogicInternalAPI public boolean canArriveAt(OverheadCraneBridge bridge, Point hookDestination)
@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
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 classAbstractMarkup
@AnyLogicInternalAPI public boolean isReady()
Description copied from class:
Crane
Returns
true
if the crane is ready to work with new agent and false
otherwise.@AnyLogicInternalAPI public void onLoading(T agent)
public void onLoading(OverheadCraneBridge bridge, T agent)
Calls crane's
onLoading()
callback code@AnyLogicInternalAPI public void onUnloading(T agent)
- Specified by:
onUnloading
in classCrane<T extends Agent>
public void onUnloading(OverheadCraneBridge bridge, T agent)
Calls crane's
onUnloading()
callback codepublic void onRelease(OverheadCraneBridge bridge, T agent)
Calls crane's
onRelease()
callback codepublic void onSeize(OverheadCraneBridge bridge, T agent)
Calls crane's
onSeize()
callback codepublic 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 classMarkupShape
- Parameters:
px
- the x coordinate relative to this shape's containerpy
- the y coordinate relative to this shape's container- Returns:
true
if the shape contains the point with the given coordinates
@AnyLogicInternalAPI public void resetStats(OverheadCraneBridge overheadCraneBridge)
@AnyLogicInternalAPI public double getUtilization(OverheadCraneBridge overheadCraneBridge)
@AnyLogicInternalAPI public boolean isFailed()
Description copied from class:
Crane
Returns
true
if the crane is failed and false
otherwise.@AnyLogicInternalAPI public void fail()
Description copied from class:
Crane
Sets the crane to
failed
state@AnyLogicInternalAPI public void repair()
Description copied from class:
Crane
Repairs the crane from
failed
state@AnyLogicInternalAPI public boolean isFailed(OverheadCraneBridge overheadCraneBridge)
@AnyLogicInternalAPI public boolean isReady(OverheadCraneBridge overheadCraneBridge)
@AnyLogicInternalAPI public void fail(OverheadCraneBridge overheadCraneBridge)
@AnyLogicInternalAPI public void repair(OverheadCraneBridge overheadCraneBridge)
@AnyLogicInternalAPI public boolean isLoaded(OverheadCraneBridge overheadCraneBridge)
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
@AnyLogicInternalAPI public void moveBridge(OverheadCraneBridge bridge, Point absolutePoint, double safeHeight, boolean remainsAtTarget)
@AnyLogicInternalAPI public void moveBridgeByProgram(OverheadCraneBridge bridge, CraneProgram program)
@AnyLogicInternalAPI public CraneProgram getBridgeProgram(OverheadCraneBridge bridge)
@AnyLogicInternalAPI public int numberOfAgentsHandled(OverheadCraneBridge bridge)
@AnyLogicInternalAPI public int numberOfConflicts(OverheadCraneBridge bridge)
@AnyLogicInternalAPI public double totalTravelledDistance(OverheadCraneBridge bridge, LengthUnits units)
@AnyLogicInternalAPI public double totalTransportationDistance(OverheadCraneBridge bridge, LengthUnits units)
@AnyLogicInternalAPI public double totalDistanceInConflict(OverheadCraneBridge bridge, LengthUnits units)
@AnyLogicInternalAPI public double totalTravellingTime(OverheadCraneBridge bridge, TimeUnits units)
@AnyLogicInternalAPI public double averageCycleTime(OverheadCraneBridge bridge, TimeUnits units)
@AnyLogicInternalAPI public double timeInState(OverheadCraneBridge bridge, OverheadCraneBridgeState state, TimeUnits units)
@AnyLogicInternalAPI public double totalTimeInConflicts(OverheadCraneBridge bridge, TimeUnits units)
@AnyLogicInternalAPI public com.anylogic.engine.markup.material_handling.IOverheadCraneDescriptor<T> getLibraryDescriptor()
public OverheadCraneMovementMode getMovementMode()
Returns the movement mode of the crane. See
OverheadCraneMovementMode
- Returns:
- the movement mode of the crane
public OverheadCraneDrawingType getType()
Returns the crane's type. See
OverheadCraneDrawingType
- Returns:
- the crane's type
public OverheadCraneGirderDrawingType getGirderType()
Returns the type of the crane's girder. See
OverheadCraneGirderDrawingType
- Returns:
- the crane's type
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
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 forOVERHEAD_CRANE_BRIDGE
crane type
public Color getTrolleyColor()
Returns the color of the crane's trolley
- Returns:
- color of the crane's trolley
public void setTrolleyColor(Color trolleyColor)
Sets the specified color of the crane's trolley
- Parameters:
trolleyColor
- - specified color. Usenull
to hide the trolley.
public void setType(OverheadCraneDrawingType type)
Sets the crane's type
- Parameters:
type
- - seeOverheadCraneDrawingType
public void setGirderType(OverheadCraneGirderDrawingType girderType)
Sets the crane's girder type
- Parameters:
girderType
- - seeOverheadCraneGirderDrawingType
public double getRotation()
Returns rotation of the crane.
- Specified by:
getRotation
in interfaceAbstractPositionalMarkup
- Returns:
- rotation of the crane
public double getCraneWidth()
Returns the width of the crane in pixels.
- Returns:
- the width of the crane in pixels
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
public void setCraneWidth(double craneWidth, LengthUnits units)
Sets crane width in specified units.
- Parameters:
craneWidth
- - the width of the craneunits
- - constant value that specifies units
public void setCraneHeight(double craneHeight, LengthUnits units)
Sets crane height in specified units.
- Parameters:
craneHeight
- - the height of the craneunits
- - constant value that specifies units
public double getRunwayLength()
Returns runway length in pixels.
- Returns:
- runway length in pixels
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
public void setRunwayLength(double length, LengthUnits units)
Sets runway length in specified units
- Parameters:
length
- - length valueunits
- - a constant defining the length units
public void setRotation(double rotation)
Sets rotation of crane
- Parameters:
rotation
- - angle in radians
@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 classCrane<T extends Agent>
- Returns:
- initial hook point in pixels
@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 classCrane<T extends Agent>
- Parameters:
units
- - a constant defining the length units- Returns:
- initial hook point in the specified
LengthUnits
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.
public int getNumberOfBridges()
Returns number of crane's bridges
- Returns:
- number of crane's bridges
public OverheadCraneBridge getBridge(int index)
Returns crane's bridge with specified index.
- Parameters:
index
- - index of bridge. An integer value from 0 tonumberOfBridges - 1
Indexes are setted byMarkupShape.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 viaOverheadCraneBridge.getIndex()
method- Returns:
- crane's bridge with specified index.
public double getBridgeWidth()
Returns width of the bridge in pixels
- Returns:
- bridge width in pixels
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
public void setBridgeWidth(double bridgeWidth, LengthUnits units)
Sets bridge width length in specified units
- Parameters:
bridgeWidth
- - width valueunits
- - a constant defining the length units
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
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
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 valueunits
- - a constant defining the length units
@AnyLogicInternalAPI public Point getCurrentHookPosition()
@AnyLogicInternalAPI public Point getCurrentHookPosition(OverheadCraneBridge bridge)
@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 classCrane<T extends Agent>
- Returns:
- current absolute hook point in pixels with the rotation angle as
Position.rotation
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 parameterisAccelerationEnabled
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 isnull
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
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 isnull
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
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 isnull
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
public void setMovementMode(OverheadCraneMovementMode movementMode)
Sets movement mode. See
OverheadCraneMovementMode
- Parameters:
movementMode
- - constant value, specified crane's operation pattern.
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 isnull
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
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 isnull
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
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 isnull
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
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 isnull
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
@AnyLogicInternalAPI public void validateInitialPosition(OverheadCraneBridge bridge, double offsetM)
@AnyLogicInternalAPI public double getStatisticsStartTime()
- Specified by:
getStatisticsStartTime
in classCrane<T extends Agent>
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 classCrane<T extends Agent>
public void resetStats()
Resets statistics for all bridges.
- Specified by:
resetStats
in classCrane<T extends Agent>
public int numberOfAgentsHandled()
Returns number of agents handled by crane: the value is calculated as sum per crane's bridges.
- Returns:
public void setObstacle(boolean isObstacle)
Sets this crane as an obstacle for transporters moving in free space mode.
- Parameters:
isObstacle
- - iftrue
, the crane is set as an obstacle. Otherwise, not.
public double getCraneHeight(LengthUnits units)
Returns the crane's height in the specified length units.
- Specified by:
getCraneHeight
in classCrane<T extends Agent>
- Parameters:
units
- - a constant defining the length units- Returns:
- crane's height in the specified units
public double getCraneHeight()
Returns the crane's height in pixels.
- Specified by:
getCraneHeight
in classCrane<T extends Agent>
- Returns:
- crane's height in pixels
@AnyLogicInternalAPI public boolean isLoaded()
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
@AnyLogicInternalAPI public BoundingRectangle getBoundingRectangle()
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, returnsfalse
public IDowntime<?>[] getDowntimeBlocks()
public void setDowtimeBlocks(IDowntime<?>[] downtimeBlocks)
OverheadCraneBridge.getInitialBridgeOffset(LengthUnits)
instead