Plot Network Example

[1]:
from IPython.display import display, HTML
display(HTML('<a target="_blank" href="https://colab.research.google.com/github/WaterFutures/EPyT-Flow/blob/main/docs/examples/plot_network.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>'))
Open In Colab

This example demonstrates how to plot the network of a WDN.

[2]:
%pip install epyt-flow --quiet
Note: you may need to restart the kernel to use updated packages.
[3]:
from epyt_flow.data.networks import load_anytown
from epyt_flow.simulation import ScenarioSimulator

Load Anytown network by calling load_anytown():

[4]:
network_config = load_anytown(verbose=False)

Create dummy scenario simulator:

[5]:
wdn = ScenarioSimulator(scenario_config=network_config)

Plot the network topology by calling plot_topology() of the ScenarioSimulator instance:

[6]:
wdn.plot_topology()
../_images/examples_plot_network_10_0.png

Do not forget to close the simulator!

[7]:
wdn.close()
[ ]: