AnyLogic
Expand
Font size

Class AreaNode<T extends Agent>

All Implemented Interfaces:
AggregatableAnimationElement, AnimationStaticLocationProvider, IAreaNodeDescriptor<T>, IDescriptor, HasLevel, IMarkupLibraryDescriptor, INetworkMarkupElement, INode<Node,Path>, LevelElement, LevelMarkup, com.anylogic.engine.markup.material_handling.IMaterialMarkupLibraryDescriptor, com.anylogic.engine.markup.material_handling.INodeDescriptor<Agent>, SVGElement, Serializable, Iterable<T>
Direct Known Subclasses:
PolygonalNode, RectangularNode

@AnyLogicInternalAPI
public abstract class AreaNode<T extends Agent>
extends Node
implements IAreaNodeDescriptor<T>, Iterable<T>
See Also:
Serialized Form

Constructor Summary

ConstructorDescription
AreaNode() 
AreaNode(Agent owner) 
AreaNode(Agent owner, ShapeDrawMode drawMode, boolean isPublic, double x, double y, double z, Slope slope, Paint fillColor, Paint lineColor, double lineWidth, LineStyle lineStyle, PositionChoiceMode positionChoiceMode, boolean speedRestriction, double maxSpeedInMPS, PathEnd<Path>[] pathEnds, Attractor... attractors)
Deprecated.
AreaNode(Agent owner, ShapeDrawMode drawMode, boolean isPublic, IAreaNodeDescriptor<T> areaNodeDescriptor, double x, double y, double z, Slope slope, Paint fillColor, Paint lineColor, double lineWidth, LineStyle lineStyle, PositionChoiceMode positionChoiceMode, PathEnd<Path>[] pathEnds, Attractor... attractors) 

Method Summary

