AnyLogic
Expand
Font size
All Implemented Interfaces:
AggregatableAnimationElement, HasLevel, LevelElement, LevelMarkup, SVGElement, java.io.Serializable

public class ServiceWLine<S extends ServiceUnit<QueuePath>>
extends ServiceBase<S,​QueuePath>
See Also:
Serialized Form

Constructor Summary

Constructors 
ServiceWLine()  
ServiceWLine​(Agent owner, ShapeDrawMode drawMode, boolean isPublic, ServiceWLineType type, boolean bidirectional, S[] services, QueuePath[] queues, QueuePath[] reverseQueues, ServiceQueueChoicePolicy queueChoicePolicy, boolean waitForExit, java.awt.Color serviceColor, java.awt.Color queueColor, java.awt.Color reverseQueueColor)
Deprecated.
deprecated in version 8.4, will be removed in the future releases
ServiceWLine​(Agent owner, ShapeDrawMode drawMode, boolean isPublic, ServiceWLineType type, boolean bidirectional, S[] services, QueuePath[] queues, QueuePath[] reverseQueues, ServiceQueueChoicePolicy queueChoicePolicy, boolean waitForExit, java.awt.Color serviceColor, java.awt.Color queueColor, java.awt.Color reverseQueueColor, ServiceGroupBehaviorMode groupBehaviorMode, ServiceGroupBehavior groupBehavior, AreaNode groupWaitingArea)
Deprecated.
deprecated in version 8.4, will be removed in the future releases
Constructor Description

Method Summary

All Methods Instance Methods Concrete Methods 
void addQueue​(QueuePath queue)
Adds a queue to this service.
void addReverseQueue​(QueuePath queue)
Adds a reverse queue to this service.
QueuePath customSelectQueue​(S serviceUnit)
This method should be overridden to return queue in CUSTOM queue choice policy
BoundingRectangle getBoundingRectangle()  
ServiceGroupBehavior getGroupBehavior()
Returns the currently set group behavior for this service with lines
ServiceGroupBehaviorMode getGroupBehaviorMode()
Returns currently set group behavior mode for this service with lines
AreaNode getGroupWaitingArea()
Returns the area markup element (if any) associated with the current service with lines.
ServiceQueueChoicePolicy getQueueChoicePolicy()
Returns the queue choice policy for this service with lines
java.awt.Color getQueueColor()
Returns the color of the queue elements.
java.util.List<QueuePath> getQueues()
Returns the list of all queues of this service
java.awt.Color getReverseQueueColor()
Returns the color of the reverse queue elements.
java.util.List<QueuePath> getReverseQueues()
Returns the list of all reverse queues of this service
QueuePath getShortestQueue​(Agent agent, boolean reverse)
Returns the queue containing the least number of pedestrians.
ServiceWLineType getType()
Returns the type of this service
boolean isBidirectional()
Returns true if the service with lines is bidirectional, i.e.
boolean isWaitForExit()
Returns true if the service with lines is set to wait for exit, i.e.
void postInitialize()
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
int queuePriority​(QueuePath queue)
This method should be overridden to return queue in PRIORITY queue choice policy
void setBidirectional​(boolean bidirectional)
Sets this service to be bidirectional allowing pedestrians to pass services in both directions if the argument is true.
void setGroupBehavior​(ServiceGroupBehavior groupBehavior)
Sets the group behavior for this service with lines
void setGroupBehaviorMode​(ServiceGroupBehaviorMode groupBehaviorMode)
Sets the behavior mode for groups in this service with lines
void setGroupWaitingArea​(AreaNode groupWaitingArea)
Sets the area markup element for the group members to wait in.
void setQueueChoicePolicy​(ServiceQueueChoicePolicy queueChoicePolicy)
Sets the policy for choosing a queue to enter by a pedestrian.
void setQueueColor​(java.awt.Color queueColor)
Sets the color of the queue elements.
void setReverseQueueColor​(java.awt.Color reverseQueueColor)
Sets the color of the reverse queue elements.
void setType​(ServiceWLineType type)
Sets the type of this service.
void setWaitForExit​(boolean waitForExit)
If the argument is true, the service with lines will be set to make pedestrians wait for exit, i.e.
Modifier and Type Method Description

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

addService, contains, getClosestQueue, getClosestQueueNotEmpty, getLongestQueue, getPeds, getServiceColor, getServices, getShortestQueue, isServiceSuspended, onDestroy, queueSize, setDataSource, setServiceColor, setServiceSuspended

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

getDrawMode, getLevel, setLevel

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

error, getFullName, getOutsideLevelZ, getPresentable, getSpace, initialize, isClickHandled, isPublic, onClick, remove, setDrawMode, setOwner

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

discardOwner, executeUserAction, findSVGElement, getName, getSVGId, initializeInternal, isVisible, onAggregatorInitialized, onAggregatorVisibilityChanged, removeSVGFromOwner, resetSVGState, setVisible, updateDynamicProperties, updateDynamicPropertiesStructural, updateSVGProperties

