net2grid: An open-source academic research tool for building macro GMNS networks from micro GMNS networks for transportation system modeling and optimization
- shapely
The recommended way to install use the package is colning the source code from github.
>>>import net2grid as ng
"""Step 1: Read GMNS network"""
net=ng.read_gmns_network_from_csv('./data')
"""Step 2: Build macro GMNS network"""
# set the number of grids to build a macro GMNS network
ng.partition_grid(net,n_grids=(100,100))
# or set the size of grids to build a macro GMNS network
# ng.partition_grid(net,s_grids=(0.005,0.005))
"""Step 3: Save network files"""
ng.save_network(net,output_folder='./macro_network_by_n_grids')
micro gmns network 1:
micro gmns network 2:
micro gmns network 3:
macro gmns network 1:
macro gmns network 2:
macro gmns network 3:
micro gmns network 1:
micro gmns network 2:
micro gmns network 3:
macro gmns network 1:
macro gmns network 2: