Package com.anylogic.engine.markup
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- initialize
- addAll
- add
- add
- setDensityMap
- getZ
- getZ
- getGates
- getNodes
- getAreas
- getWalls
- getTargetLines
- getPedFlowStatistics
- getDensityMap
- getDensityMaps
- getDensityMap
- getPathways
- getServices
- getEscalators
- getLifts
- getCranes
- getStorages
- getBulkConveyorBelts
- getPipes
- getStorageTanks
- getNetworks
- getConveyorNetworks
- getRailwayNetworks
- getRoadNetworks
- getShapes
- getObstacles
- elementsInternal
- getSpace
- setDataSource
- getPeds
- size
- pedestriansCount
- getCompatibleAgentExtensionClass
- getBoundingRectangle
- getMarkups
- toString
- java.lang.Object
- com.anylogic.engine.markup.AbstractMarkupAggregator<Agent>
- com.anylogic.engine.markup.AbstractDrawableMarkupAggregator
- com.anylogic.engine.markup.Level
- All Implemented Interfaces:
Serializable
public class Level extends AbstractDrawableMarkupAggregator
Level logically groups other animation elements like shapes, space markup elements, controls and charts.
Levels operate with top-level elements, e.g. a shape inside a group knows about level from that group,
and a path inside a network knows about level from that network.
- Author:
- AnyLogic North America, LLC https://anylogic.com
- See Also:
- Serialized Form
Constructor | Description |
---|---|
Level | |
Level | |
Level |
Modifier and Type | Method | Description |
---|---|---|
void | add |
Add shape to this level
|
void | add |
Add markup element to this level
|
void | addAll |
Adds specified elements to the level.
|
Stream<? extends AggregatableAnimationElement> | elementsInternal() |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. |
List<AreaNode> | getAreas() |
Deprecated.
|
BoundingRectangle | getBoundingRectangle() | |
List<BulkConveyorBelt> | getBulkConveyorBelts() |
Returns a list of all conveyor belts on this level
|
final Class<? extends ExtAgentWithSpatialMetrics> | getCompatibleAgentExtensionClass() | |
List<ConveyorNetwork> | getConveyorNetworks() |
Returns a list of all conveyor networks on this level
|
List<Crane<?>> | getCranes() |
Returns a list of all cranes on this level
|
DensityMap | getDensityMap() |
Deprecated.
deprecated in version 8.5.0, will be removed in the future releases.
|
DensityMap | getDensityMap |
Returns the density map of a particular type from this level
|
List<DensityMap> | getDensityMaps() |
Returns a list of all density maps on this level
|
List<EscalatorGroup> | getEscalators() |
Returns a list of all escalator groups on this level
|
List<LevelGate> | getGates() |
Returns a list of all gates on this level
|
List<Lift<?>> | getLifts() |
Returns a list of all lifts on this level
|
List<LevelMarkup> | getMarkups() | |
List<Network> | getNetworks() |
Returns a list of all networks on this level
|
List<Node> | getNodes() |
Returns a list of all nodes on this level
|
List<Obstacle> | getObstacles() |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. |
List<Pathway> | getPathways() |
Returns a list of all pathways on this level
|
List<PedFlowStatistics> | getPedFlowStatistics() |
Returns a list of all elements that collect pedestrian statistics on this level.
|
Collection<Agent> | getPeds() |
Return unmodifiable list of all the pedestrians in this level.
|
List<Pipe> | getPipes() |
Returns a list of all pipes on this level
|
List<RailwayNetwork> | getRailwayNetworks() |
Returns a list of all railway networks on this level
|
List<RoadNetwork> | getRoadNetworks() |
Returns a list of all road networks on this level
|
List<ServiceBase<?, | getServices() |
Returns a list of all services on this level
|
List<Object> | getShapes() |
Returns the collection of shapes in the level.
|
Agent | getSpace() |
Returns the space where the markup element is defined
|
List<Storage> | getStorages() |
Returns a list of all storages on this level
|
List<StorageTank> | getStorageTanks() |
Returns a list of all storage tanks on this level
|
List<TargetLine> | getTargetLines() |
Returns a list of all target lines on this level
|
List<AbstractWall> | getWalls() |
Returns a list of all walls on this level
|
double | getZ() |
Returns the base level z coordinate.
|
double | getZ |
Returns the z coordinate of the given point
|
void | initialize() |
This method finalizes creation of level.
|
int | pedestriansCount() |
Returns number of pedestrians currently on this level.
|
void | setDataSource | |
void | setDensityMap |
Deprecated.
deprecated in version 8.5.0, will be removed in the future releases.
|
int | size() |
Deprecated.
deprecated in version 8.5.0, will be removed in the future releases.
|
String | toString() |
public Level(Agent owner, String name, ShapeDrawMode drawMode, double z)
public Level(Agent owner, String name, ShapeDrawMode drawMode, double z, boolean isPublic, boolean visible)
public Level(Agent owner, String name, ShapeDrawMode drawMode, double z, boolean isPublic, boolean visible, LevelMarkup... markupShapes)
public void initialize()
This method finalizes creation of level. Should be called for levels created using
short versions of constructors (without markup shapes) - after all the elements are added to the level.
Invokes initialization for all the contained elements.
public void addAll(LevelElement... elements)
Adds specified elements to the level. The level should be uninitialized.
- Parameters:
elements
- elements to be added. Pass an array of elements or specify them separated by commas
public void add(LevelMarkup markup)
Add markup element to this level
- Parameters:
markup
- markup element
public void add(LevelElement shape)
Add shape to this level
- Parameters:
shape
- shape element
@Deprecated public void setDensityMap(DensityMap densityMap)
Deprecated.
deprecated in version 8.5.0, will be removed in the future releases. Please use
add(LevelMarkup markup)
instead- Parameters:
densityMap
- the density map
public double getZ()
Returns the base level z coordinate. Areas in this level may modify the level
- Returns:
- the base level z coordinate
- See Also:
public double getZ(double x, double y)
Returns the z coordinate of the given point
- Returns:
- the z coordinate of the given point
public List<LevelGate> getGates()
Returns a list of all gates on this level
public List<Node> getNodes()
Returns a list of all nodes on this level
@Deprecated public List<AreaNode> getAreas()
Deprecated.
NB: the returned list also contains areas from services
- Returns:
public List<AbstractWall> getWalls()
Returns a list of all walls on this level
public List<TargetLine> getTargetLines()
Returns a list of all target lines on this level
public List<PedFlowStatistics> getPedFlowStatistics()
Returns a list of all elements that collect pedestrian statistics on this level.
@Deprecated public DensityMap getDensityMap()
Deprecated.
deprecated in version 8.5.0, will be removed in the future releases. Please use
getDensityMaps()
instead- Returns:
- pedestrian density map
public List<DensityMap> getDensityMaps()
Returns a list of all density maps on this level
public DensityMap getDensityMap(DensityMapType type)
Returns the density map of a particular type from this level
- Parameters:
type
- the type of the density map: either pedestrian or transporter
public List<Pathway> getPathways()
Returns a list of all pathways on this level
public List<ServiceBase<?,?>> getServices()
Returns a list of all services on this level
public List<EscalatorGroup> getEscalators()
Returns a list of all escalator groups on this level
public List<Lift<?>> getLifts()
Returns a list of all lifts on this level
public List<Crane<?>> getCranes()
Returns a list of all cranes on this level
public List<Storage> getStorages()
Returns a list of all storages on this level
public List<BulkConveyorBelt> getBulkConveyorBelts()
Returns a list of all conveyor belts on this level
public List<Pipe> getPipes()
Returns a list of all pipes on this level
public List<StorageTank> getStorageTanks()
Returns a list of all storage tanks on this level
public List<Network> getNetworks()
Returns a list of all networks on this level
public List<ConveyorNetwork> getConveyorNetworks()
Returns a list of all conveyor networks on this level
public List<RailwayNetwork> getRailwayNetworks()
Returns a list of all railway networks on this level
public List<RoadNetwork> getRoadNetworks()
Returns a list of all road networks on this level
public List<Object> getShapes()
Returns the collection of shapes in the level. The
collection can contain either members of class
Shape
for shapes,
and of class ReplicatedShape
for replicated shapes.
It may also contain 3D lights and cameras.- Returns:
- the collection of shapes in the level
@AnyLogicInternalAPI public List<Obstacle> getObstacles()
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.
@AnyLogicInternalAPI public Stream<? extends AggregatableAnimationElement> 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 Agent getSpace()
Returns the space where the markup element is defined
- Returns:
- the space associated with this element
@AnyLogicInternalAPI public void setDataSource(LevelDataSource dataSource)
public Collection<Agent> getPeds()
Return unmodifiable list of all the pedestrians in this level.
- Returns:
- list of all the pedestrians in this level
@Deprecated public int size()
Deprecated.
deprecated in version 8.5.0, will be removed in the future releases. Please use
pedestriansCount()
instead
Returns number of pedestrians currently on this level.- Returns:
- number of pedestrians currently on this level.
public int pedestriansCount()
Returns number of pedestrians currently on this level.
- Returns:
- number of pedestrians currently on this level.
@AnyLogicInternalAPI public final Class<? extends ExtAgentWithSpatialMetrics> getCompatibleAgentExtensionClass()
@AnyLogicInternalAPI public BoundingRectangle getBoundingRectangle()
@AnyLogicInternalAPI public List<LevelMarkup> getMarkups()
public String toString()