Class MacroscopicGridNetworkLayerGenerator
- java.lang.Object
-
- org.goplanit.network.layer.macroscopic.MacroscopicGridNetworkLayerGenerator
-
- All Implemented Interfaces:
NetworkLayerGenerator
public class MacroscopicGridNetworkLayerGenerator extends Object implements NetworkLayerGenerator
Generate a grid based network layer for specified modes of a given size. When using defaults it creates one link segment type named "default".- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description static String
PHYSICAL_LINK_SEGMENT_TYPE_NAME
name used for default physical link segment type name
-
Constructor Summary
Constructors Modifier Constructor Description protected
MacroscopicGridNetworkLayerGenerator(int rows, int columns, MacroscopicNetworkLayers layersContainer, Mode... modes)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MacroscopicGridNetworkLayerGenerator
create(int rows, int columns, MacroscopicNetworkLayers layersContainer, Mode... modes)
create the generator with a number of rows and columns.MacroscopicNetworkLayer
generate()
Generate a macroscopic network layer based on the configured grid
-
-
-
Field Detail
-
PHYSICAL_LINK_SEGMENT_TYPE_NAME
public static final String PHYSICAL_LINK_SEGMENT_TYPE_NAME
name used for default physical link segment type name- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MacroscopicGridNetworkLayerGenerator
protected MacroscopicGridNetworkLayerGenerator(int rows, int columns, MacroscopicNetworkLayers layersContainer, Mode... modes)
Constructor- Parameters:
rows
- to usecolumns
- to uselayersContainer
- to usemodes
- to support
-
-
Method Detail
-
generate
public MacroscopicNetworkLayer generate()
Generate a macroscopic network layer based on the configured grid- Specified by:
generate
in interfaceNetworkLayerGenerator
- Returns:
- created layer
-
create
public static MacroscopicGridNetworkLayerGenerator create(int rows, int columns, MacroscopicNetworkLayers layersContainer, Mode... modes)
create the generator with a number of rows and columns. It is assumed that the grid has coordinates in Cartesian form in meters. A single link segment type is created with the name "default" but without setting capacity, max density or access group information. This is left to the invoked of this method to further specify.- Parameters:
rows
- to usecolumns
- to uselayersContainer
- to register onmodes
- to support- Returns:
- created grid network layer
-
-