Package com.anylogic.engine.markup
- All Superinterfaces:
Serializable
- 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
Modifier and Type | Method | Description |
---|---|---|
boolean | contains |
Check this element contains a point with given coordinates.
|
double | getNearestPoint |
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 |
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 |
Returns the randomly chosen point inside the fill-area of the polyline (like if it was closed).
|
Point | randomPointInside |
Returns the randomly chosen point inside/along the given space markup element.
|
INetwork getNetwork()
- Returns:
- network this markup element belongs to
or
null
if this element isn't a part of a network
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 pointout
- the output point to write result to.- Returns:
- the square of distance to the nearest point
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:
Agent getSpace()
Returns the space where the markup element is defined
- Returns:
- the space associated with this element
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
Returns
Throws error if this shape type doesn't support returning random point inside.
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
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
Returns
Throws error if this shape type doesn't support returning random point inside.
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 benull
- Returns:
- the randomly chosen point inside the shape area
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)
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
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 benull
- Returns:
- the randomly chosen point