Methods inherited from class java.lang.Object

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

Methods inherited from interface com.anylogic.engine.markup.AggregatableAnimationElement

initializeInternal, onAggregatorVisibilityChanged

Constructor Detail

ServiceWLine

public ServiceWLine()

ServiceWLine

@Deprecated
public ServiceWLine​(Agent owner,
                    ShapeDrawMode drawMode,
                    boolean isPublic,
                    ServiceWLineType type,
                    boolean bidirectional,
                    S[] services,
                    QueuePath[] queues,
                    QueuePath[] reverseQueues,
                    ServiceQueueChoicePolicy queueChoicePolicy,
                    boolean waitForExit,
                    java.awt.Color serviceColor,
                    java.awt.Color queueColor,
                    java.awt.Color reverseQueueColor)
Deprecated.
deprecated in version 8.4, will be removed in the future releases
Parameters:
owner -
drawMode -
isPublic -
type -
bidirectional -
services -
queues -
reverseQueues -
queueChoicePolicy -
waitForExit -
serviceColor -
queueColor -
reverseQueueColor -

ServiceWLine

@Deprecated
public ServiceWLine​(Agent owner,
                    ShapeDrawMode drawMode,
                    boolean isPublic,
                    ServiceWLineType type,
                    boolean bidirectional,
                    S[] services,
                    QueuePath[] queues,
                    QueuePath[] reverseQueues,
                    ServiceQueueChoicePolicy queueChoicePolicy,
                    boolean waitForExit,
                    java.awt.Color serviceColor,
                    java.awt.Color queueColor,
                    java.awt.Color reverseQueueColor,
                    ServiceGroupBehaviorMode groupBehaviorMode,
                    ServiceGroupBehavior groupBehavior,
                    AreaNode groupWaitingArea)
Deprecated.
deprecated in version 8.4, will be removed in the future releases
Parameters:
owner -
drawMode -
isPublic -
type -
bidirectional -
services -
queues -
reverseQueues -
queueChoicePolicy -
waitForExit -
serviceColor -
queueColor -
reverseQueueColor -
groupBehaviorMode -
groupBehavior -
groupWaitingArea -

Method Detail

setType

