AnyLogic AnyLogic
Expand
Font size
All Implemented Interfaces:
IRouteProvider<ShortestPathData<ConveyorNode<?>,​ConveyorPath<?>>>, AggregatableAnimationElement, HasLevel, INetwork<ConveyorNode<?>,​ConveyorPath<?>>, LevelElement, LevelMarkup, java.io.Serializable

public class ConveyorNetwork
extends AbstractNetwork<ConveyorNode<?>,​ConveyorPath<?>,​Agent>
implements LevelMarkup, AggregatableAnimationElement
See Also:
Serialized Form

Constructor Summary

Constructors 
ConveyorNetwork​(Agent owner, java.lang.String name)  
ConveyorNetwork​(Agent owner, java.lang.String name, ShapeDrawMode drawMode, double z)
Deprecated.
deprecated in version 8.5.0, will be removed in the future releases
ConveyorNetwork​(Agent owner, java.lang.String name, ShapeDrawMode drawMode, double z, boolean isPublic, boolean visible)
Deprecated.
deprecated in version 8.5.0, will be removed in the future releases
ConveyorNetwork​(Agent owner, java.lang.String name, ShapeDrawMode drawMode, double z, boolean isPublic, boolean visible, ConveyorMarkupElement<?>... contents)
Deprecated.
deprecated in version 8.5.0, will be removed in the future releases
Constructor Description

Method Summary

All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
void add​(ConveyorSpur<?> element)
Adds the spur to the network.
void add​(ConveyorStation<?> element)
Adds the station to the network.
void add​(PositionOnConveyor<?> element)
Adds the position on conveyor to the network.
void addAll​(ConveyorMarkupElement<?>... elements)
Adds elements to this network
static NetworkPort createPort​(Agent owner, ConveyorPath<?> path, PathEndType type)
Deprecated.
java.util.stream.Stream<? extends AbstractMarkup> elementsInternal()
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
BoundingRectangle getBoundingRectangle()  
java.lang.Class<? extends ExtAgentWithSpatialMetrics> getCompatibleAgentExtensionClass()
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
ShapeDrawMode getDrawMode()
Returns the drawing mode of the shape (where to draw this shape: 2D, 3D or 2D+3D).
If the shape has been created with no-argument constructor, and has no specific limitations (like 2D-only), and drawing mode hasn't yet been set, then it is initialized to default (2D + 3D).
Level getLevel()
Returns the level where this conveyor network is located.
double getPlainDistance​(Point firstPoint, Point secondPoint)
Straight line distance between two points.
java.util.List<PositionOnConveyor<?>> getPositionsOnConveyors()
Returns the list of position on conveyor elements belonging to this conveyor network.
Agent getSpace()
Returns the space where the markup element is defined
java.util.List<ConveyorSpur<?>> getSplitMerges()
Deprecated.
will be removed in the next release.
java.util.List<ConveyorSpur<?>> getSpurs()
Returns the list of conveyor spur elements belonging to this conveyor network.
java.util.List<ConveyorStation<?>> getStations()
Returns the list of stations belonging to this conveyor network.
double getZ()
Returns the base level z coordinate.
void setDrawMode​(ShapeDrawMode drawMode)
Sets the drawing mode of the shape (where to draw this shape: 2D, 3D or 2D+3D).
This method may be called only for shapes created using no-argument constructor (which have no limitations like 2D-only) and only once.
void setLevel​(Level level)
Sets the new level where this conveyor network will be located.
void setZ​(double z)
Sets the base level z coordinate.
Modifier and Type Method Description

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

add, add, getDistance, getDistance, getDistance, getDistance, getDistance, getDistance, getDistance, getDistance, getDistance, getDistance, getDistance, getDistance, getDistance, getDistance, getDistance, getDistance, getDistance, getDistance, getDistance, getLength, getNearestNetworkElement, getNearestNetworkElement, getNearestNetworkElement, getNearestNode, getNearestNode, getNearestNode, getNearestNode, getNearestPath, getNearestPath, getNearestPath, getNode, getNodeCount, getPath, getPathCount, getPathData, getPlainDistance, getPosition, getPosition, getPositionAtOffset, getRelatedNetworks, nodes, paths, ports

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

error, getName, getOwner, initializeInternal, isVisible, onAggregatorVisibilityChanged, setVisible

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

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

initializeInternal, onAggregatorVisibilityChanged, postInitialize

Constructor Detail

ConveyorNetwork

public ConveyorNetwork​(Agent owner,
                       java.lang.String name)

ConveyorNetwork

@Deprecated
public ConveyorNetwork​(Agent owner,
                       java.lang.String name,
                       ShapeDrawMode drawMode,
                       double z)
Deprecated.
deprecated in version 8.5.0, will be removed in the future releases
Parameters:
owner -
name -
drawMode -
z -

ConveyorNetwork

@Deprecated
public ConveyorNetwork​(Agent owner,
                       java.lang.String name,
                       ShapeDrawMode drawMode,
                       double z,
                       boolean isPublic,
                       boolean visible)