Modifier and TypeMethodDescription
booleanaccessRestrictionCondition(T agent)
Evaluates the area access condition for the specified agent
voidaddAgent(T agent) 
voidaddAreaDataSource(IAreaDataSource areaDataSource) 
voidaddAttractor(Attractor attractor)
Sets the position choice mode to PositionChoiceMode.POSITION_CHOICE_BY_ATTRACTORS and adds the specified attractor to this area.
List<T>agents()
Returns the list of agents currently present in this area.
abstract doublearea(AreaUnits units)
Returns the area of this area, measured in area units
voidclose()
Closes the area.
booleancontains(Agent agent)
Returns true, if the area contains the specified agent, otherwise returns false.
doubledensity(AreaUnits units)
Returns the average value of density inside the area, measured in agents per area units.
AreaAccessRestrictionTypegetAccessRestrictionType()
Returns access restriction type.
List<Agent>getAdmittedTransporters()
Returns the list of transporters admitted to the area.
List<T>getAgentsWaitingToEnter()
Returns a list of agents waiting in the queue to enter the area.
List<Attractor>getAttractors()
Returns the list of this area attractors
intgetCapacity()
Returns capacity for access restriction
ColorgetFillColor()
Returns the fill color of the markup element, or null if markup element has no fill color or has textured fill (in this case getFillTexture() should be used instead)
TexturegetFillTexture()
Returns the fill texture of the markup element, if the markup element has fill texture
ColorgetLineColor()
Returns the line color of the markup element, or null if markup element has no line color or has textured line (in this case getLineTexture() should be used instead)
LineStylegetLineStyle()
Returns the line style of the markup element: {LINE_STYLE_SOLID, LINE_STYLE_DOTTED or LINE_STYLE_DASHED}
TexturegetLineTexture()
Returns the line texture of the markup element, if the markup element has line texture
doublegetLineWidth()
Returns the line width of the markup element.
doublegetMaxSpeed(SpeedUnits units)
Returns the maximum speed in the specified speed units
intgetNumberOfAdmittedAgents()
Returns the number of agents admitted to the area.
intgetNumberOfAdmittedTransporters()
Returns the number of transporters admitted to the area.
List<Agent>getPeds()
Returns the list of pedestrians currently present in this area.
PositiongetPosition(int index, int totalNumber, Position out)
Returns the item position with the given index.
In case of any wrong argument returns zero-index position (position for index=0 with totalNumber=1).
PositionChoiceModegetPositionChoiceMode()
Returns the position choice mode for this area.
Class<? extends Agent>getRestrictedAgentClass()
Returns the restricted agent class
Schedule<Boolean>getSchedule()
Returns the schedule of area access restriction
SlopegetSlope()
Returns the slope for current area
doublegetThroughput(RateUnits units)
Returns the maximum number of agents that can enter the area per rate unit.
doublegetX()
Returns the x coordinate of the markup element.
doublegetY()
Returns the y coordinate of the markup element.
doublegetZ()
Returns the z coordinate of the markup element, relative to level/network, if any is defined.
doublegetZ(double x, double y)
Returns the z coordinate of the given point
booleanisAccessRestricted()
Returns true if the access to the area is restricted and false otherwise
booleanisAllowedToEnter(T agent) 
booleanisApplied(T agent) 
booleanisAvoidedIfClosed()
Returns the value of avoided if closed parameter
booleanisLimitSpeed()
Return true if speed is limited in this node, false otherwise
booleanisOpen()
Returns true if the area is open and false if the area is closed.
booleanisReadyToEnter(T agent) 
booleanisSpeedRestricted()
Checks whether the area has speed restriction enabled.
Iterator<T>iterator()
Returns the iterator for all agents inside the area.
voidnotifyCancelReadyToEnter(T agent) 
booleannotifyReadyToEnter(T agent) 
voidnotifyReadyToEnter2(T agent) 
voidnotifyReadyToExit(T agent) 
voidonClose()
Code executed when the area closes.
voidonEnter(T agent)
Code executed when the agent enters the area.
voidonEnterDenied(T agent)
Code that will be executed when the agent attempts to enter the node but is not allowed to.
voidonExit(T agent)
Code executed when the agent exits the area.
voidonOpen()
Code executed when the area opens.
voidopen()
Opens the area.
voidrecalculateAccessibility()
The method recalculates the accessibility of the area node.
voidremoveAgent(T agent) 
voidremoveAreaDataSource(IAreaDataSource areaDataSource) 
voidremoveFromQueue(T agent) 
voidrestrictAccessByCapacity(int number)
Enables restriction of access to the node by capacity.
voidrestrictAccessBySchedule(Schedule<Boolean> schedule)
Enables restriction of access to the node by schedule.
voidrestrictAccessByThroughput(double throughput, RateUnits units)
Enables restriction of access to the node by throughput.
voidrestrictAccessManually(boolean initiallyClosed)
Enables restriction of access to the node manually.
voidrestrictSpeed(double maxSpeed, SpeedUnits units)
Enables speed restriction for the node.
voidsetAccessRestricted(boolean restricted)
Sets restriction of access.
voidsetAccessRestrictionType(AreaAccessRestrictionType accessRestrictionType)
Sets access restriction type.
voidsetAvoidedIfClosed(boolean avoided)
Sets the value of avoided if closed parameter
voidsetCapacity(int number)
Sets capacity for access restriction
voidsetLimitSpeed(boolean restriction)
Deprecated.
voidsetLineColor(Color lineColor)
Sets the line color of the markup element.
voidsetLineColor(Paint lineColor)
Sets the line color (or Texture) of the markup element.
voidsetLineStyle(LineStyle lineStyle)
Sets the line style of the markup element: {LINE_STYLE_SOLID, LINE_STYLE_DOTTED or LINE_STYLE_DASHED}
voidsetLineWidth(double width)
Sets the line width of the markup element, 0 means thinnest possible
voidsetMaxSpeed(double maxSpeed, SpeedUnits units)
Deprecated.
voidsetOpen(boolean open)
Makes the area either open or closed to the incoming agents.
voidsetPos(double x, double y, double z)
Sets coordinates of the markup element
voidsetPositionChoiceMode(PositionChoiceMode positionChoiceMode)
Sets the position choice mode for this area.
voidsetRestrictedAgentClass(Class<? extends Agent> restrictedClass)
Sets the restricted agent class
voidsetSchedule(Schedule<Boolean> schedule)
Sets the schedule of area access restriction
voidsetSlope(Slope slope)
Sets the slope for current area
voidsetSpeedRestricted(boolean restriction)
Sets the speed restriction in the area.
voidsetThroughput(double throughput, RateUnits units)
Sets the maximum number of agents that can enter the area per rate unit.

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

