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

public class PedFlowStatistics
extends AbstractLevelMarkup
See Also:
Serialized Form

Constructor Summary

Constructors 
PedFlowStatistics()  
PedFlowStatistics​(Agent owner, ShapeDrawMode drawMode, boolean isPublic, double sx, double sy, double ex, double ey, FlowStatisticsDirection direction, java.awt.Color color)
Deprecated.
deprecated in version 8.4, will be removed in the future releases
Constructor Description

Method Summary

All Methods Instance Methods Concrete Methods 
boolean contains​(double px, double py)
Test if the shape contains the point with the given coordinates (relative to this shape's container, i.e.
long countPeds()
Returns total number of pedestrians passed through this line
BoundingRectangle getBoundingRectangle()  
java.awt.Color getColor()
Returns the color of the markup element, or null if markup element has no color
FlowStatisticsDirection getDirection()
Returns the current flow direction, for which this element collects statistics.
double getEndX()
Returns the x coordinate of the end point
double getEndY()
Returns the y coordinate of the start point
double getStartX()
Returns the x coordinate of the start point
double getStartY()
Returns the y coordinate of the start point
double intensity()
Returns the average pedestrian flow intensity on the line, measured in pedestrians per hour per meter
void onDestroy()  
void reset()
Resets the average traffic and intensity.
void setColor​(java.awt.Color color)
Sets the color of the markup element.
void setDataSource​(PedFlowStatisticsDataSource dataSource)  
void setDirection​(FlowStatisticsDirection direction)
Sets the flow direction, for which this element will collect statistics.
void setEndPoint​(double x, double y)
Sets the coordinates of the end point
void setStartPoint​(double x, double y)
Sets the coordinates of the start point
double traffic()
Returns the average of traffic flow statistics through the line, measured in pedestrians per hour
Modifier and Type Method Description

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

Constructor Detail

PedFlowStatistics

public PedFlowStatistics()

PedFlowStatistics

@Deprecated
public PedFlowStatistics​(Agent owner,
                         ShapeDrawMode drawMode,
                         boolean isPublic,
                         double sx,
                         double sy,
                         double ex,
                         double ey,
                         FlowStatisticsDirection direction,
                         java.awt.Color color)
Deprecated.
deprecated in version 8.4, will be removed in the future releases
Parameters:
owner -
drawMode -
isPublic -
sx -
sy -
ex -
ey -
direction -
color -

Method Detail

getStartX

public final double getStartX()
Returns the x coordinate of the start point
Returns:
the x coordinate of the start point

getStartY

public final double getStartY()
Returns the y coordinate of the start point
Returns:
the y coordinate of the start point

getEndX

public final double getEndX()
Returns the x coordinate of the end point
Returns:
the x coordinate of the end point

getEndY

public final double getEndY()
Returns the y coordinate of the start point
Returns:
the y coordinate of the start point

setStartPoint

public void setStartPoint​(double x,
                          double y)
Sets the coordinates of the start point
Parameters:
x - the x coordinate of the start point
y - the y coordinate of the start point

setEndPoint

public void setEndPoint​(double x,
                        double y)
Sets the coordinates of the end point
Parameters:
x - the x coordinate of the end point
y - the y coordinate of the end point

getDirection

public FlowStatisticsDirection getDirection()
Returns the current flow direction, for which this element collects statistics.
Returns:
Possible values: FLOW_STATISTICS_LEFT, FLOW_STATISTICS_RIGHT, FLOW_STATISTICS_BOTH.

setDirection

public void setDirection​(FlowStatisticsDirection direction)
Sets the flow direction, for which this element will collect statistics.
Parameters:
direction - the new direction. Possible values: FLOW_STATISTICS_LEFT, FLOW_STATISTICS_RIGHT, FLOW_STATISTICS_BOTH.

setDataSource

@AnyLogicInternalAPI
public void setDataSource​(PedFlowStatisticsDataSource dataSource)

onDestroy

@AnyLogicInternalCodegenAPI
public void onDestroy()

traffic

public double traffic()
Returns the average of traffic flow statistics through the line, measured in pedestrians per hour
Returns:
the traffic, pedestrians per hour

intensity

public double intensity()
Returns the average pedestrian flow intensity on the line, measured in pedestrians per hour per meter
Returns:
the intensity, pedestrians per hour per meter

reset

public void reset()
Resets the average traffic and intensity.

countPeds

public long countPeds()
Returns total number of pedestrians passed through this line
Returns:
total number of pedestrians passed through this line

setColor

public void setColor​(java.awt.Color color)
Sets the color of the markup element.
Parameters:
color - the new color, null = do not draw the markup element

getColor

public java.awt.Color getColor()
Returns the color of the markup element, or null if markup element has no color
Returns:
the color of the markup element

contains

public boolean contains​(double px,
                        double py)
Description copied from class: MarkupShape
Test if the shape contains the point with the given coordinates (relative to this shape's container, i.e. in the same system with the coordinates of this shape, x and y)
Specified by:
contains in class MarkupShape
Parameters:
px - the x coordinate relative to this shape's container
py - the y coordinate relative to this shape's container
Returns:
true if the shape contains the point with the given coordinates

getBoundingRectangle

@AnyLogicInternalAPI
public BoundingRectangle getBoundingRectangle()
How can we improve this article?