Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes/remove warnings before release0.10.0 #757

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions etrago/analyze/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -841,16 +841,18 @@ def calc_dispatch_per_carrier(network, timesteps, dispatch_type="total"):
]

dist = pd.Series(
index=pd.MultiIndex.from_tuples(index, names=["bus", "carrier"]),
index=pd.MultiIndex.from_tuples(
index, names=["bus", "carrier"]
).unique(),
dtype=float,
)
).sort_index()

for i in dist.index:
gens = network.generators[
(network.generators.bus == i[0])
& (network.generators.carrier == i[1])
].index
dist[i] = (
dist.loc[i] = (
(
network.generators_t.p[gens].transpose()[
network.snapshots[timesteps]
Expand Down
2 changes: 1 addition & 1 deletion etrago/cluster/spatial.py
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ def kmedoids_dijkstra_clustering(
kmeans.fit(points)

busmap = pd.Series(
data=kmeans.predict(buses.loc[buses_i, ["x", "y"]]),
data=kmeans.predict(buses.loc[buses_i, ["x", "y"]].values),
index=buses_i,
dtype=object,
)
Expand Down
1 change: 0 additions & 1 deletion etrago/execute/market_optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ def optimize_with_rolling_horizon(
n.storage_units.state_of_charge_initial = (
n.storage_units_t.state_of_charge.loc[snapshots[start - 1]]
)
print(i)
# Make sure that state of charge of batteries and pumped hydro
# plants are cyclic over the year by using the state_of_charges
# from the pre_market_model
Expand Down