getDrawMode, getLevel, getNearestPoint, getNearestPoint, getNearestPoint, getNearestPoint, getNearestPoint, getNetwork, setLevel

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

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

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, postInitialize

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

getSpace

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

getLevel

Methods inherited from interface com.anylogic.engine.markup.material_handling.IMaterialMarkupLibraryDescriptor

getMarkup, setMarkup

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

contains, getNearestPoint, getNetwork, getSpace, randomPointInside, randomPointInside, randomPointInside, randomPointInside

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

getName

Methods inherited from interface java.lang.Iterable

forEach, spliterator

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

setLevel

Constructor Details

AreaNode

public AreaNode()

AreaNode

public AreaNode(Agent owner)

AreaNode

@AnyLogicInternalCodegenAPI
public AreaNode(Agent owner,
 ShapeDrawMode drawMode,
 boolean isPublic,
 IAreaNodeDescriptor<T> areaNodeDescriptor,
 double x,
 double y,
 double z,
 Slope slope,
 Paint fillColor,
 Paint lineColor,
 double lineWidth,
 LineStyle lineStyle,
 PositionChoiceMode positionChoiceMode,
 PathEnd<Path>[] pathEnds,
 Attractor... attractors)

AreaNode

@Deprecated
public AreaNode(Agent owner,
 ShapeDrawMode drawMode,
 boolean isPublic,
 double x,
 double y,
 double z,
 Slope slope,
 Paint fillColor,
 Paint lineColor,
 double lineWidth,
 LineStyle lineStyle,
 PositionChoiceMode positionChoiceMode,
 boolean speedRestriction,
 double maxSpeedInMPS,
 PathEnd<Path>[] pathEnds,
 Attractor... attractors)
Deprecated.

Method Details

isReadyToEnter

@AnyLogicInternalAPI
public boolean isReadyToEnter(T agent)

addAttractor

public void addAttractor(Attractor attractor)
Sets the position choice mode to PositionChoiceMode.POSITION_CHOICE_BY_ATTRACTORS and adds the specified attractor to this area. Area should be uninitialized.
Parameters:
attractor - attractor to be added

area

public abstract double area(AreaUnits units)
Returns the area of this area, measured in area units
Parameters:
units - the area units
Returns:
area of this area, measured in area units

agents

public List<T> agents()
Returns the list of agents currently present in this area.
Returns:
the list of agents currently present in this area.

getAgentsWaitingToEnter

public List<T> getAgentsWaitingToEnter()
Returns a list of agents waiting in the queue to enter the area.
Returns:
a list of agents waiting in the queue to enter the area.

getNumberOfAdmittedAgents

public int getNumberOfAdmittedAgents()
Returns the number of agents admitted to the area.
Returns:
the number of agents admitted to the area.

getNumberOfAdmittedTransporters

public int getNumberOfAdmittedTransporters()
Returns the number of transporters admitted to the area.
Returns:
the number of transporters admitted to the area.

iterator

public Iterator<T> iterator()
Returns the iterator for all agents inside the area.
Specified by:
iterator in interface Iterable<T extends Agent>

density

public double density(AreaUnits units)
Returns the average value of density inside the area, measured in agents per area units.
Parameters:
units - the area units
Returns:
average value of density inside the area, measured in agents per area units.

recalculateAccessibility

public void recalculateAccessibility()
The method recalculates the accessibility of the area node. Should be called if the area access is restricted by AREA_ACCESS_RESTRICTION_BY_CONDITION to notify transporters about changes in the area accessibility

