Choosing signal placing based on traffic flows

Contents

Choosing signal placing based on traffic flows#

In this example we show how to use Polaris-Studio to determine which intersections would require traffic control signals based on the first three criteria from the US FHWA’s “Manual on Uniform Traffic Control Devices for Streets and Highways”.

This resource is particularly relevant for future scenarios, as base-year traffic signal location can be obtained from Open Street Maps.

For reference, see chapter 4C of the MUTCD, which provides the criteria for signal placement: https://mutcd.fhwa.dot.gov/pdfs/11th_Edition/mutcd11thedition.pdf

Imports#

from polaris import Polaris
from polaris.utils.testing.temp_model import TempModel

Open the Network and build the signals based on traffic flows

model_fldr = TempModel("Grid")

pol = Polaris.from_dir(model_fldr)
network = pol.network
nodes = network.tables.get("Node")
links = network.tables.get("Link")
prev_signals = network.tables.get("Signal").nodes

m = links.explore(tiles=None)
nodes[nodes.node.isin(prev_signals)].explore(m=m, color="black", style_kwds={"radius": 5, "fillOpacity": 1.0},
                                             name="nodes")
Make this Notebook Trusted to load map: File -> Trust Notebook


Now we rebuild the intersections with signals placed according to traffic flows and see the result

network.tools.rebuild_intersections(signals="flow-based", h5_results_file=pol.result_h5_file)

new_signals = network.tables.get("Signal").nodes

m = links.explore(tiles=None)
nodes[nodes.node.isin(new_signals)].explore(m=m, color="black", style_kwds={"radius": 5, "fillOpacity": 1.0},
                                            name="nodes")
Make this Notebook Trusted to load map: File -> Trust Notebook


Total running time of the script: (0 minutes 21.565 seconds)

Gallery generated by Sphinx-Gallery