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

Possible bug in definition of central bus of the microgrid #26

Open
2 tasks done
ekatef opened this issue Dec 17, 2023 · 0 comments · May be fixed by #40
Open
2 tasks done

Possible bug in definition of central bus of the microgrid #26

ekatef opened this issue Dec 17, 2023 · 0 comments · May be fixed by #40
Labels
bug Something isn't working

Comments

@ekatef
Copy link
Contributor

ekatef commented Dec 17, 2023

Checklist

  • I am using the current main branch or the latest release. Please indicate.
  • I am running on an up-to-date pypsa-earth environment. Update via conda env update -f pypsa-earth/envs/environment.yaml.

Describe the Bug

It looks like there may be some mild discrepancy in defining a central bus for each grid.

Currently, such a bus is hardcoded as bus_9:

# The bus is the central bus of each microgrid
microgrid_name = f"bus_9"
microgrid_shapes.append(microgrid_shape)
microgrid_names.append(microgrid_name)

This bus_9 is used to fetch both conventional generators and generate time-series of renewable generation. At the same time, bus_9 column is dropped from the demand dataframe:

# Remove the bus_9 column
load_df = load_df.drop("bus_9", axis=1)

Which means that load is attached to all the buses, except bus_9:

n.madd("Load", demand_df.columns, bus=demand_df.columns, p_set=demand_df)

So, generation and loads are attached to different buses which leads to not meaningful simulation results.

I can miss something, but currently it looks like some fix may be needed here. Would be happy to contribute, but need verify that my understanding is correct. @davide-f could you please give some hints on that?

@ekatef ekatef added the bug Something isn't working label Dec 17, 2023
@ekatef ekatef linked a pull request Apr 2, 2024 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant