Skip to content

Commit

Permalink
update name and description of busmap_from_psql
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosEpia committed Oct 18, 2023
1 parent 7e0eb63 commit 9529a8d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
4 changes: 2 additions & 2 deletions etrago/cluster/electrical.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import pypsa.io as io

from etrago.cluster.spatial import (
busmap_from_psql,
busmap_ehv_clustering,
group_links,
kmean_clustering,
kmedoids_dijkstra_clustering,
Expand Down Expand Up @@ -469,7 +469,7 @@ def ehv_clustering(self):

delete_ehv_buses_no_lines(self.network)

busmap = busmap_from_psql(self)
busmap = busmap_ehv_clustering(self)

self.network, busmap = cluster_on_extra_high_voltage(
self, busmap, with_time=True
Expand Down
16 changes: 6 additions & 10 deletions etrago/cluster/spatial.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,20 +479,16 @@ def busmap_by_shortest_path(etrago, fromlvl, tolvl, cpu_cores=4):
return busmap


def busmap_from_psql(etrago):
def busmap_ehv_clustering(etrago):
"""
Retrieves busmap from `model_draft.ego_grid_pf_hv_busmap` on the
<OpenEnergyPlatform>[www.openenergy-platform.org] by a given scenario
name. If this busmap does not exist, it is created with default values.
Generates a busmap that can be used to cluster an electrical network to
only extra high voltage buses. If a path to a busmap in a csv file is
passed in the arguments, it loads the csv file and returns it.
Parameters
----------
network : pypsa.Network
Container for all network components.
session : sqlalchemy.orm.session.Session object
Establishes interactions with the database.
scn_name : str
Name of the scenario.
etrago : Etrago
An instance of the Etrago class
Returns
-------
Expand Down

0 comments on commit 9529a8d

Please sign in to comment.