AnyLogic AnyLogic
Expand
Font size

Method Summary

All Methods Instance Methods Concrete Methods 
void addConnection​(ConveyorPath<?> path, PathEndType type)  
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. in the same system with the coordinates of this shape, x and y)
java.lang.Class<? extends ExtAgentWithSpatialMetrics> getCompatibleAgentExtensionClass()
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
ConveyorPath<?> getConnection​(int index)
Returns connection of this node with another node by index.
java.util.List<ConveyorPath<?>> getConnections()
Returns the list of ConveyorPath<?
int getConnectionsCount()
Amount of the node's connections to other nodes.
java.awt.Color getFillColor()
Returns the fill color of the shape, or null if shape has no fill color or has textured fill (in this case INode.getFillTexture() should be used instead)
Texture getFillTexture()
Returns the fill texture of the shape, if the shape has fill texture
java.util.List<ConveyorPath<?>> getIncomingPaths()
Returns the list of all incoming conveyors, i.e. the conveyors, transferring agents (material items) to the transfer table, returns null if none.
java.awt.Color getLineColor()
Returns the line color of the markup element, or null if markup element has no line color or has textured line (in this case INode.getLineTexture() should be used instead)
Texture getLineTexture()
Returns the line texture of the markup element, if the markup element has line texture
double getNearestPoint​(Point givenPoint, Point out)
Calculates (using the output object) the point in this space markup element nearest to the given point.
ConveyorNetwork getNetwork()  
java.util.List<ConveyorPath<?>> getOutgoingPaths()
Returns the list of all outgoing conveyors, i.e. the conveyors, accepting agents (material items) from the transfer table, returns null if none.
Position getPosition​(int index, int totalNumber, Position out)
Returns the item position with the given index.
In case of any wrong argument returns zero-index position (position for index=0 with totalNumber=1).
Position getTransferPositionByPercent​(ConveyorPath<?> path1, ConveyorPath<?> path2, double percent, Position out)  
double getX()
Get X coordinate of this element
Point getXYZ​(Point out)
Returns the location of this element
double getY()
Get Y coordinate of this element
double getZ()
Get Z coordinate of this element
void postInitialize()
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
Point randomPointInside​(java.util.Random rng, Point out)
Returns the randomly chosen point inside/along the given space markup element.
void setFillColor​(java.awt.Color fillColor)
Sets the fill color of the shape.
void setFillColor​(java.awt.Paint fillColor)
Sets the fill color (or Texture) of the shape.
void setLineColor​(java.awt.Color lineColor)
Sets the line color of the markup element.
void setLineColor​(java.awt.Paint lineColor)
Sets the line color (or Texture) of the markup element.
void setXYZ​(double x, double y, double z)
Sets the location of this node.
Modifier and Type Method Description

Methods inherited from class com.anylogic.engine.markup.ConveyorMarkupElement

getLevel, setNetwork

Methods inherited from class com.anylogic.engine.markup.MarkupShape

error, getDrawMode, 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.AnimationStaticLocationProvider

getSpace

Methods inherited from interface com.anylogic.engine.markup.INetworkMarkupElement

getSpace, randomPointInside, randomPointInside, randomPointInside

Methods inherited from interface com.anylogic.engine.markup.INode

getName, getTransferDistance

Method Detail

getNetwork

public ConveyorNetwork getNetwork()
Specified by:
getNetwork in interface INetworkMarkupElement
Overrides:
getNetwork in class ConveyorMarkupElement<T extends Agent>
Returns:
network this markup element belongs to or null if this element isn't a part of a network

getX

public double getX()
Get X coordinate of this element
Returns:
X coordinate of this element

getY

public double getY()
Get Y coordinate of this element
Returns:
Y coordinate of this element

getZ

public final double getZ()
Get Z coordinate of this element
Returns:
Z coordinate of this element

getXYZ

public Point getXYZ​(Point out)
Returns the location of this element
Parameters:
out - output object to write to, may be null
Returns:
the Point object with coordinates of the node

setXYZ

public void setXYZ​(double x,
                   double y,
                   double z)
Sets the location of this node. The node should be unitialized
Parameters:
x - X coordinate
y - Y coordinate
z - Z coordinate

getIncomingPaths

public java.util.List<ConveyorPath<?>> getIncomingPaths()
Returns the list of all incoming conveyors, i.e. the conveyors, transferring agents (material items) to the transfer table, returns null if none.
Returns:
the list of all incoming conveyors

getOutgoingPaths

public java.util.List<ConveyorPath<?>> getOutgoingPaths()
Returns the list of all outgoing conveyors, i.e. the conveyors, accepting agents (material items) from the transfer table, returns null if none.
Returns:
the list of all outgoing conveyors

getConnectionsCount

public int getConnectionsCount()
Description copied from interface: INode
Amount of the node's connections to other nodes.
Specified by:
getConnectionsCount in interface INode<ConveyorNode<?>,​ConveyorPath<?>>
Returns:
number of connections

