Package com.anylogic.engine.markup
- Constructor Summary
- Method Summary
- Methods inherited from class com.anylogic.engine.markup.ServiceBase
- Methods inherited from class com.anylogic.engine.markup.AbstractLevelMarkup
- Methods inherited from class com.anylogic.engine.markup.MarkupShape
- Methods inherited from class com.anylogic.engine.markup.AbstractMarkup
- Methods inherited from class java.lang.Object
- Methods inherited from interface com.anylogic.engine.markup.AggregatableAnimationElement
- Constructor Details
- Method Details
- setType
- getType
- isBidirectional
- setBidirectional
- setWaitForExit
- isWaitForExit
- setQueueChoicePolicy
- getQueueChoicePolicy
- setGroupBehaviorMode
- getGroupBehaviorMode
- setGroupBehavior
- getGroupBehavior
- setGroupWaitingArea
- getGroupWaitingArea
- addQueue
- addReverseQueue
- getQueues
- getReverseQueues
- customSelectQueue
- queuePriority
- postInitialize
- getQueueColor
- setQueueColor
- getReverseQueueColor
- setReverseQueueColor
- getBoundingRectangle
- getShortestQueue
- java.lang.Object
- com.anylogic.engine.markup.AbstractMarkup
- com.anylogic.engine.markup.MarkupShape
- com.anylogic.engine.markup.AbstractLevelMarkup
- com.anylogic.engine.markup.ServiceBase<S,
- com.anylogic.engine.markup.ServiceWLine<S>
- All Implemented Interfaces:
AggregatableAnimationElement
,HasLevel
,LevelElement
,LevelMarkup
,SVGElement
,Serializable
public class ServiceWLine<S extends ServiceUnit<QueuePath>> extends ServiceBase<S,QueuePath>
- See Also:
- Serialized Form
Constructor | Description |
---|---|
ServiceWLine() | |
ServiceWLine |
Deprecated.
deprecated in version 8.4, will be removed in the future releases
|
ServiceWLine |
Deprecated.
deprecated in version 8.4, will be removed in the future releases
|
Modifier and Type | Method | Description |
---|---|---|
void | addQueue |
Adds a queue to this service.
|
void | addReverseQueue |
Adds a reverse queue to this service.
|
QueuePath | customSelectQueue |
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
|
Color | getQueueColor() |
Returns the color of the queue elements.
|
List<QueuePath> | getQueues() |
Returns the list of all queues of this service
|
Color | getReverseQueueColor() |
Returns the color of the reverse queue elements.
|
List<QueuePath> | getReverseQueues() |
Returns the list of all reverse queues of this service
|
QueuePath | getShortestQueue |
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 |
This method should be overridden to return queue in
PRIORITY queue choice policy |
void | setBidirectional |
Sets this service to be bidirectional allowing pedestrians to pass services in both directions if the argument is true.
|
void | setGroupBehavior |
Sets the group behavior for this service with lines
|
void | setGroupBehaviorMode |
Sets the behavior mode for groups in this service with lines
|
void | setGroupWaitingArea |
Sets the area markup element for the group members to wait in.
|
void | setQueueChoicePolicy |
Sets the policy for choosing a queue to enter by a pedestrian.
|
void | setQueueColor |
Sets the color of the queue elements.
|
void | setReverseQueueColor |
Sets the color of the reverse queue elements.
|
void | setType |
Sets the type of this service.
|
void | setWaitForExit |
If the argument is true, the service with lines will be set to make pedestrians wait for exit,
i.e.
|
addService, contains, getClosestQueue, getClosestQueueNotEmpty, getLongestQueue, getPeds, getServiceColor, getServices, getShortestQueue, isServiceSuspended, onDestroy, queueSize, setDataSource, setServiceColor, setServiceSuspended
error, getFullName, getOutsideLevelZ, getPresentable, getSpace, initialize, isClickHandled, isPublic, onClick, remove, setDrawMode, setOwner
discardOwner, executeUserAction, findSVGElement, getName, getSVGId, initializeInternal, isVisible, onAggregatorInitialized, onAggregatorVisibilityChanged, removeSVGFromOwner, resetSVGState, setVisible, updateDynamicProperties, updateDynamicPropertiesStructural, updateSVGProperties
public ServiceWLine()
@Deprecated public ServiceWLine(Agent owner, ShapeDrawMode drawMode, boolean isPublic, ServiceWLineType type, boolean bidirectional, S[] services, QueuePath[] queues, QueuePath[] reverseQueues, ServiceQueueChoicePolicy queueChoicePolicy, boolean waitForExit, Color serviceColor, Color queueColor, 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
-
@Deprecated public ServiceWLine(Agent owner, ShapeDrawMode drawMode, boolean isPublic, ServiceWLineType type, boolean bidirectional, S[] services, QueuePath[] queues, QueuePath[] reverseQueues, ServiceQueueChoicePolicy queueChoicePolicy, boolean waitForExit, Color serviceColor, Color queueColor, 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
-
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
public ServiceWLineType getType()
Returns the type of this service
- Returns:
- the type of this service, possible values are
- SERVICE_TYPE_POINT
- SERVICE_TYPE_LINEAR
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:
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
-
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.
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.
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
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
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
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
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
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
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
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.
public void addQueue(QueuePath queue)
Adds a queue to this service. The service should be uninitialized
- Parameters:
queue
- queue to be added
public void addReverseQueue(QueuePath queue)
Adds a reverse queue to this service. The service should be uninitialized
- Parameters:
queue
- queue to be added
public List<QueuePath> getQueues()
Description copied from class:
ServiceBase
Returns the list of all queues of this service
- Specified by:
getQueues
in classServiceBase<S extends ServiceUnit<QueuePath>,
QueuePath> - Returns:
- the list of all queues of this service
public List<QueuePath> getReverseQueues()
Returns the list of all reverse queues of this service
- Returns:
- the list of all reverse queues of this service
@AnyLogicInternalCodegenAPI public QueuePath customSelectQueue(S serviceUnit)
This method should be overridden to return queue in
CUSTOM
queue choice policy@AnyLogicInternalCodegenAPI public int queuePriority(QueuePath queue)
This method should be overridden to return queue in
PRIORITY
queue choice policy@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.
it may be removed/renamed in future.
- Specified by:
postInitialize
in interfaceAggregatableAnimationElement
- Overrides:
postInitialize
in classServiceBase<S extends ServiceUnit<QueuePath>,
QueuePath>
public Color getQueueColor()
Returns the color of the queue elements.
- Returns:
- the color of the queue elements.
public void setQueueColor(Color queueColor)
Sets the color of the queue elements.
- Parameters:
queueColor
- new color
public Color getReverseQueueColor()
Returns the color of the reverse queue elements.
- Returns:
- the color of the reverse queue elements.
public void setReverseQueueColor(Color reverseQueueColor)
Sets the color of the reverse queue elements.
- Parameters:
reverseQueueColor
- new color
@AnyLogicInternalAPI public BoundingRectangle getBoundingRectangle()
public QueuePath getShortestQueue(Agent agent, boolean reverse)
Returns the queue containing the least number of pedestrians.
- Parameters:
agent
- the agentreverse
- reverse or forward queues to choose from- Returns:
- the queue containing the least number of pedestrians.