PyPSA-EUR: Optimising dispatch only - a market model

111 views
Skip to first unread message

Hyemin Park

unread,
Feb 27, 2023, 2:26:27 PM2/27/23
to pypsa
Hi PyPSA community,

I am trying to run a short-term market run using pypsa-eur to only optimize the dispatch (no capacity expansion). Could you advise how I can alter the config or snakefile to remove un-necessary jobs?

Estimating renewable potential takes a long time to run but I don't think I need it for my  purposes.

Thank you so much for your help!
Best,
Hye Min Park (Hey-Meen)
Doctoral Fellow | Assistant Policy Researcher
Pardee RAND Graduate School | RAND Corporation


Fabian Neumann

unread,
Feb 28, 2023, 4:37:15 AM2/28/23
to pypsa
Hi,

to run an operational study with PyPSA-Eur, you'll have to exit the workflow after the prepare_network rule:

Look for a file named according to scheme "networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc"

This one you can load this with n = pypsa.Network() and then set p_nom_extendable / e_nom_extendable for all components to false.

The build_renewable_profiles rule cannot be skipped since it also computes the wind and solar capacity factor time series. The potential calculation takes only a fraction of the time spent on that rule.

Best wishes,

Fabian

Adrian Odenweller

unread,
Feb 28, 2023, 11:29:38 AM2/28/23
to pypsa
Hi Fabian,

just a quick follow-up question: So it wouldn't be sufficient to just remove every generator/storage unit/store/link from the "extendable_carriers" section and set the ll wildcard to v1?

Thanks!
Adrian

Max Parzen

unread,
Feb 28, 2023, 5:03:55 PM2/28/23
to pypsa
@Adrian, good suggestion that might also work. Please report if it does and in case not, why it doesn't.
Fabian N. solutions is one that gurantees dispatch only &
could be also integrated to a workflow option in case a use case demands it.

Best wishes,

Max

Fabian Neumann

unread,
Mar 1, 2023, 2:09:50 AM3/1/23
to pypsa
Hi Adrian,

This is actually a great solution! Much better than what I proposed, and it doesn't even require exiting the workflow!

Best wishes,

Fabian

Hyemin Park

unread,
Mar 12, 2023, 11:02:52 PM3/12/23
to pypsa

Thanks Fabian, Adrian, and Max,

I tried the solution but the runtime didn't change. It ran for all the jobs just like having "extendable_carriers" and "copt".

Sorry I have few more questions on the output.
I am currently using cbc solver. So I made the config snapshot to be a week and clustering for 38 nodes to make sure it can handle the problem. I was able to run "snakemake -j 1 solve_all_networks" without any error.

However, I get empty dataframes for below components:
network.buses_t.marginal_price (This is the clearing price at the node?)
network.generators_t (This should be the actual dispatch?)

My colleague is also running in parallel (using wildcard "copt" with empty extendable_carriers), he was able to get values for "network.generators_t". I thought this is the actual generation but solar has the same value for all hours while wind have 0s for some hours.
I am looking for clearing prices to estimate electricity prices (euro/MWh) and delivered generation (excluding curtailment but including charging energy storage) by source (MWh for solar, wind, etc).
Could you confirm these are the right components to look at?
network.buses_t.marginal_price
network.generators_t

And do you have any clue why I would get empty dataframes? Is it because didn't allow capacity expansion and couldn't solve the problem?
In fact, "n.buses_t" had all empty data frames..

Thank you so much for your help!

Hye Min Park (Hey-Meen)
Doctoral Fellow | Assistant Policy Researcher
Pardee RAND Graduate School | RAND Corporation

Fabian Neumann

unread,
Mar 13, 2023, 4:13:53 AM3/13/23
to pypsa
Hi,

yes, n.buses_t.marginal_price will show clearing price in €/MWh for successfully solved models.

And n.generators_t.p will give you optimised dispatch (which might be lower than available power due to curtailment).

These fields will be empty, if the optimisation did not complete successfully.

Best wishes,

Fabian N

Hyemin Park

unread,
Mar 13, 2023, 12:08:57 PM3/13/23
to pypsa
Thank you so much Fabian for your quick response!

So something went wrong when my colleague got the same generation values for solar around all hours from "network.generators_t"?
Ideally if we get to run correctly we should be able to see solar generation based on min(generation capability, deliverability) when we output "network.generators_t"?

Thank you!
Hye Min

Reply all
Reply to author
Forward
0 new messages