AnyLogic
Expand
Font size
All Superinterfaces:
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 Serializable
Basic interface for markup element which could be used in network.
Author:
AnyLogic North America, LLC https://anylogic.com

Method Summary

Modifier and TypeMethodDescription
booleancontains(double x, double y)
Check this element contains a point with given coordinates.
doublegetNearestPoint(Point givenPoint, Point out)
Calculates (using the output object) the point in this space markup element nearest to the given point.
INetworkgetNetwork() 
AgentgetSpace()
Returns the space where the markup element is defined
default PointrandomPointInside()
Returns the randomly chosen point inside the shape area.
This method utilises Random Number Generator of the Presentable object containing this shape.
default PointrandomPointInside(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 PointrandomPointInside(Random rng)
Returns the randomly chosen point inside the fill-area of the polyline (like if it was closed).
PointrandomPointInside(Random rng, Point out)
Returns the randomly chosen point inside/along the given space markup element.

Method Details

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(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(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