contains

public boolean contains(Agent agent)
Returns true, if the area contains the specified agent, otherwise returns false.
Parameters:
agent - the agent
Returns:
true, if the area contains the specified agent, otherwise returns false.

addAreaDataSource

@AnyLogicInternalAPI
public void addAreaDataSource(IAreaDataSource areaDataSource)

removeAreaDataSource

@AnyLogicInternalAPI
public void removeAreaDataSource(IAreaDataSource areaDataSource)

getPeds

@AnyLogicInternalAPI
public List<Agent> getPeds()
Returns the list of pedestrians currently present in this area.
Returns:
the list of pedestrians currently present in this area.

getAdmittedTransporters

public List<Agent> getAdmittedTransporters()
Returns the list of transporters admitted to the area.
Returns:
returns transporters admitted to the area..

onEnterDenied

public void onEnterDenied(T agent)
Code that will be executed when the agent attempts to enter the node but is not allowed to.
Specified by:
onEnterDenied in interface IAreaNodeDescriptor<T extends Agent>
Parameters:
agent - the agent

onEnter

public void onEnter(T agent)
Code executed when the agent enters the area.
Specified by:
onEnter in interface IAreaNodeDescriptor<T extends Agent>
Parameters:
agent - the agent

onExit

public void onExit(T agent)
Code executed when the agent exits the area.
Specified by:
onExit in interface IAreaNodeDescriptor<T extends Agent>
Parameters:
agent - the agent

onClose

public void onClose()
Code executed when the area closes.
Specified by:
onClose in interface IAreaNodeDescriptor<T extends Agent>

onOpen

public void onOpen()
Code executed when the area opens.
Specified by:
onOpen in interface IAreaNodeDescriptor<T extends Agent>

isAccessRestricted

public boolean isAccessRestricted()
Returns true if the access to the area is restricted and false otherwise
Specified by:
isAccessRestricted in interface IAreaNodeDescriptor<T extends Agent>
Returns:
true if the access to the area is restricted and false otherwise

setAccessRestricted

@AnyLogicInternalAPI
public void setAccessRestricted(boolean restricted)
Sets restriction of access. May be called only before initialization
Specified by:
setAccessRestricted in interface IAreaNodeDescriptor<T extends Agent>

restrictAccessByCapacity

public void restrictAccessByCapacity(int number)
Enables restriction of access to the node by capacity. Restriction type can not be changed after initialization. The method will disable previously enabled access restriction of another type (if any). The method can be called after initialization to modify capacity value.
Parameters:
number - allowed capacity

restrictAccessByThroughput

public void restrictAccessByThroughput(double throughput,
 RateUnits units)
Enables restriction of access to the node by throughput. Restriction type can not be changed after initialization. The method will disable previously enabled access restriction of another type (if any). The method can be called after initialization to modify throughput value.
Parameters:
throughput - maximum number of agents per rate unit
units - throughput rate unit

restrictAccessBySchedule

public void restrictAccessBySchedule(Schedule<Boolean> schedule)
Enables restriction of access to the node by schedule. Restriction type can not be changed after initialization. The method will disable previously enabled access restriction of another type (if any). The method can be called after initialization to set another schedule.
Parameters:
schedule - an object of class Schedule. Intervals of true correspond to the time intervals during which the area is closed.

restrictAccessManually

public void restrictAccessManually(boolean initiallyClosed)
Enables restriction of access to the node manually. Restriction type can not be changed after initialization. The method will disable previously enabled access restriction of another type (if any). To control availability of the area in runtime use open(), close() or setOpen(boolean)).
Parameters:
initiallyClosed - the initial state of area. Initially closed if true and initially open otherwise.

restrictSpeed

public void restrictSpeed(double maxSpeed,
 SpeedUnits units)
Enables speed restriction for the node. Speed restriction should be enabled before initialization. Speed restriction may be enabled additionally with access restriction. The method can be called after initialization to modify maximum speed.
Parameters:
maxSpeed - maximum allowed speed in the node
units - speed units

