AnyLogic
Expand
Font size
  • java.lang.Object
    • com.anylogic.engine.markup.CraneProgram
All Implemented Interfaces:
java.io.Serializable

public final class CraneProgram
extends java.lang.Object
implements java.io.Serializable
See Also:
Serialized Form

Nested Class Summary

Nested Classes 
static interface  CraneProgram.Command  
static class  CraneProgram.CommandMoveAtomic  
static class  CraneProgram.CommandMoveComposite  
static class  CraneProgram.CommandType  
static class  CraneProgram.CommandWait  
Modifier and Type Class Description

Constructor Summary

Constructors 
CraneProgram()
Creates empty program.
Constructor Description

Method Summary

All Methods Instance Methods Concrete Methods 
CraneProgram appendProgram​(CraneProgram program)
Appends specified program to end of this program.
CraneProgram clone()  
CraneProgram delay​(double delayTime, TimeUnits units)
Adds command to wait without any movement for specified time.
CraneProgram.Command getCommandInternal​(int index)  
java.util.List<CraneProgram.Command> getCommandsInternal()  
CraneProgram moveBridge​(double offset, LengthUnits units)
Adds command to move bridge to this program.
CraneProgram moveComponentsConcurrently​(double bridgeOffset, double trolleyOffset, double hookOffset, LengthUnits units)
Adds command to move several components simultaneously to this program.
CraneProgram moveHook​(double offset, LengthUnits units)
Adds command to move hook to this program.
CraneProgram moveToPoint​(Point destinationPx, double safeHeight, LengthUnits units)
Adds command to move all components to reach the specified point.
CraneProgram moveTrolley​(double offset, LengthUnits units)
Adds command to move trolley to this program.
java.lang.String toString()  
Modifier and Type Method Description

Methods inherited from class java.lang.Object

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

Constructor Detail

CraneProgram

public CraneProgram()
Creates empty program.

Method Detail

moveBridge

public final CraneProgram moveBridge​(double offset,
                                     LengthUnits units)
Adds command to move bridge to this program. Returns this.
Parameters:
offset - - offset to move bridge from current position, may be negative
units - - length units of offset
Returns:
this program

moveTrolley

public final CraneProgram moveTrolley​(double offset,
                                      LengthUnits units)
Adds command to move trolley to this program. Returns this.
Parameters:
offset - - offset to move trolley from current position, may be negative
units - - length units of offset
Returns:
this program

moveHook

public final CraneProgram moveHook​(double offset,
                                   LengthUnits units)
Adds command to move hook to this program. Returns this.
Parameters:
offset - - offset to move hook from current position, may be negative
units - - length units of offset
Returns:
this program

moveComponentsConcurrently

public final CraneProgram moveComponentsConcurrently​(double bridgeOffset,
                                                     double trolleyOffset,
                                                     double hookOffset,
                                                     LengthUnits units)
Adds command to move several components simultaneously to this program. The program will proceed to the next command after all components finishes their movement. Returns this.
Parameters:
bridgeOffset - - offset to move bridge from current position, may be negative
trolleyOffset - - offset to move trolley from current position, may be negative
hookOffset - - offset to move hook from current position, may be negative
units - - length units of offsets
Returns:
this program

moveToPoint

public final CraneProgram moveToPoint​(Point destinationPx,
                                      double safeHeight,
                                      LengthUnits units)
Adds command to move all components to reach the specified point. The point should be accessible. The movement considers safe height and will be performed according to the OverheadCraneMovementMode. Returns this.
Parameters:
destinationPx - - destination point in pixels
safeHeight - - safe height to be considered by crane during movement. May be negative. If bridge has attached agent, agent's height will be considered automatically.
units - - units of safe height
Returns:
this program

delay

public final CraneProgram delay​(double delayTime,
                                TimeUnits units)
Adds command to wait without any movement for specified time. Returns this.
Parameters:
delayTime - - time to wait, should be greater than 0
units - - time units
Returns:
this program

appendProgram

public final CraneProgram appendProgram​(CraneProgram program)
Appends specified program to end of this program. Returns this.
Parameters:
program - - CraneProgram to append
Returns:
this program

clone

public CraneProgram clone()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getCommandInternal

@AnyLogicInternalAPI
public CraneProgram.Command getCommandInternal​(int index)

getCommandsInternal

@AnyLogicInternalAPI
public java.util.List<CraneProgram.Command> getCommandsInternal()
How can we improve this article?