public void setType​(ServiceWLineType type)
Sets the type of this service. The element should be uninitialized
Parameters:
type - new type, possible values are:
  • SERVICE_TYPE_POINT
  • SERVICE_TYPE_LINEAR
  • getType

    public ServiceWLineType getType()
    Returns the type of this service
    Returns:
    the type of this service, possible values are
  • SERVICE_TYPE_POINT
  • SERVICE_TYPE_LINEAR
  • isBidirectional

    public boolean isBidirectional()
    Returns true if the service with lines is bidirectional, i.e. pedestrians can pass services in both directions. Returns false otherwise.
    Returns:

    setBidirectional

    public void setBidirectional​(boolean bidirectional)
    Sets this service to be bidirectional allowing pedestrians to pass services in both directions if the argument is true. The element should be uninitialized
    Parameters:
    bidirectional -

    setWaitForExit

    public void setWaitForExit​(boolean waitForExit)
    If the argument is true, the service with lines will be set to make pedestrians wait for exit, i.e. the service will not start servicing other pedestrians if a pedestrian is currently being serviced.

    isWaitForExit

    public boolean isWaitForExit()
    Returns true if the service with lines is set to wait for exit, i.e. the service cannot start servicing other pedestrians if a pedestrian is currently being serviced. Returns false otherwise.

    setQueueChoicePolicy

    public void setQueueChoicePolicy​(ServiceQueueChoicePolicy queueChoicePolicy)
    Sets the policy for choosing a queue to enter by a pedestrian. The element should be uninitialized
    Parameters:
    queueChoicePolicy - new policy, possible values are:
  • SERVICE_QUEUE_LONGEST
  • SERVICE_QUEUE_CLOSEST_STRICT
  • SERVICE_QUEUE_CLOSEST_NON_EMPTY
  • SERVICE_QUEUE_NEXT_ROUND_ROBIN
  • SERVICE_QUEUE_PRIORITY
  • SERVICE_QUEUE_CUSTOM
  • getQueueChoicePolicy

    public ServiceQueueChoicePolicy getQueueChoicePolicy()
    Returns the queue choice policy for this service with lines
    Returns:
    queue choice policy, possible values are:
  • SERVICE_QUEUE_LONGEST
  • SERVICE_QUEUE_CLOSEST_STRICT
  • SERVICE_QUEUE_CLOSEST_NON_EMPTY
  • SERVICE_QUEUE_NEXT_ROUND_ROBIN
  • SERVICE_QUEUE_PRIORITY
  • SERVICE_QUEUE_CUSTOM
  • setGroupBehaviorMode

    public void setGroupBehaviorMode​(ServiceGroupBehaviorMode groupBehaviorMode)
    Sets the behavior mode for groups in this service with lines
    Parameters:
    groupBehaviorMode - behavior for groups mode. Either SERVICE_GROUP_BEHAVIOR_SAME_FOR_ALL_GROUPS or SERVICE_GROUP_BEHAVIOR_DEPENDS_ON_INCOMING_GROUP

    getGroupBehaviorMode

    public ServiceGroupBehaviorMode getGroupBehaviorMode()
    Returns currently set group behavior mode for this service with lines
    Returns:
    behavior for groups mode. Either SERVICE_GROUP_BEHAVIOR_SAME_FOR_ALL_GROUPS or SERVICE_GROUP_BEHAVIOR_DEPENDS_ON_INCOMING_GROUP

    setGroupBehavior

    public void setGroupBehavior​(ServiceGroupBehavior groupBehavior)
    Sets the group behavior for this service with lines
    Parameters:
    groupBehavior - new behavior. Possible values are:
  • SERVICE_GROUP_INDIVIDUAL_SERVING
  • SERVICE_GROUP_ONE_MEMBER_IS_SERVED_OTHERS_WAIT_IN_QUEUE
  • SERVICE_GROUP_ONE_MEMBER_IS_SERVED_OTHERS_WAIT_IN_AREA
  • getGroupBehavior

    public ServiceGroupBehavior getGroupBehavior()
    Returns the currently set group behavior for this service with lines
    Returns:
    group behavior for this service with lines. Possible values are:
  • SERVICE_GROUP_INDIVIDUAL_SERVING
  • SERVICE_GROUP_ONE_MEMBER_IS_SERVED_OTHERS_WAIT_IN_QUEUE
  • SERVICE_GROUP_ONE_MEMBER_IS_SERVED_OTHERS_WAIT_IN_AREA
  • setGroupWaitingArea

    public void setGroupWaitingArea​(AreaNode groupWaitingArea)
    Sets the area markup element for the group members to wait in. The service should be uninitialized
    Parameters:
    groupWaitingArea - new area for group waiting

    getGroupWaitingArea

    public AreaNode getGroupWaitingArea()
    Returns the area markup element (if any) associated with the current service with lines.
    Returns:
    the area markup element (if any) associated with the current service with lines.

    addQueue

    public void addQueue​(QueuePath queue)
    Adds a queue to this service. The service should be uninitialized
    Parameters:
    queue - queue to be added

    addReverseQueue

    public void addReverseQueue​(QueuePath queue)
    Adds a reverse queue to this service. The service should be uninitialized
    Parameters:
    queue - queue to be added

    getQueues

    public java.util.List<QueuePath> getQueues()
    Description copied from class: ServiceBase
    Returns the list of all queues of this service
    Specified by:
    getQueues in class ServiceBase<S extends ServiceUnit<QueuePath>,​QueuePath>
    Returns:
    the list of all queues of this service

    getReverseQueues

    public java.util.List<QueuePath> getReverseQueues()
    Returns the list of all reverse queues of this service
    Returns:
    the list of all reverse queues of this service

    customSelectQueue

    @AnyLogicInternalCodegenAPI
    public QueuePath customSelectQueue​(S serviceUnit)
    This method should be overridden to return queue in CUSTOM queue choice policy

    queuePriority

    @AnyLogicInternalCodegenAPI
    public int queuePriority​(QueuePath queue)
    This method should be overridden to return queue in PRIORITY queue choice policy

    postInitialize

    @AnyLogicInternalAPI
    public void postInitialize()
    Description copied from interface: AggregatableAnimationElement
    This method is internal and shouldn't be called by user.
    it may be removed/renamed in future.
    Specified by:
    postInitialize in interface AggregatableAnimationElement
    Overrides:
    postInitialize in class ServiceBase<S extends ServiceUnit<QueuePath>,​QueuePath>

    getQueueColor

    public java.awt.Color getQueueColor()
    Returns the color of the queue elements.
    Returns:
    the color of the queue elements.

    setQueueColor

    public void setQueueColor​(java.awt.Color queueColor)
    Sets the color of the queue elements.
    Parameters:
    queueColor - new color

    getReverseQueueColor

    public java.awt.Color getReverseQueueColor()
    Returns the color of the reverse queue elements.
    Returns:
    the color of the reverse queue elements.

    setReverseQueueColor

    public void setReverseQueueColor​(java.awt.Color reverseQueueColor)
    Sets the color of the reverse queue elements.
    Parameters:
    reverseQueueColor - new color

    getBoundingRectangle

    @AnyLogicInternalAPI
    public BoundingRectangle getBoundingRectangle()

    getShortestQueue

    public QueuePath getShortestQueue​(Agent agent,
                                      boolean reverse)
    Returns the queue containing the least number of pedestrians.
    Parameters:
    agent - the agent
    reverse - reverse or forward queues to choose from
    Returns:
    the queue containing the least number of pedestrians.
    How can we improve this article?