isOpen

public boolean isOpen()
Returns true if the area is open and false if the area is closed.
Returns:
true if the area is open and false if the area is closed.

setOpen

public void setOpen(boolean open)
Makes the area either open or closed to the incoming agents.
Parameters:
open - setting parameter to true opens the area. Setting parameter to false closes the area

open

public void open()
Opens the area.

close

public void close()
Closes the area.

notifyReadyToEnter

@AnyLogicInternalLibraryAPI
public boolean notifyReadyToEnter(T agent)

notifyReadyToEnter2

@AnyLogicInternalLibraryAPI
public void notifyReadyToEnter2(T agent)

notifyCancelReadyToEnter

@AnyLogicInternalLibraryAPI
public void notifyCancelReadyToEnter(T agent)

addAgent

@AnyLogicInternalLibraryAPI
public void addAgent(T agent)

removeAgent

@AnyLogicInternalLibraryAPI
public void removeAgent(T agent)

removeFromQueue

@AnyLogicInternalAPI
public void removeFromQueue(T agent)

isAllowedToEnter

@AnyLogicInternalLibraryAPI
public boolean isAllowedToEnter(T agent)

isApplied

@AnyLogicInternalLibraryAPI
public boolean isApplied(T agent)

notifyReadyToExit

@AnyLogicInternalLibraryAPI
public void notifyReadyToExit(T agent)

getX

public double getX()
Returns the x coordinate of the markup element.
Returns:
the x coordinate of the markup element

getY

public double getY()
Returns the y coordinate of the markup element.
Returns:
the y coordinate of the markup element

getZ

public double getZ()
Returns the z coordinate of the markup element, relative to level/network, if any is defined.
Specified by:
getZ in class Node
Returns:
the z coordinate of the markup element

getZ

public double getZ(double x,
 double y)
Returns the z coordinate of the given point
Returns:
the z coordinate of the given point

getSlope

public Slope getSlope()
Returns the slope for current area
Returns:
the slope for current area

setSlope

public void setSlope(Slope slope)
Sets the slope for current area
Parameters:
slope - - the slope for current area

setPos

public void setPos(double x,
 double y,
 double z)
Sets coordinates of the markup element
Parameters:
x - the new value of x coordinate
y - the new value of y coordinate
z - the new value of z coordinate

setLineColor

public void setLineColor(Color lineColor)
Sets the line color of the markup element.
Specified by:
setLineColor in class Node
Parameters:
lineColor - the new line color, null = do not draw the markup element line

setLineColor

public void setLineColor(Paint lineColor)
Sets the line color (or Texture) of the markup element.
Specified by:
setLineColor in interface INode<Node,Path>
Specified by:
setLineColor in class Node
Parameters:
lineColor - the new line color, null = do not draw the markup element line

getLineColor

public Color getLineColor()
Returns the line color of the markup element, or null if markup element has no line color or has textured line (in this case getLineTexture() should be used instead)
Specified by:
getLineColor in interface INode<Node,Path>
Specified by:
getLineColor in class Node
Returns:
the line color of the markup element

getLineTexture

public Texture getLineTexture()
Returns the line texture of the markup element, if the markup element has line texture
Specified by:
getLineTexture in interface INode<Node,Path>
Specified by:
getLineTexture in class Node
Returns:
the line texture of the markup element

getFillColor

public Color getFillColor()
Returns the fill color of the markup element, or null if markup element has no fill color or has textured fill (in this case getFillTexture() should be used instead)
Specified by:
getFillColor in interface INode<Node,Path>
Overrides:
getFillColor in class Node
Returns:
the fill color of the markup element

getFillTexture

public Texture getFillTexture()
Returns the fill texture of the markup element, if the markup element has fill texture
Specified by:
getFillTexture in interface INode<Node,Path>
Overrides:
getFillTexture in class Node
Returns:
the fill texture of the markup element

setLineWidth

