Skip to content

Commit

Permalink
Updated readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
ricnogfer committed Jun 8, 2023
1 parent 1d1d45d commit b736f2b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,17 @@ By default, PyPSATopo generates the topographical representation of a PyPSA-base
pypsatopo.generate(my_network, file_format = "gif")
```

Also, by default, PyPSATopo generates the topographical representation of the entire network. This might be particularly overwhelming (visually speaking) depending on the complexity of the network - see [PyPSA-Eur network topographical representation](resources/pypsa-eur_topography.svg) as an example. To mitigate this, parameters `focus` and `neighbourhood` (in function `generate`) may be utilized in combination to focus on a particular aspect/segment of the network. The former tells PyPSATopo which bus to start visiting, while the latter tells how much neighbourhood (around the bus) should be visited (in other words, how much (indirect) components attached to the bus should be included in the representation). For example, setting parameters `focus = "process emissions"` and `neighbourhood = 2` (which focuses/starts on the `process emissions` bus and includes all the components attached to it up to a maximum neighbourhood degree of `2`) yields this [result](resources/pypsa-eur_process_emissions_topography.svg) upon generating PyPSA-Eur network topographical representation.
Also, by default, PyPSATopo generates the topographical representation of the entire network. This might be particularly overwhelming (visually speaking) depending on the complexity of the network - see [PyPSA-Eur network topographical representation](resources/pypsa-eur_topography.svg) as an example. To mitigate this, parameters `focus` and `neighbourhood` (in function `generate`) may be utilized in combination to focus on a particular aspect/segment of the network. The former tells PyPSATopo which bus to start visiting, while the latter tells how much neighbourhood (around the bus) should be visited (in other words, how much (indirect) components attached to the bus should be included in the representation). For example, setting parameters `focus = "DK1 0 low voltage"` and `neighbourhood = 2` (which focuses/starts on `DK1 0 low voltage` bus and includes all the components attached to it up to a maximum neighbourhood degree of `2`) yields this [result](resources/pypsa-eur_dk1_0_low_voltage_topography.svg) upon generating PyPSA-Eur network topographical representation.

Just like for links with positive efficiencies, links with negative efficiencies are represented by a line going from *bus0* to, e.g., *bus1* with an arrow pointing to the latter at the end of the line. In case of need to invert the sense of the arrow (i.e. to point to *bus0* instead) when dealing with negative efficiencies, set parameter `negative_efficiency = False` when calling function `generate`.

All broken links and missing buses are included in the topographical representation of a network by default, and are shown in (slightly) different shapes and colors. To exclude these from the representation, set parameter `broken_missing = False` when calling function `generate`.

To color a certain component (namely: bus, generator, load, store or line) in function of its carrier, set parameter `carrier_color` (when calling function `generate`) with a dictionary containing key-value pairs, where key is the name of a carrier and value is a color assigned to it. Example: setting parameter `carrier_color = {"my_carrier1": "red", "my_carrier2": "green", "my_carrier3": "blue"}` tells PyPSATopo to color a component in `red`, `green` or `blue` whenever its carrier is `my_carrier1`, `my_carrier2` or `my_carrier3`, respectively. Acceptable colors are defined [here](https://graphviz.org/doc/info/colors.html). Alternatively, in case `carrier_color` is set to `True` (instead of a dictionary), PyPSATopo automatically assigns a new color to each distinct carrier found in the network and colors all the components associated to the carrier with this color.

Additionally, in case fine-grained selection/visiting logic is needed, parameters `bus_filter`, `generator_filter`, `load_filter`, `store_filter`, `link_filter` and `line_filter` (in function `generate`) may be utilized in combination or separately. These parameters are expected to be (user-defined) [regular expressions](https://en.wikipedia.org/wiki/Regular_expression). While parameters `bus_filter`, `generator_filter`, `load_filter` and `store_filter` tell PyPSATopo which buses, generators, loads and stores to include/exclude, parameters `link_filter` and `line_filter` tell which links and lines may be visited (or not) upon generating the topographical representation of a network.
In case fine-grained selection/visiting logic is needed, parameters `bus_filter`, `generator_filter`, `load_filter`, `store_filter`, `link_filter` and `line_filter` (in function `generate`) may be utilized in combination or separately. These parameters are expected to be (user-defined) [regular expressions](https://en.wikipedia.org/wiki/Regular_expression). While parameters `bus_filter`, `generator_filter`, `load_filter` and `store_filter` tell PyPSATopo which buses, generators, loads and stores to include/exclude, parameters `link_filter` and `line_filter` tell which links and lines may be visited (or not) upon generating the topographical representation of a network.

By default, excluded components are not shown in the topographical representation of a network. In certain situations, however, it might be useful to understand where selected (included) components are located in the representation among excluded components. To show selected components in the topographical representation of a network among excluded components, set parameter `context = True` when calling function `generate`. While selected components are shown with the appropriate colors, excluded components are shown with faded colors (to distingish these from the formers).

Given that it may take some time to process a complex network, PyPSATopo is capable of displaying log messages while processing such network. Log messages not only describe the stage at which the tool is in the processing pipeline but also potential issues that the network may have. To enable PyPSATopo displaying log messages, set parameter `quiet = False` (when calling function `generate`). Otherwise, in case the parameter is not set, the tool behaves quietly by default (i.e. no log messages are displayed).

Expand Down

0 comments on commit b736f2b

Please sign in to comment.