Package com.anylogic.engine.markup
- Constructor Summary
- Method Summary
- 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
- java.lang.Object
- com.anylogic.engine.markup.AbstractMarkup
- com.anylogic.engine.markup.MarkupShape
- com.anylogic.engine.markup.AbstractLevelMarkup
- com.anylogic.engine.markup.PedFlowStatistics
- All Implemented Interfaces:
AggregatableAnimationElement
,HasLevel
,LevelElement
,LevelMarkup
,SVGElement
,Serializable
public class PedFlowStatistics extends AbstractLevelMarkup
- See Also:
- Serialized Form
Constructor | Description |
---|---|
PedFlowStatistics() | |
PedFlowStatistics |
Deprecated.
deprecated in version 8.4, will be removed in the future releases
|
Modifier and Type | Method | Description |
---|---|---|
boolean | contains |
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() | |
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.
|
final double | getEndX() |
Returns the x coordinate of the end point
|
final double | getEndY() |
Returns the y coordinate of the start point
|
final double | getStartX() |
Returns the x coordinate of the start point
|
final 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 |
Sets the color of the markup element.
|
void | setDataSource | |
void | setDirection |
Sets the flow direction, for which this element will collect statistics.
|
void | setEndPoint |
Sets the coordinates of the end point
|
void | setStartPoint |
Sets the coordinates of the start point
|
double | traffic() |
Returns the average of traffic flow statistics through the line,
measured in pedestrians per hour
|
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 PedFlowStatistics()
@Deprecated public PedFlowStatistics(Agent owner, ShapeDrawMode drawMode, boolean isPublic, double sx, double sy, double ex, double ey, FlowStatisticsDirection direction, 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
-
public final double getStartX()
Returns the x coordinate of the start point
- Returns:
- the x coordinate of the start point
public final double getStartY()
Returns the y coordinate of the start point
- Returns:
- the y coordinate of the start point
public final double getEndX()
Returns the x coordinate of the end point
- Returns:
- the x coordinate of the end point
public final double getEndY()
Returns the y coordinate of the start point
- Returns:
- the y coordinate of the start point
public void setStartPoint(double x, double y)
Sets the coordinates of the start point
- Parameters:
x
- the x coordinate of the start pointy
- the y coordinate of the start point
public void setEndPoint(double x, double y)
Sets the coordinates of the end point
- Parameters:
x
- the x coordinate of the end pointy
- the y coordinate of the end point
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.
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.
@AnyLogicInternalAPI public void setDataSource(PedFlowStatisticsDataSource dataSource)
@AnyLogicInternalCodegenAPI public void onDestroy()
public double traffic()
Returns the average of traffic flow statistics through the line,
measured in pedestrians per hour
- Returns:
- the traffic, pedestrians per hour
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
public void reset()
Resets the average traffic and intensity.
public long countPeds()
Returns total number of pedestrians passed through this line
- Returns:
- total number of pedestrians passed through this line
public void setColor(Color color)
Sets the color of the markup element.
- Parameters:
color
- the new color,null
= do not draw the markup element
public Color getColor()
Returns the color of the markup element, or
null
if markup element has no color- Returns:
- the color of the markup element
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 classMarkupShape
- Parameters:
px
- the x coordinate relative to this shape's containerpy
- the y coordinate relative to this shape's container- Returns:
true
if the shape contains the point with the given coordinates
@AnyLogicInternalAPI public BoundingRectangle getBoundingRectangle()