public void setLineWidth(double width)
Sets the line width of the markup element, 0 means thinnest possible
Parameters:
width - the new line width of the markup element

getLineWidth

public double getLineWidth()
Returns the line width of the markup element.
Returns:
the line width of the markup element

setLineStyle

public void setLineStyle(LineStyle lineStyle)
Sets the line style of the markup element: {LINE_STYLE_SOLID, LINE_STYLE_DOTTED or LINE_STYLE_DASHED}
Parameters:
lineStyle - the new style of the markup element

getLineStyle

public LineStyle getLineStyle()
Returns the line style of the markup element: {LINE_STYLE_SOLID, LINE_STYLE_DOTTED or LINE_STYLE_DASHED}
Returns:
the line style of the markup element

getPosition

public Position getPosition(int index,
 int totalNumber,
 Position out)
Description copied from interface: AnimationStaticLocationProvider
Returns the item position with the given index.
In case of any wrong argument returns zero-index position (position for index=0 with totalNumber=1).
Specified by:
getPosition in interface AnimationStaticLocationProvider
Parameters:
index - the index of some item positions, should be not negative and less than totalNumber
totalNumber - the total number of item positions, should be positive
out - output object to write to, may be null
Returns:
the Position object with coordinates of the requested item position

getAttractors

public List<Attractor> getAttractors()
Returns the list of this area attractors
Returns:
the attractors of this area

getPositionChoiceMode

public PositionChoiceMode getPositionChoiceMode()
Returns the position choice mode for this area. Area should be initialized
Returns:
position choice mode for this area, which can be:
  • POSITION_CHOICE_RANDOM
  • POSITION_CHOICE_ARRANGED
  • POSITION_CHOICE_BY_ATTRACTORS

setPositionChoiceMode

public void setPositionChoiceMode(PositionChoiceMode positionChoiceMode)
Sets the position choice mode for this area. Area should be uninitialized.
Parameters:
positionChoiceMode - the position choice mode, which can be:
  • POSITION_CHOICE_RANDOM
  • POSITION_CHOICE_ARRANGED
  • POSITION_CHOICE_BY_ATTRACTORS

setLimitSpeed

@Deprecated
public void setLimitSpeed(boolean restriction)
Deprecated.
Description copied from class: Node
Enables speed limit in this node if the argument is true, disables it if the argument is false The element should be uninitialized
Overrides:
setLimitSpeed in class Node
Parameters:
restriction - argument flag

isLimitSpeed

@AnyLogicInternalAPI
public boolean isLimitSpeed()
Description copied from class: Node
Return true if speed is limited in this node, false otherwise
Overrides:
isLimitSpeed in class Node

getAccessRestrictionType

public AreaAccessRestrictionType getAccessRestrictionType()
Returns access restriction type.
Specified by:
getAccessRestrictionType in interface IAreaNodeDescriptor<T extends Agent>
Returns:
access restriction type. Possible values are:
  • AREA_ACCESS_RESTRICTION_BY_CAPACITY
  • AREA_ACCESS_RESTRICTION_BY_THROUGHPUT
  • AREA_ACCESS_RESTRICTION_BY_SCHEDULE
  • AREA_ACCESS_RESTRICTION_BY_CONDITION
  • AREA_ACCESS_RESTRICTION_MANUAL

setAccessRestrictionType

@AnyLogicInternalAPI
public void setAccessRestrictionType(AreaAccessRestrictionType accessRestrictionType)
Sets access restriction type. May be called only before initialization.
Specified by:
setAccessRestrictionType in interface IAreaNodeDescriptor<T extends Agent>
Parameters:
accessRestrictionType - access restriction type possible values are:
  • AREA_ACCESS_RESTRICTION_BY_CAPACITY
  • AREA_ACCESS_RESTRICTION_BY_THROUGHPUT
  • AREA_ACCESS_RESTRICTION_BY_SCHEDULE
  • AREA_ACCESS_RESTRICTION_BY_CONDITION
  • AREA_ACCESS_RESTRICTION_MANUAL

