Package com.anylogic.engine.markup
- java.lang.Object
- com.anylogic.engine.markup.CraneProgram
- All Implemented Interfaces:
Serializable
public final class CraneProgram extends Object implements Serializable
- See Also:
- Serialized Form
Modifier and Type | Class | Description |
---|---|---|
static interface | CraneProgram.Command | |
static class | CraneProgram.CommandMoveAtomic | |
static class | CraneProgram.CommandMoveComposite | |
static enum | CraneProgram.CommandType | |
static class | CraneProgram.CommandWait |
Constructor | Description |
---|---|
CraneProgram() |
Creates empty program.
|
Modifier and Type | Method | Description |
---|---|---|
final CraneProgram | appendProgram |
Appends specified program to end of this program.
|
CraneProgram | clone() | |
final CraneProgram | delay |
Adds command to wait without any movement for specified time.
|
CraneProgram.Command | getCommandInternal | |
List<CraneProgram.Command> | getCommandsInternal() | |
final CraneProgram | moveBridge |
Adds command to move bridge to
this program. |
final CraneProgram | moveComponentsConcurrently |
Adds command to move several components simultaneously to
this program. |
final CraneProgram | moveHook |
Adds command to move hook to
this program. |
final CraneProgram | moveToPoint |
Adds command to move all components to reach the specified point.
|
final CraneProgram | moveTrolley |
Adds command to move trolley to
this program. |
String | toString() |
public CraneProgram()
Creates empty program.
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 negativeunits
- - length units of offset- Returns:
- this program
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 negativeunits
- - length units of offset- Returns:
- this program
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 negativeunits
- - length units of offset- Returns:
- this program
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 negativetrolleyOffset
- - offset to move trolley from current position, may be negativehookOffset
- - offset to move hook from current position, may be negativeunits
- - length units of offsets- Returns:
- this program
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 pixelssafeHeight
- - 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
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 0units
- - time units- Returns:
- this program
public final CraneProgram appendProgram(CraneProgram program)
Appends specified program to end of this program. Returns
this
.- Parameters:
program
- - CraneProgram to append- Returns:
- this program
public CraneProgram clone()
public String toString()
@AnyLogicInternalAPI public CraneProgram.Command getCommandInternal(int index)
@AnyLogicInternalAPI public List<CraneProgram.Command> getCommandsInternal()