Package com.anylogic.engine.markup
- java.lang.Object
-
- com.anylogic.engine.markup.AbstractMarkupSubunit<ServiceBase<?,Q>>
-
- com.anylogic.engine.markup.ServiceUnit<Q>
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
ServiceLine
,ServicePoint
public abstract class ServiceUnit<Q extends QueueUnit> extends AbstractMarkupSubunit<ServiceBase<?,Q>>
Base class for service units which are used in Service space markup elements
- Author:
- AnyLogic North America, LLC https://anylogic.com
- See Also:
- Serialized Form
Q |
customSelectQueue() |
This method should be overridden to return queue in
CUSTOM queue choice policy |
BoundingRectangle |
getBoundingRectangle() |
|
Q |
getClosestQueue() |
Returns the queue that is the closest to the service, no matter whether it is empty or not.
|
Q |
getClosestQueueNotEmpty() |
Returns the non-empty queue that is the closest to the service element.
|
java.awt.Color |
getColor() |
Returns the color of the markup shape.
|
ServiceQueueChoicePolicy |
getCustomQueueChoicePolicy() |
Returns custom queue choice policy.
|
Q |
getLongestQueue() |
Returns the queue containing the maximum number of pedestrians.
|
boolean |
isSuspended() |
Returns true if the service element is in suspended state; returns false otherwise.
|
int |
queuePriority(Q queue) |
This method should be overridden to return queue in
PRIORITY queue choice policy |
void |
setColor(java.awt.Color color) |
Sets the color of the markup shape.
|
void |
setSuspended(boolean suspended) |
Sets the service element to suspended state if the suspended value is true;
sets the service element to active state otherwise.
|
Modifier and Type | Method | Description |
---|
getName, getOwner
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public java.awt.Color getColor()
Returns the color of the markup shape.
- Returns:
- the color of the markup shape
- Since:
- 7.2
public void setColor(java.awt.Color color)
Sets the color of the markup shape.
- Parameters:
color
- the new color, null = do not draw the shape- Since:
- 7.2
public ServiceQueueChoicePolicy getCustomQueueChoicePolicy()
Returns custom queue choice policy. If not defined returns
null
.@AnyLogicInternalCodegenAPI public Q customSelectQueue()
This method should be overridden to return queue in
CUSTOM
queue choice policy@AnyLogicInternalCodegenAPI public int queuePriority(Q queue)
This method should be overridden to return queue in
PRIORITY
queue choice policypublic Q getClosestQueue()
Returns the queue that is the closest to the service, no matter whether it is empty or not.
- Returns:
- the queue that is the closest to the service
public Q getClosestQueueNotEmpty()
Returns the non-empty queue that is the closest to the service element.
- Parameters:
serviceUnit
- service point- Returns:
- the closest non-empty queue
public Q getLongestQueue()
Returns the queue containing the maximum number of pedestrians.
- Parameters:
serviceUnit
- service point- Returns:
- the queue containing the maximum number of pedestrians.
public boolean isSuspended()
Returns true if the service element is in suspended state; returns false otherwise.
A suspended element is inactive and does not accept pedestrians.
- Returns:
- true if the service element is in suspended state; returns false otherwise
public void setSuspended(boolean suspended)
Sets the service element to suspended state if the suspended value is true;
sets the service element to active state otherwise.
- Parameters:
suspended
- the suspended value
@AnyLogicInternalAPI public BoundingRectangle getBoundingRectangle()
-
How can we improve this article?
-