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.markup.IMaintenanceableMarkup
- Methods inherited from interface com.anylogic.engine.markup.material_handling.IMaterialMarkupLibraryDescriptor
- Methods inherited from interface com.anylogic.engine.presentation.SVGElement
- Methods inherited from interface com.anylogic.engine.presentation.UsdElement
- Constructor Details
- Method Details
- isObstacle
- setObstacle
- updateDynamicProperties
- isBlockedZoneEnabled
- isFailed
- fail
- repair
- trolleySpeed
- liftingSpeed
- rotationSpeed
- getCraneHeight
- getCraneHeight
- getJibLength
- getJibLength
- getBlockedZoneAngle
- getBlockedZoneStartAngle
- setCraneHeight
- setJibLength
- setBlockedZoneAngle
- setBlockedZoneStartAngle
- setBlockedZoneEnabled
- getTrolleySpeed
- getLiftingSpeed
- getRotationSpeed
- getStatisticsStartTime
- getUtilization
- resetStats
- getLibraryDescriptor
- contains
- setBlockedZone
- getCurrentHookPosition
- getAbsoluteHookPosition
- getInitialJibAngle
- getInitialHookPoint
- getInitialHookPoint
- getInitialHookPoint
- isReady
- onLoading
- onUnloading
- onSeize
- onRelease
- setMovementMode
- getMovementMode
- getColor
- setColor
- getCabinColor
- setCabinColor
- setInitialJibAngle
- setInitialTrolleyPosition
- setInitialHookPosition
- getInitialTrolleyPosition
- getInitialHookPosition
- getType
- setType
- getBoundingRectangle
- getState
- isLoaded
- getDowntimeBlocks
- setDowntimeBlocks
- restartMaintenanceTriggers
- startMaintenanceManually
- stopMaintenanceManually
- isMaintenanceActive
- getRotation
- 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.JibCrane<T>
- All Implemented Interfaces:
IMaintenanceable
,AbstractPositionalMarkup
,AggregatableAnimationElement
,HasLevel
,IMaintenanceableMarkup
,IMarkupLibraryDescriptor
,LevelElement
,LevelMarkup
,com.anylogic.engine.markup.material_handling.IJibCraneDescriptor<T>
,com.anylogic.engine.markup.material_handling.IMaterialFallible
,com.anylogic.engine.markup.material_handling.IMaterialMarkupLibraryDescriptor
,SVGElement
,UsdElement
,Serializable
public class JibCrane<T extends Agent> extends Crane<T> implements IMaintenanceableMarkup, com.anylogic.engine.markup.material_handling.IJibCraneDescriptor<T>, AbstractPositionalMarkup
- See Also:
- Serialized Form
Constructor | Description |
---|---|
JibCrane() | |
JibCrane |
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. |
JibCrane |
Deprecated.
|
Modifier and Type | Method | Description |
---|---|---|
boolean | contains |
Test if the shape contains the point with the given coordinates (relative
to this shape's container, i.e.
|
void | fail() |
Sets the crane to
failed state |
Position | getAbsoluteHookPosition() |
Returns the current absolute hook position as an instance of
Position in pixels. |
double | getBlockedZoneAngle |
Returns the delta angle of the crane's blocked zone.
|
double | getBlockedZoneStartAngle |
Returns the initial angle of the crane's blocked zone.
|
BoundingRectangle | getBoundingRectangle() | |
Color | getCabinColor() |
Returns the color of the crane's cabin
|
Color | getColor() |
Returns the crane's color
|
double | getCraneHeight() |
Returns the crane's height in pixels.
|
double | getCraneHeight |
Returns the crane's height in the specified length units.
|
Position | getCurrentHookPosition() |
Returns the current relative hook position as an instance of
Position in pixels. |
IDowntime<?>[] | getDowntimeBlocks() | |
Position | getInitialHookPoint() |
Returns the initial hook point in pixels, calculated according to the crane's dimensions and converted to pixels with crane's space.
|
Position | getInitialHookPoint |
Returns the initial hook point in the specified length units.
|
Position | getInitialHookPoint | |
double | getInitialHookPosition |
Returns the initial offset of the crane's hook in the specified length units.
|
double | getInitialJibAngle |
Returns the initial jib angle.
|
double | getInitialTrolleyPosition |
Returns the initial offset of the crane's trolley in the specified length units.
|
double | getJibLength() |
Returns the crane's jib length in pixels.
|
double | getJibLength |
Returns the crane's jib length in the specified length units.
|
com.anylogic.engine.markup.material_handling.IJibCraneDescriptor<T> | getLibraryDescriptor() | |
double | getLiftingSpeed |
Deprecated.
- will be deleted in the next release because the crane's motion parameters became dynamic.
|
JibCraneMovementMode | getMovementMode() |
Returns movement mode of the crane.
|
double | getRotation() |
This method shouldn't be called by user
(is public due to technical reasons) |
double | getRotationSpeed |
Deprecated.
- will be deleted in the next release because the crane's motion parameters became dynamic.
|
String | getState() | |
double | getStatisticsStartTime() | |
double | getTrolleySpeed |
Deprecated.
- will be deleted in the next release because the crane's motion parameters became dynamic.
|
JibCraneDrawingType | getType() |
Returns the type of the crane.
|
double | getUtilization() |
Returns the crane utilization: the fraction of time the crane was operating.
|
boolean | isBlockedZoneEnabled() |
Returns
true if the crane has enabled blocked zone and false otherwise. |
boolean | isFailed() |
Returns
true if the crane is failed and false otherwise. |
boolean | isLoaded() |
Returns
true if crane loaded. |
boolean | isMaintenanceActive | |
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 operate, i.e. |
double | liftingSpeed |
Returns the hoist speed specified by the parameter value of this crane in the specified
units . |
void | onLoading |
Calls the crane's
onLoading() callback code |
void | onRelease | |
void | onSeize | |
void | onUnloading |
Calls the crane's
onUnloading() callback code |
void | repair() |
Repairs the crane from
failed state |
void | resetStats() |
Resets the crane utilization statistics.
|
void | restartMaintenanceTriggers | |
double | rotationSpeed |
Returns the jib rotation speed specified by the parameter value of this crane in the specified
units . |
void | setBlockedZone |
Sets the specified blocked zone of the crane in the specified angle units.
|
void | setBlockedZoneAngle |
Sets the delta angle of the crane's blocked zone in the specified angle units and updates animation.
|
void | setBlockedZoneEnabled |
Enables the crane's blocked zone if the parameter is
true and disables if false |
void | setBlockedZoneStartAngle |
Sets the initial angle of the crane's blocked zone in the specified units and updates animation.
|
void | setCabinColor |
Sets the specified color of the crane's cabin
|
void | setColor |
Sets the specified color of the crane
|
void | setCraneHeight |
Sets the crane's height in the specified length units and updates animation.
|
void | setDowntimeBlocks | |
void | setInitialHookPosition |
Sets the initial hook position in the specified length units.
|
void | setInitialJibAngle |
Sets the initial angle of the crane's jib in the specified angle units.
|
void | setInitialTrolleyPosition |
Sets the initial offset of the crane's trolley in the specified length units.
|
void | setJibLength |
Sets the crane's jib length in the specified length units and updates animation.
|
void | setMovementMode |
Changes the movement mode on-the-go.
|
void | setObstacle |
Sets this crane as an obstacle for transporters moving in free space mode.
|
void | setType |
Sets the type of the crane.
|
void | startMaintenanceManually | |
void | stopMaintenanceManually | |
double | trolleySpeed |
Returns the trolley speed specified by the parameter value of this crane in the 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. |
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
Methods inherited from interface com.anylogic.engine.markup.material_handling.IMaterialMarkupLibraryDescriptor
getMarkup, setMarkup
public JibCrane()
@AnyLogicInternalCodegenAPI public JibCrane(Agent owner, ShapeDrawMode drawMode, boolean isPublic, boolean isObstacle, com.anylogic.engine.markup.material_handling.IJibCraneDescriptor<T> descriptor, double x, double y, double z, double jibLengthMeters, double craneHeightMeters, double jibAngleRadians, double trolleyLocationMeters, boolean blockedZoneEnabled, double blockedZoneStartAngleRadians, double blockedZoneAngleRadians, Color color, Color cabinColor, JibCraneDrawingType type)
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.
@Deprecated public JibCrane(com.anylogic.engine.markup.material_handling.IJibCraneDescriptor<T> d)
Deprecated.
This method is deprecated and will be deleted in future release. Use
JibCrane()
instead.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 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.
@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
public boolean isBlockedZoneEnabled()
Returns
true
if the crane has enabled blocked zone and false
otherwise.- Returns:
true
if the crane has enabled blocked zone andfalse
otherwise
public boolean isFailed()
Returns
true
if the crane is failed and false
otherwise.public void fail()
Sets the crane to
failed
statepublic void repair()
Repairs the crane from
failed
statepublic double trolleySpeed(T agent, boolean isLoaded, SpeedUnits units)
Returns the trolley speed specified by the parameter value of this crane in the 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.- Specified by:
trolleySpeed
in interfacecom.anylogic.engine.markup.material_handling.IJibCraneDescriptor<T extends Agent>
- 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 liftingSpeed(T agent, boolean isLoaded, SpeedUnits units)
Returns the hoist speed specified by the parameter value of this crane in the specified
units
. Note that this value does not correspond to
the actual hoist speed if carried agent is in the MoveByCrane block which has useOperationTime option enabled.- Specified by:
liftingSpeed
in interfacecom.anylogic.engine.markup.material_handling.IJibCraneDescriptor<T extends Agent>
- 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 rotationSpeed(T agent, boolean isLoaded, RotationSpeedUnits units)
Returns the jib rotation speed specified by the parameter value of this crane in the specified
units
. Note that this value does not correspond to
actual jib rotation speed if the carried agent is in the MoveByCrane block which has useOperationTime option enabled.- Specified by:
rotationSpeed
in interfacecom.anylogic.engine.markup.material_handling.IJibCraneDescriptor<T extends Agent>
- Parameters:
agent
- - the item that 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:
- jib rotation speed specified by the parameter value of this crane
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
public double getJibLength()
Returns the crane's jib length in pixels.
- Returns:
- crane's jib length in pixels
public double getJibLength(LengthUnits units)
Returns the crane's jib length in the specified length units.
- Parameters:
units
- - a constant defining the length units- Returns:
- crane's height in the specified units
public double getBlockedZoneAngle(AngleUnits units)
Returns the delta angle of the crane's blocked zone.
- Parameters:
units
- - a constant defining the angle units- Returns:
- delta angle of the crane's blocked zone in the specified units
public double getBlockedZoneStartAngle(AngleUnits units)
Returns the initial angle of the crane's blocked zone.
- Parameters:
units
- - a constant defining the angle units- Returns:
- initial angle of the crane's blocked zone in the specified units
public void setCraneHeight(double height, LengthUnits units)
Sets the crane's height in the specified length units and updates animation.
- Parameters:
height
- - the new crane's heightunits
- - a constant defining the length units
public void setJibLength(double length, LengthUnits units)
Sets the crane's jib length in the specified length units and updates animation.
- Parameters:
lenght
- - the new crane's jib lengthunits
- - a constant defining the length units
public void setBlockedZoneAngle(double angle, AngleUnits units)
Sets the delta angle of the crane's blocked zone in the specified angle units and updates animation.
- Parameters:
angle
- - the new delta angle of the crane's blocked zoneunits
- - a constant defining the angle units
public void setBlockedZoneStartAngle(double angle, AngleUnits units)
Sets the initial angle of the crane's blocked zone in the specified units and updates animation.
- Parameters:
angle
- - the new initial angle of the crane's blocked zoneunits
- - a constant defining the angle units
public void setBlockedZoneEnabled(boolean blockedZoneEnabled)
Enables the crane's blocked zone if the parameter is
true
and disables if false
@Deprecated public double getTrolleySpeed(SpeedUnits units)
Deprecated.
- will be deleted in the next release because the crane's motion parameters became dynamic. Use
trolleySpeed(Agent, boolean, SpeedUnits)
instead@Deprecated public double getLiftingSpeed(SpeedUnits units)
Deprecated.
- will be deleted in the next release because the crane's motion parameters became dynamic. Use
liftingSpeed(Agent, boolean, SpeedUnits)
instead@Deprecated public double getRotationSpeed(RotationSpeedUnits units)
Deprecated.
- will be deleted in the next release because the crane's motion parameters became dynamic. Use
#rotationSpeed(Agent, boolean, SpeedUnits)
instead@AnyLogicInternalAPI public double getStatisticsStartTime()
public 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].
public void resetStats()
Resets the crane utilization statistics.
@AnyLogicInternalAPI public com.anylogic.engine.markup.material_handling.IJibCraneDescriptor<T> getLibraryDescriptor()
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 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
public void setBlockedZone(double startAngle, double deltaAngle, AngleUnits units)
Sets the specified blocked zone of the crane in the specified angle units. Note that if the blocked zone is disabled, then it will be enabled by this method.
- Parameters:
startAngle
- - start angle of the crane's blocked zonedeltaAngle
- - delta angle of the crane's blocked zoneunits
- - a constant defining the angle units
public Position getCurrentHookPosition()
Returns the current relative hook position as an instance of
Position
in pixels. Also updates animation.
Position.rotation
contains the current jib angle.
Use it any time or if x and y equal zero.public Position getAbsoluteHookPosition()
Returns the current absolute hook position as an instance of
Position
in pixels. Also updates animation.
Position.rotation
contains the current jib angle.
Use it any time or if x and y equal zero.- Specified by:
getAbsoluteHookPosition
in classCrane<T extends Agent>
- Returns:
- current absolute hook point in pixels with the jib's angle as
Position.rotation
public double getInitialJibAngle(AngleUnits units)
Returns the initial jib angle. Angle format is [-pi, pi].
- Parameters:
units
- - a constant defining the angle units- Returns:
- initial jib angle. Angle format is [-pi, pi]
@AnyLogicInternalAPI public Position getInitialHookPoint(LengthUnits units)
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
@AnyLogicInternalAPI public Position getInitialHookPoint()
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 Position getInitialHookPoint(Function<Double, Double> meterToPx)
public boolean isReady()
Returns
true
if the crane is ready to operate, i.e. idle and not failed.public void onLoading(T agent)
Calls the crane's
onLoading()
callback codepublic void onUnloading(T agent)
Calls the crane's
onUnloading()
callback codepublic void onSeize(T agent)
public void onRelease(T agent)
public void setMovementMode(JibCraneMovementMode movementMode)
Changes the movement mode on-the-go.
public JibCraneMovementMode getMovementMode()
Returns movement mode of the crane. Possible values are: JIB_CRANE_MOVEMENT_STEP_BY_STEP, JIB_CRANE_MOVEMENT_CONCURRENT.
public Color getColor()
Returns the crane's color
- Returns:
- crane's color
public void setColor(Color color)
Sets the specified color of the crane
- Parameters:
color
- - specified color of the crane
public Color getCabinColor()
Returns the color of the crane's cabin
- Returns:
- color of the crane's cabin
public void setCabinColor(Color cabinColor)
Sets the specified color of the crane's cabin
- Parameters:
cabinColor
- - specified color. Usenull
to hide the cabin.
public void setInitialJibAngle(double angle, AngleUnits units)
Sets the initial angle of the crane's jib in the specified angle units.
- Parameters:
angle
- - the new initial angle of the crane's jibunits
- - a constant defining the angle units
public void setInitialTrolleyPosition(double trolleyPosition, LengthUnits units)
Sets the initial offset of the crane's trolley in the specified length units.
- Parameters:
trolleyPosition
- - the new offset of the crane's trolleyunits
- - a constant defining the length units
public void setInitialHookPosition(double hookPosition, LengthUnits units)
Sets the initial hook position in the specified length units.
- Parameters:
hookPosition
- - the new height of the crane's hookunits
- - a constant defining the length units
public double getInitialTrolleyPosition(LengthUnits units)
Returns the initial offset of the crane's trolley in the specified length units.
- Parameters:
units
- - a constant defining the length units
public double getInitialHookPosition(LengthUnits units)
Returns the initial offset of the crane's hook in the specified length units.
- Parameters:
units
- - a constant defining the length units
public JibCraneDrawingType getType()
Returns the type of the crane.
Possible values are:
Possible values are:
JIB_CRANE_INDUSTRIAL
JIB_CRANE_CAT_HEAD
JIB_CRANE_FLAT_TOP
- Returns:
- type of the crane
public void setType(JibCraneDrawingType type)
Sets the type of the crane.
Possible values are:
Possible values are:
JIB_CRANE_INDUSTRIAL
JIB_CRANE_CAT_HEAD
JIB_CRANE_FLAT_TOP
- Parameters:
type
- - crane's type
@AnyLogicInternalAPI public BoundingRectangle getBoundingRectangle()
@AnyLogicInternalLibraryAPI public String getState()
public boolean isLoaded()
Returns
true
if crane loaded. Crane is loaded after loading process finished and until unloading finished.public IDowntime<?>[] getDowntimeBlocks()
- Specified by:
getDowntimeBlocks
in interfaceIMaintenanceableMarkup
public void setDowntimeBlocks(IDowntime<?>[] downtimeBlocks)
@AnyLogicInternalAPI public void restartMaintenanceTriggers(IDowntime<?> block)
- Specified by:
restartMaintenanceTriggers
in interfaceIMaintenanceableMarkup
@AnyLogicInternalAPI public void startMaintenanceManually(IDowntime<?> block)
- Specified by:
startMaintenanceManually
in interfaceIMaintenanceableMarkup
@AnyLogicInternalAPI public void stopMaintenanceManually(IDowntime<?> block)
- Specified by:
stopMaintenanceManually
in interfaceIMaintenanceableMarkup
@AnyLogicInternalAPI public boolean isMaintenanceActive(IDowntime<?> block)
- Specified by:
isMaintenanceActive
in interfaceIMaintenanceableMarkup
@AnyLogicInternalAPI public double getRotation()
This method shouldn't be called by user
(is public due to technical reasons)
(is public due to technical reasons)
- Specified by:
getRotation
in interfaceAbstractPositionalMarkup
- Returns:
- Always 0