Deprecated.
deprecated in version 8.5.0, will be removed in the future releases
Parameters:
owner -
name -
drawMode -
z -
isPublic -
visible -

ConveyorNetwork

@Deprecated
public ConveyorNetwork​(Agent owner,
                       java.lang.String name,
                       ShapeDrawMode drawMode,
                       double z,
                       boolean isPublic,
                       boolean visible,
                       ConveyorMarkupElement<?>... contents)
Deprecated.
deprecated in version 8.5.0, will be removed in the future releases
Parameters:
owner -
name -
drawMode -
z -
isPublic -
visible -
contents -

Method Detail

getLevel

public Level getLevel()
Returns the level where this conveyor network is located.
Specified by:
getLevel in interface HasLevel
Returns:
conveyor network level

setLevel

public void setLevel​(Level level)
Sets the new level where this conveyor network will be located.
Specified by:
setLevel in interface LevelElement
Parameters:
level - - the new level

setDrawMode

public void setDrawMode​(ShapeDrawMode drawMode)
Sets the drawing mode of the shape (where to draw this shape: 2D, 3D or 2D+3D).
This method may be called only for shapes created using no-argument constructor (which have no limitations like 2D-only) and only once. Any subsequent call for a shape having drawing mode already set, will throw error.
Parameters:
drawMode - where to draw this shape: 2D, 3D or 2D+3D

getDrawMode

public ShapeDrawMode getDrawMode()
Returns the drawing mode of the shape (where to draw this shape: 2D, 3D or 2D+3D).
If the shape has been created with no-argument constructor, and has no specific limitations (like 2D-only), and drawing mode hasn't yet been set, then it is initialized to default (2D + 3D).

setZ

public void setZ​(double z)
Sets the base level z coordinate. Elements in network have z-coordinates related to this level.
Parameters:
z - the base level z coordinate

getZ

public double getZ()
Returns the base level z coordinate. Elements in network have z-coordinates related to this level.
Returns:
the base level z coordinate

getSpace

public Agent getSpace()
Description copied from interface: INetwork
Returns the space where the markup element is defined
Specified by:
getSpace in interface INetwork<ConveyorNode<?>,​ConveyorPath<?>>
Returns:
the space associated with this element

elementsInternal

@AnyLogicInternalAPI
public java.util.stream.Stream<? extends AbstractMarkup> elementsInternal()
Description copied from class: AbstractMarkupAggregator
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
Specified by:
elementsInternal in class AbstractMarkupAggregator<Agent>

addAll

public void addAll​(ConveyorMarkupElement<?>... elements)
Adds elements to this network
Parameters:
elements - array or comma separated elements of types:
  • ConveyorNode
  • ConveyorPath
  • ConveyorStation
  • ConveyorSpur
  • PositionOnConveyor

add

public void add​(ConveyorStation<?> element)
Adds the station to the network.
Parameters:
element - conveyor station, instance of ConveyorStation<?>

add

public void add​(ConveyorSpur<?> element)
Adds the spur to the network.
Parameters:
element - spur, instance of ConveyorSpur;?>

add

public void add​(PositionOnConveyor<?> element)
Adds the position on conveyor to the network. The network should be uninitialized
Parameters:
element - position on coveyor, instance of PositionOnConveyor;?>

getStations

public java.util.List<ConveyorStation<?>> getStations()
Returns the list of stations belonging to this conveyor network.
Returns:
Returns the list of stations.

getSpurs

public java.util.List<ConveyorSpur<?>> getSpurs()
Returns the list of conveyor spur elements belonging to this conveyor network.
Returns:
Returns the list of conveyor spur elements.

getSplitMerges

@Deprecated
public java.util.List<ConveyorSpur<?>> getSplitMerges()
Deprecated.
will be removed in the next release. Please use getSpurs() instead

getPositionsOnConveyors

public java.util.List<PositionOnConveyor<?>> getPositionsOnConveyors()
Returns the list of position on conveyor elements belonging to this conveyor network.
Returns:
Returns the list of position on conveyor elements.

getCompatibleAgentExtensionClass

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

getPlainDistance

public double getPlainDistance​(Point firstPoint,
                               Point secondPoint)
Description copied from interface: INetwork
Straight line distance between two points.
Specified by:
getPlainDistance in interface INetwork<ConveyorNode<?>,​ConveyorPath<?>>
Specified by:
getPlainDistance in class AbstractNetwork<ConveyorNode<?>,​ConveyorPath<?>,​Agent>
Returns:
distance between two points

createPort

@Deprecated
public static NetworkPort createPort​(Agent owner,
                                     ConveyorPath<?> path,
                                     PathEndType type)
Deprecated.
Creates and returns a port of type NetworkPort that will connect this network to the specified path
Parameters:
owner - markup owner
path - the path that the network will be connected to through the returned port
type - BEGIN or END specifying the starting or ending point of the path
Returns:
created network port

getBoundingRectangle

@AnyLogicInternalAPI
public BoundingRectangle getBoundingRectangle()
How can we improve this article?