Package com.anylogic.engine.markup
- Constructor Summary
- Method Summary
- Methods inherited from class com.anylogic.engine.markup.AbstractNetwork
- Methods inherited from class com.anylogic.engine.markup.AbstractMarkupAggregator
- Methods inherited from class java.lang.Object
- Methods inherited from interface com.anylogic.engine.markup.AggregatableAnimationElement
- Constructor Detail
- Method Detail
- java.lang.Object
-
- com.anylogic.engine.markup.AbstractMarkupAggregator<Owner>
-
- com.anylogic.engine.markup.AbstractNetwork<Node,Path,Agent>
-
- com.anylogic.engine.markup.Network
- All Implemented Interfaces:
IRouteProvider<ShortestPathData<Node,Path>>
,AggregatableAnimationElement
,HasLevel
,INetwork<Node,Path>
,LevelElement
,LevelMarkup
,java.io.Serializable
public class Network extends AbstractNetwork<Node,Path,Agent> implements LevelMarkup, AggregatableAnimationElement
Implementation of network for agent movement in continuous space.
- Author:
- AnyLogic North America, LLC https://anylogic.com
- See Also:
- Serialized Form
Network(Agent owner,
java.lang.String name) |
Creates a network with a specified owner and name
|
Network(Agent owner,
java.lang.String name,
ShapeDrawMode drawMode,
double z) |
Deprecated.
deprecated in version 8.5.0, will be removed in the future releases.
|
Network(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.
|
Network(Agent owner,
java.lang.String name,
ShapeDrawMode drawMode,
double z,
boolean isPublic,
boolean visible,
NetworkMarkupElement... markupShapes) |
Deprecated.
deprecated in version 8.5.0, will be removed in the future releases.
|
Constructor | Description |
---|
void |
add(PalletRack palletRack) |
Adds a pallet rack to the network.
|
void |
addAll(NetworkMarkupElement... markupShapes) |
Adds all arguments to the network
|
static NetworkPort |
createPort(Agent owner,
Path 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 (either 2D, 3D, or 2D&3D).
If the shape has been created with a no-argument constructor, has no specific limitations on the drawing mode (e.g., 2D only), and its drawing mode hasn't been set yet, then it is initialized to the default 2D&3D drawing mode. |
Level |
getLevel() |
Returns the level where this network is located.
|
java.util.List<PalletRack> |
getPalletRacks() |
Returns
List of all PalletRack in the network. |
double |
getPlainDistance(Point firstPoint,
Point secondPoint) |
|
Agent |
getSpace() |
Returns the space where the space markup element is defined
|
double |
getZ() |
Returns the z-coordinate of the base level.
|
void |
setDrawMode(ShapeDrawMode drawMode) |
Sets the drawing mode of the shape (either 2D, 3D, or 2D&3D).
This method may be called only once and only for the shapes which are created using a no-argument constructor (since they have no limitations on the drawing mode, e.g. |
void |
setLevel(Level level) |
Sets the new level where this network will be located.
|
void |
setZ(double z) |
Sets the z-coordinate of the base level.
|
Modifier and Type | Method | Description |
---|
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
error, getName, getOwner, initializeInternal, isVisible, onAggregatorVisibilityChanged, setVisible
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initializeInternal, onAggregatorVisibilityChanged, postInitialize
public Network(Agent owner, java.lang.String name)
Creates a network with a specified owner and name
- Parameters:
owner
- - the agent to whom this new instance belongsname
- - the name of the network
@Deprecated public Network(Agent owner, java.lang.String name, ShapeDrawMode drawMode, double z)
Deprecated.
deprecated in version 8.5.0, will be removed in the future releases. Use
Network(Agent, String)
@Deprecated public Network(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. Use
Network(Agent, String)
@Deprecated public Network(Agent owner, java.lang.String name, ShapeDrawMode drawMode, double z, boolean isPublic, boolean visible, NetworkMarkupElement... markupShapes)
Deprecated.
deprecated in version 8.5.0, will be removed in the future releases. Use
Network(Agent, String)
@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.
it may be removed/renamed in future.
- Specified by:
elementsInternal
in classAbstractMarkupAggregator<Agent>
public void addAll(NetworkMarkupElement... markupShapes)
Adds all arguments to the network
- Parameters:
markupShapes
- - an instance of any of the following classes:Node
,Path
,PalletRack
public void setDrawMode(ShapeDrawMode drawMode)
Sets the drawing mode of the shape (either 2D, 3D, or 2D&3D).
This method may be called only once and only for the shapes which are created using a no-argument constructor (since they have no limitations on the drawing mode, e.g. 3D only). Any subsequent call for a shape that has the drawing mode already set, will throw an error.
This method may be called only once and only for the shapes which are created using a no-argument constructor (since they have no limitations on the drawing mode, e.g. 3D only). Any subsequent call for a shape that has the drawing mode already set, will throw an error.
- Parameters:
drawMode
- where to draw this shape: 2D, 3D, or 2D&3D
public ShapeDrawMode getDrawMode()
Returns the drawing mode of the shape (either 2D, 3D, or 2D&3D).
If the shape has been created with a no-argument constructor, has no specific limitations on the drawing mode (e.g., 2D only), and its drawing mode hasn't been set yet, then it is initialized to the default 2D&3D drawing mode.
If the shape has been created with a no-argument constructor, has no specific limitations on the drawing mode (e.g., 2D only), and its drawing mode hasn't been set yet, then it is initialized to the default 2D&3D drawing mode.
public void setZ(double z)
Sets the z-coordinate of the base level. The elements in the network will have their z-coordinates calculated as relative to this level.
- Parameters:
z
- the z-coordinate of the base level
public double getZ()
Returns the z-coordinate of the base level. The elements in the network will have their z-coordinates calculated as relative to this level.
- Returns:
- the z-coordinate of the base level
public void add(PalletRack palletRack)
Adds a pallet rack to the network.
- Parameters:
palletRack
- - a pallet rack to be added to the network
public java.util.List<PalletRack> getPalletRacks()
Returns
List
of all PalletRack
in the network.- Returns:
- a list of all pallet racks located in this network
public Agent getSpace()
Returns the space where the space markup element is defined
- Specified by:
getSpace
in interfaceINetwork<Node,Path>
- Returns:
- the space associated with this element
public Level getLevel()
Returns the level where this network is located.
public void setLevel(Level level)
Sets the new level where this network will be located.
- Specified by:
setLevel
in interfaceLevelElement
- Parameters:
level
- - the new level
public double getPlainDistance(Point firstPoint, Point secondPoint)
- Specified by:
getPlainDistance
in interfaceINetwork<Node,Path>
- Specified by:
getPlainDistance
in classAbstractNetwork<Node,Path,Agent>
- Returns:
- distance between two points
@AnyLogicInternalAPI public final 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.
it may be removed/renamed in future.
- Specified by:
getCompatibleAgentExtensionClass
in interfaceINetwork<Node,Path>
@Deprecated public static NetworkPort createPort(Agent owner, Path path, PathEndType type)
Deprecated.
Creates
NetworkPort
on the specified path. Note, that this network port should be paired with another one for correct behavior.
See MarkupPort.setPairedPort(MarkupPort)
- Parameters:
owner
- - the created network port will belong to this agentpath
- - the created network port will be connected to this pathtype
- - determines the location of the specified path's ending point- Returns:
- a new network port connected to the specified path
@AnyLogicInternalAPI public BoundingRectangle getBoundingRectangle()
-
How can we improve this article?
-