getCapacity

public int getCapacity()
Returns capacity for access restriction
Specified by:
getCapacity in interface IAreaNodeDescriptor<T extends Agent>
Returns:
capacity for access restriction

setCapacity

@AnyLogicInternalAPI
public void setCapacity(int number)
Sets capacity for access restriction
Specified by:
setCapacity in interface IAreaNodeDescriptor<T extends Agent>
Parameters:
number - - allowed capacity

getThroughput

public double getThroughput(RateUnits units)
Returns the maximum number of agents that can enter the area per rate unit.
Specified by:
getThroughput in interface IAreaNodeDescriptor<T extends Agent>
Parameters:
units - the rate units
Returns:
maximum number of agents per rate unit

setThroughput

@AnyLogicInternalAPI
public void setThroughput(double throughput,
 RateUnits units)
Sets the maximum number of agents that can enter the area per rate unit.
Specified by:
setThroughput in interface IAreaNodeDescriptor<T extends Agent>
Parameters:
throughput - maximum number of agents per rate unit
units - the rate units

getSchedule

public Schedule<Boolean> getSchedule()
Returns the schedule of area access restriction
Specified by:
getSchedule in interface IAreaNodeDescriptor<T extends Agent>

setSchedule

@AnyLogicInternalAPI
public void setSchedule(Schedule<Boolean> schedule)
Sets the schedule of area access restriction
Specified by:
setSchedule in interface IAreaNodeDescriptor<T extends Agent>

accessRestrictionCondition

public boolean accessRestrictionCondition(T agent)
Evaluates the area access condition for the specified agent
Specified by:
accessRestrictionCondition in interface IAreaNodeDescriptor<T extends Agent>
Returns:
true if access restricted and false otherwise

isAvoidedIfClosed

public boolean isAvoidedIfClosed()
Returns the value of avoided if closed parameter
Specified by:
isAvoidedIfClosed in interface IAreaNodeDescriptor<T extends Agent>
Returns:
the value of avoided if closed parameter

setAvoidedIfClosed

public void setAvoidedIfClosed(boolean avoided)
Sets the value of avoided if closed parameter
Specified by:
setAvoidedIfClosed in interface IAreaNodeDescriptor<T extends Agent>

setRestrictedAgentClass

public void setRestrictedAgentClass(Class<? extends Agent> restrictedClass)
Sets the restricted agent class
Specified by:
setRestrictedAgentClass in interface IAreaNodeDescriptor<T extends Agent>

getRestrictedAgentClass

public Class<? extends Agent> getRestrictedAgentClass()
Returns the restricted agent class
Specified by:
getRestrictedAgentClass in interface IAreaNodeDescriptor<T extends Agent>
Returns:
restricted agent class

getMaxSpeed

public double getMaxSpeed(SpeedUnits units)
Returns the maximum speed in the specified speed units
Specified by:
getMaxSpeed in interface IAreaNodeDescriptor<T extends Agent>
Overrides:
getMaxSpeed in class Node
Parameters:
units - speed units
Returns:
maximum speed in the specified speed units

setMaxSpeed

@Deprecated
public void setMaxSpeed(double maxSpeed,
 SpeedUnits units)
Deprecated.
Sets the maximum speed in the specified speed units
Specified by:
setMaxSpeed in interface IAreaNodeDescriptor<T extends Agent>
Overrides:
setMaxSpeed in class Node
Parameters:
maxSpeed - new max speed
units - speed units

setSpeedRestricted

@AnyLogicInternalAPI
public void setSpeedRestricted(boolean restriction)
Sets the speed restriction in the area. May be called only before initialization.
Specified by:
setSpeedRestricted in interface IAreaNodeDescriptor<T extends Agent>

isSpeedRestricted

public boolean isSpeedRestricted()
Checks whether the area has speed restriction enabled. If true, the speed inside the area is restricted.
Specified by:
isSpeedRestricted in interface IAreaNodeDescriptor<T extends Agent>
Returns:
true if the speed is restricted and false otherwise