AnyLogic AnyLogic
Expand
Font size
All Implemented Interfaces:
java.io.Serializable

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

Constructor Summary

Constructors 
ServiceLine​(double x, double y, double dx, double dy)  
ServiceLine​(double x, double y, double dx, double dy, ServiceQueueChoicePolicy queueChoicePolicy)  
Constructor Description

Method Summary

All Methods Instance Methods Concrete Methods 
BoundingRectangle getBoundingRectangle()  
double getEndX()
Returns the x coordinate of the end of the queue line
double getEndY()
Returns the y coordinate of the end of the queue line
double getEndZ()
Returns the y coordinate of the end of the queue line
double getForwardOrientation()
Returns the orientation (in angle radians) of this queue line
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.
Position getForwardStartPosition​(Position out)
Returns Position object with start point and forward orientation
double getReverseOrientation()
Returns the orientation (in angle radians) opposite to this queue line orientation
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.
Position getReverseStartPosition​(Position out)
Returns Position object with start point and reverse orientation
double getStartX()
Returns the x coordinate of the start of the queue line
double getStartY()
Returns the y coordinate of the start of the queue line
double getStartZ()
Returns the y coordinate of the start of the queue line
double length()
Returns length in 2D space
Modifier and Type Method Description

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

customSelectQueue, getClosestQueue, getClosestQueueNotEmpty, getColor, getCustomQueueChoicePolicy, getLongestQueue, isSuspended, queuePriority, setColor, setSuspended

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 Detail

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 Detail

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>
How can we improve this article?