AnyLogic
Expand
Font size
All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
INode<N,​P>, IPath<N>
All Known Implementing Classes:
AreaNode, ConveyorCustomStation, ConveyorMarkupElement, ConveyorNode, ConveyorPath, ConveyorPathPart, ConveyorPointNode, ConveyorPortImpl, ConveyorSimpleStation, ConveyorSpur, ConveyorStation, ConveyorTransferTable, ConveyorTransitionalNode, ConveyorTurnStation, ConveyorTurntable, GISMarkupElement, GISNode, GISPoint, GISRegion, GISRoute, NetworkMarkupElement, NetworkPortImpl, Node, PalletRack, Path, PointNode, PolygonalNode, PositionOnConveyor, QueueArea, RectangularNode

public interface INetworkMarkupElement
extends java.io.Serializable
Basic interface for markup element which could be used in network.
Author:
AnyLogic North America, LLC https://anylogic.com

Method Summary

All Methods Instance Methods Abstract Methods Default Methods 
boolean contains​(double x, double y)
Check this element contains a point with given coordinates.
double getNearestPoint​(Point givenPoint, Point out)
Calculates (using the output object) the point in this space markup element nearest to the given point.
INetwork getNetwork()  
Agent getSpace()
Returns the space where the markup element is defined
default Point randomPointInside()
Returns the randomly chosen point inside the shape area.
This method utilises Random Number Generator of the Presentable object containing this shape.
default Point randomPointInside​(Point out)
Returns the randomly chosen point inside the shape area.
This method utilises Random Number Generator of the Presentable object containing this shape.
default Point randomPointInside​(java.util.Random rng)
Returns the randomly chosen point inside the fill-area of the polyline (like if it was closed).
Point randomPointInside​(java.util.Random rng, Point out)
Returns the randomly chosen point inside/along the given space markup element.
Modifier and Type Method Description

Method Detail

getNetwork

INetwork getNetwork()
Returns:
network this markup element belongs to or null if this element isn't a part of a network

getNearestPoint

double getNearestPoint​(Point givenPoint,
                       Point out)
Calculates (using the output object) the point in this space markup element nearest to the given point. Returns the square of distance to the point.
Parameters:
givenPoint - given point
out - the output point to write result to.
Returns:
the square of distance to the nearest point

contains

boolean contains​(double x,
                 double y)
Check this element contains a point with given coordinates. measured in degrees (-90 ... (South) ... 0 ... (North) ... +90), y coordinate is the longitude of the current location, measured in degrees (-180 ... (West) ... 0 ... (East) ... +180),
Parameters:
x - the x coordinate of the given point.
In case of GIS environment this is the longitude of the given point, measured in degrees (-180 ... (West) ... 0 ... (East) ... +180)
y -
Returns:

getSpace

Agent getSpace()
Returns the space where the markup element is defined
Returns:
the space associated with this element

randomPointInside

default Point randomPointInside()
Returns the randomly chosen point inside the shape area.
This method utilises Random Number Generator of the Presentable object containing this shape. (Will throw an exception if the shape has been created from code and hasn't been added to any group, - in such case please use randomPointInside(Random)).
Returns null if the shape has no points (e.g. polyline with no points)
Throws error if this shape type doesn't support returning random point inside.
Returns:
the randomly chosen point inside the shape area

randomPointInside

default Point randomPointInside​(Point out)
Returns the randomly chosen point inside the shape area.
This method utilises Random Number Generator of the Presentable object containing this shape. (Will throw an exception if the shape has been created from code and hasn't been added to any group, - in such case please use randomPointInside(Random)).
Returns null if the shape has no points (e.g. polyline with no points)
Throws error if this shape type doesn't support returning random point inside.
Parameters:
out - output object to write to, may be null
Returns:
the randomly chosen point inside the shape area

randomPointInside

default Point randomPointInside​(java.util.Random rng)
Returns the randomly chosen point inside the fill-area of the polyline (like if it was closed). This method utilises the given Random Number Generator.
Returned point is set to the z coordinate of the polyline (zero in case of 2D)
Parameters:
rng - the random number generator.
Returns:
the randomly chosen point inside the polyline

randomPointInside

Point randomPointInside​(java.util.Random rng,
                        Point out)
Returns the randomly chosen point inside/along the given space markup element. This method utilises the given Random Number Generator.
Parameters:
rng - the random number generator.
out - output object to write to, may be null
Returns:
the randomly chosen point
How can we improve this article?