AnyLogic
Expand
Font size
All Implemented Interfaces:
Serializable

public class ServiceLine
extends ServiceUnit<QueuePath>
See Also:
Serialized Form

Constructor Summary

ConstructorDescription
ServiceLine(double x, double y, double dx, double dy) 
ServiceLine(double x, double y, double dx, double dy, ServiceQueueChoicePolicy queueChoicePolicy) 

Method Summary

Modifier and TypeMethodDescription
BoundingRectanglegetBoundingRectangle() 
doublegetEndX()
Returns the x coordinate of the end of the queue line
doublegetEndY()
Returns the y coordinate of the end of the queue line
doublegetEndZ()
Returns the y coordinate of the end of the queue line
doublegetForwardOrientation()
Returns the orientation (in angle radians) of this queue line
PositiongetForwardPositionByOffset(double offset, Position out)
Returns Position object with forward orientation (see getForwardOrientation()) and coordinates of the point that is located at the given offset distance from the queue line starting point.
PositiongetForwardStartPosition(Position out)
Returns Position object with start point and forward orientation
doublegetReverseOrientation()
Returns the orientation (in angle radians) opposite to this queue line orientation
PositiongetReversePositionByOffset(double offset, Position out)
Returns Position object with reverse orientation (see getReverseOrientation()) and coordinates of the point that is located at the given offset distance from the queue line starting point.
PositiongetReverseStartPosition(Position out)
Returns Position object with start point and reverse orientation
doublegetStartX()
Returns the x coordinate of the start of the queue line
doublegetStartY()
Returns the y coordinate of the start of the queue line
doublegetStartZ()
Returns the y coordinate of the start of the queue line
doublelength()
Returns length in 2D space

Methods inherited from class com.anylogic.engine.markup.AbstractMarkupSubunit

getName, getOwner

Methods inherited from class java.lang.Object

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

Constructor Details

ServiceLine

public ServiceLine(double x,
 double y,
 double dx,
 double dy)

ServiceLine

public ServiceLine(double x,
 double y,
 double dx,
 double dy,
 ServiceQueueChoicePolicy queueChoicePolicy)

Method Details

getStartX

public double getStartX()
Returns the x coordinate of the start of the queue line
Returns:
the x coordinate of the start of the queue line

getStartY

public double getStartY()
Returns the y coordinate of the start of the queue line
Returns:
the y coordinate of the start of the queue line

getStartZ

public double getStartZ()
Returns the y coordinate of the start of the queue line
Returns:
the y coordinate of the start of the queue line

getForwardOrientation

public double getForwardOrientation()
Returns the orientation (in angle radians) of this queue line
Returns:
the orientation (in angle radians) of this queue line

getEndX

public double getEndX()
Returns the x coordinate of the end of the queue line
Returns:
the x coordinate of the end of the queue line

getEndY

public double getEndY()
Returns the y coordinate of the end of the queue line
Returns:
the y coordinate of the end of the queue line

getEndZ

public double getEndZ()
Returns the y coordinate of the end of the queue line
Returns:
the y coordinate of the end of the queue line

getReverseOrientation

public double getReverseOrientation()
Returns the orientation (in angle radians) opposite to this queue line orientation
Returns:
the orientation (in angle radians) opposite to this queue line orientation

getForwardStartPosition

public Position getForwardStartPosition(Position out)
Returns Position object with start point and forward orientation
Parameters:
out - output object to write into, may be null
Returns:
line starting point with forward orientation

getReverseStartPosition

public Position getReverseStartPosition(Position out)
Returns Position object with start point and reverse orientation
Parameters:
out - output object to write into, may be null
Returns:
line starting point with reverse orientation

getForwardPositionByOffset

public Position getForwardPositionByOffset(double offset,
 Position out)
Returns Position object with forward orientation (see getForwardOrientation()) and coordinates of the point that is located at the given offset distance from the queue line starting point.
Parameters:
offset - distance to point
out - output object to write into, may be null
Returns:
position at offset with forward orientation

getReversePositionByOffset

public Position getReversePositionByOffset(double offset,
 Position out)
Returns Position object with reverse orientation (see getReverseOrientation()) and coordinates of the point that is located at the given offset distance from the queue line starting point.
Parameters:
offset - distance to point
out - output object to write into, may be null
Returns:
position at offset with reverse orientation

length

public double length()
Returns length in 2D space
Returns:

getBoundingRectangle

@AnyLogicInternalAPI
public BoundingRectangle getBoundingRectangle()
Overrides:
getBoundingRectangle in class ServiceUnit<QueuePath>