AnyLogic
Expand
Font size
All Implemented Interfaces:
Serializable

public final class CraneProgram
extends Object
implements Serializable
See Also:
Serialized Form

Nested Class Summary

Modifier and TypeClassDescription
static interface CraneProgram.Command 
static class CraneProgram.CommandMoveAtomic 
static class CraneProgram.CommandMoveComposite 
static enum CraneProgram.CommandType 
static class CraneProgram.CommandWait 

Constructor Summary

ConstructorDescription
CraneProgram()
Creates empty program.

Method Summary

Modifier and TypeMethodDescription
final CraneProgramappendProgram(CraneProgram program)
Appends specified program to end of this program.
CraneProgramclone() 
final CraneProgramdelay(double delayTime, TimeUnits units)
Adds command to wait without any movement for specified time.
CraneProgram.CommandgetCommandInternal(int index) 
List<CraneProgram.Command>getCommandsInternal() 
final CraneProgrammoveBridge(double offset, LengthUnits units)
Adds command to move bridge to this program.
final CraneProgrammoveComponentsConcurrently(double bridgeOffset, double trolleyOffset, double hookOffset, LengthUnits units)
Adds command to move several components simultaneously to this program.
final CraneProgrammoveHook(double offset, LengthUnits units)
Adds command to move hook to this program.
final CraneProgrammoveToPoint(Point destinationPx, double safeHeight, LengthUnits units)
Adds command to move all components to reach the specified point.
final CraneProgrammoveTrolley(double offset, LengthUnits units)
Adds command to move trolley to this program.
StringtoString() 

Methods inherited from class java.lang.Object

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

Constructor Details

CraneProgram

public CraneProgram()
Creates empty program.

Method Details

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 String toString()
Overrides:
toString in class Object

getCommandInternal

@AnyLogicInternalAPI
public CraneProgram.Command getCommandInternal(int index)

getCommandsInternal

@AnyLogicInternalAPI
public List<CraneProgram.Command> getCommandsInternal()