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

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

Constructor Summary

ConstructorDescription
ConveyorNetwork(Agent owner, String name) 
ConveyorNetwork(Agent owner, String name, ShapeDrawMode drawMode, double z)
Deprecated.
deprecated in version 8.5.0, will be removed in the future releases
ConveyorNetwork(Agent owner, 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, 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

Method Summary

Modifier and TypeMethodDescription
voidadd(ConveyorSpur<?> element)
Adds the spur to the network.
voidadd(ConveyorStation<?> element)
Adds the station to the network.
voidadd(PositionOnConveyor<?> element)
Adds the position on conveyor to the network.
voidaddAll(ConveyorMarkupElement<?>... elements)
Adds elements to this network
static NetworkPortcreatePort(Agent owner, ConveyorPath<?> path, PathEndType type)
Deprecated.
Stream<? extends AbstractMarkup>elementsInternal()
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
BoundingRectanglegetBoundingRectangle() 
Class<? extends ExtAgentWithSpatialMetrics>getCompatibleAgentExtensionClass()
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
ShapeDrawModegetDrawMode()
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).
LevelgetLevel()
Returns the level where this conveyor network is located.
doublegetPlainDistance(Point firstPoint, Point secondPoint)
Straight line distance between two points.
List<PositionOnConveyor<?>>getPositionsOnConveyors()
Returns the list of position on conveyor elements belonging to this conveyor network.
AgentgetSpace()
Returns the space where the markup element is defined
List<ConveyorSpur<?>>getSplitMerges()
Deprecated.
will be removed in the next release.
List<ConveyorSpur<?>>getSpurs()
Returns the list of conveyor spur elements belonging to this conveyor network.
List<ConveyorStation<?>>getStations()
Returns the list of stations belonging to this conveyor network.
doublegetZ()
Returns the base level z coordinate.
voidsetDrawMode(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.
voidsetLevel(Level level)
Sets the new level where this conveyor network will be located.
voidsetZ(double z)
Sets the base level z coordinate.

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 Details

ConveyorNetwork

public ConveyorNetwork(Agent owner,
 String name)

ConveyorNetwork

@Deprecated
public ConveyorNetwork(Agent owner,
 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,
 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,
 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 Details

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 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 List<ConveyorStation<?>> getStations()
Returns the list of stations belonging to this conveyor network.
Returns:
Returns the list of stations.

getSpurs

public 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 List<ConveyorSpur<?>> getSplitMerges()
Deprecated.
will be removed in the next release. Please use getSpurs() instead

getPositionsOnConveyors

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