Skip to content

Commit

Permalink
Chnage names of pypsa modules
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaraBuettner committed Oct 10, 2023
1 parent 378fe5c commit 254c6d6
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion etrago/cluster/electrical.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import logging

from pypsa import Network
from pypsa.networkclustering import (
from pypsa.clustering.spatial import (
aggregatebuses,
aggregategenerators,
aggregateoneport,
Expand Down
2 changes: 1 addition & 1 deletion etrago/cluster/gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import logging

from pypsa import Network
from pypsa.networkclustering import (
from pypsa.clustering.spatial import (
aggregatebuses,
aggregateoneport,
busmap_by_kmeans,
Expand Down
8 changes: 4 additions & 4 deletions etrago/cluster/spatial.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
import multiprocessing as mp

from networkx import NetworkXNoPath
from pypsa.networkclustering import (
_flatten_multiindex,
from pypsa.clustering.spatial import (
flatten_multiindex,
busmap_by_kmeans,
busmap_by_stubs,
get_clustering_from_busmap,
Expand Down Expand Up @@ -237,7 +237,7 @@ def arrange_dc_bus0_bus1(network):
strategies = strategies_links()
strategies.update(cus_strateg)
new_df = links.groupby(grouper, axis=0).agg(strategies)
new_df.index = _flatten_multiindex(new_df.index).rename("name")
new_df.index = flatten_multiindex(new_df.index).rename("name")
new_df = pd.concat(
[new_df, network.links.loc[~links_agg_b]], axis=0, sort=False
)
Expand All @@ -257,7 +257,7 @@ def arrange_dc_bus0_bus1(network):
weighting.loc[df_agg.columns], axis=1
)
pnl_df = df_agg.groupby(grouper, axis=1).sum()
pnl_df.columns = _flatten_multiindex(pnl_df.columns).rename(
pnl_df.columns = flatten_multiindex(pnl_df.columns).rename(
"name"
)
new_pnl[attr] = pd.concat(
Expand Down
2 changes: 1 addition & 1 deletion etrago/tools/constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from pyomo.environ import Constraint
from pypsa.descriptors import expand_series
from pypsa.linopt import define_constraints, define_variables, get_var, linexpr
from pypsa.pf import get_switchable_as_dense as get_as_dense
from pypsa.descriptors import get_switchable_as_dense as get_as_dense
import numpy as np
import pandas as pd
import pyomo.environ as po
Expand Down
2 changes: 1 addition & 1 deletion etrago/tools/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import time

from pypsa.linopf import network_lopf
from pypsa.networkclustering import aggregategenerators
from pypsa.clustering.spatial import aggregategenerators
from pypsa.pf import sub_network_pf
import numpy as np
import pandas as pd
Expand Down

0 comments on commit 254c6d6

Please sign in to comment.