getConnection

public ConveyorPath<?> getConnection​(int index)
Description copied from interface: INode
Returns connection of this node with another node by index.
Specified by:
getConnection in interface INode<ConveyorNode<?>,​ConveyorPath<?>>
Parameters:
index - the index of required connection in range (0, this.getConnectionsCount() - 1)
Returns:
instance of com.anylogic.engine.markup.IPath interface

getConnections

public java.util.List<ConveyorPath<?>> getConnections()
Returns the list of ConveyorPath<?> objects connected to this node
Returns:
the list of connections

addConnection

public void addConnection​(ConveyorPath<?> path,
                          PathEndType type)
Specified by:
addConnection in interface INode<ConveyorNode<?>,​ConveyorPath<?>>

getLineColor

public java.awt.Color getLineColor()
Description copied from interface: INode
Returns the line color of the markup element, or null if markup element has no line color or has textured line (in this case INode.getLineTexture() should be used instead)
Specified by:
getLineColor in interface INode<ConveyorNode<?>,​ConveyorPath<?>>
Returns:
the line color of the markup element

getLineTexture

public Texture getLineTexture()
Description copied from interface: INode
Returns the line texture of the markup element, if the markup element has line texture
Specified by:
getLineTexture in interface INode<ConveyorNode<?>,​ConveyorPath<?>>
Returns:
the line texture of the markup element

setLineColor

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

setLineColor

public void setLineColor​(java.awt.Paint lineColor)
Description copied from interface: INode
Sets the line color (or Texture) of the markup element.
Specified by:
setLineColor in interface INode<ConveyorNode<?>,​ConveyorPath<?>>
Parameters:
lineColor - the new line color, null = do not draw the markup element line

getFillColor

public java.awt.Color getFillColor()
Description copied from interface: INode
Returns the fill color of the shape, or null if shape has no fill color or has textured fill (in this case INode.getFillTexture() should be used instead)
Specified by:
getFillColor in interface INode<ConveyorNode<?>,​ConveyorPath<?>>
Returns:
the fill color of the shape

getFillTexture

public Texture getFillTexture()
Description copied from interface: INode
Returns the fill texture of the shape, if the shape has fill texture
Specified by:
getFillTexture in interface INode<ConveyorNode<?>,​ConveyorPath<?>>
Returns:
the fill texture of the shape

setFillColor

public void setFillColor​(java.awt.Color fillColor)
Sets the fill color of the shape.
Parameters:
fillColor - the new fill color, null = do not fill the shape

setFillColor

public void setFillColor​(java.awt.Paint fillColor)
Description copied from interface: INode
Sets the fill color (or Texture) of the shape.
Specified by:
setFillColor in interface INode<ConveyorNode<?>,​ConveyorPath<?>>

getCompatibleAgentExtensionClass

public java.lang.Class<? extends ExtAgentWithSpatialMetrics> getCompatibleAgentExtensionClass()
Description copied from interface: INode
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
Specified by:
getCompatibleAgentExtensionClass in interface INode<ConveyorNode<?>,​ConveyorPath<?>>

getTransferPositionByPercent

@AnyLogicInternalAPI
public Position getTransferPositionByPercent​(ConveyorPath<?> path1,
                                             ConveyorPath<?> path2,
                                             double percent,
                                             Position out)
Specified by:
getTransferPositionByPercent in interface INode<ConveyorNode<?>,​ConveyorPath<?>>

postInitialize

@AnyLogicInternalAPI
public void postInitialize()
Description copied from interface: AggregatableAnimationElement
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
Specified by:
postInitialize in interface AggregatableAnimationElement

getNearestPoint

public double getNearestPoint​(Point givenPoint,
                              Point out)
Description copied from interface: INetworkMarkupElement
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.
Specified by:
getNearestPoint in interface INetworkMarkupElement
Parameters:
givenPoint - given point
out - the output point to write result to.
Returns:
the square of distance to the nearest point

randomPointInside

public Point randomPointInside​(java.util.Random rng,
                               Point out)
Description copied from interface: INetworkMarkupElement
Returns the randomly chosen point inside/along the given space markup element. This method utilises the given Random Number Generator.
Specified by:
randomPointInside in interface INetworkMarkupElement
Parameters:
rng - the random number generator.
out - output object to write to, may be null
Returns:
the randomly chosen point

getPosition

public Position getPosition​(int index,
                            int totalNumber,
                            Position out)
Description copied from interface: AnimationStaticLocationProvider
Returns the item position with the given index.
In case of any wrong argument returns zero-index position (position for index=0 with totalNumber=1).
Specified by:
getPosition in interface AnimationStaticLocationProvider
Parameters:
index - the index of some item positions, should be not negative and less than totalNumber
totalNumber - the total number of item positions, should be positive
out - output object to write to, may be null
Returns:
the Position object with coordinates of the requested item position

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 interface INetworkMarkupElement
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
How can we improve this article?