Can PYPSA model security constrained unit commitment problem?

192 views
Skip to first unread message

Bo Lu

unread,
Feb 16, 2022, 4:54:45 PM2/16/22
to pypsa
Hi Fabian,

The Pypsa unit commitment example in github doesn't include transmission flow constraints. I wounder if Pypsa can model security constrained unit commitment problem.

Regards,

Bo

Bo Lu

unread,
Feb 16, 2022, 5:13:14 PM2/16/22
to pypsa
Did some search and found the positive answer in following link.

I am planning to run SCUC with a decent size of network.
Can you show me where is the csv file format I can use to load the network?

Regards,

Bo

Fabian Neumann

unread,
Feb 17, 2022, 4:11:26 AM2/17/22
to Bo Lu, pypsa
Hi Bo,

if you run n.sclopf() with committable generators and the network has
lines, you'd get both

unit commitment on generators

https://pypsa.readthedocs.io/en/latest/components.html#generator

and

N-1 constraints on transmission lines

https://pypsa.readthedocs.io/en/latest/contingency_analysis.html#security-constrained-linear-optimal-power-flow-sclopf

The CSV format is not different to those without UC, just that you
specify a few extra columns e.g. for start_up_cost, min_up_time etc...

Best wishes,

Fabian
> --
> You received this message because you are subscribed to the Google
> Groups "pypsa" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pypsa+un...@googlegroups.com
> <mailto:pypsa+un...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/pypsa/9236e890-6a19-4642-a11e-18a9a8ac1ac4n%40googlegroups.com
> <https://groups.google.com/d/msgid/pypsa/9236e890-6a19-4642-a11e-18a9a8ac1ac4n%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
Dr.-Ing.
Fabian Neumann (he/him)
Postdoctoral Researcher

Department of Digital Transformation in Energy Systems
Institute of Energy Technology
Technische Universität Berlin

Group website: https://tub-ensys.github.io
Personal website: https://neumann.fyi

Zoom: https://tu-berlin.zoom.us/my/fneum
Schedule Meeting: https://calendly.com/fneum

Visitor Address:
Einsteinufer 25 (TA 8)
10587 Berlin

My working hours may not be your working hours. Do not feel pressure to
reply to this email outside your working hours.

Bo Lu

unread,
Feb 17, 2022, 1:42:05 PM2/17/22
to pypsa
Hi Fabian,

Thanks for the links which are very helpful.

one more question is about the reserve requirements which are common for energy-as co-optimization.
However I didn't see this feature in the Pypsa document.
Can you shed more light on this topic?

Regards,


Bo

Fabian Neumann

unread,
Feb 17, 2022, 2:12:43 PM2/17/22
to Bo Lu, pypsa
Hi Bo,

reserve constraints are not included in PyPSA by default.

You can add a custom constraint that does something like this.

https://github.com/PyPSA/pypsa-eur/blob/402f2cd48e00776b19aa25acbd44441b9a969b77/scripts/solve_network.py#L202-L211

Best wishes,

Fabian

On 17.02.22 19:42, Bo Lu wrote:
> Hi Fabian,
>
> <https://groups.google.com/d/msgid/pypsa/9236e890-6a19-4642-a11e-18a9a8ac1ac4n%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/pypsa/9236e890-6a19-4642-a11e-18a9a8ac1ac4n%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
>
> --
> Dr.-Ing.
> Fabian Neumann (he/him)
> Postdoctoral Researcher
>
> Department of Digital Transformation in Energy Systems
> Institute of Energy Technology
> Technische Universität Berlin
>
> Group website: https://tub-ensys.github.io
> <https://tub-ensys.github.io>
> Personal website: https://neumann.fyi <https://neumann.fyi>
>
> Zoom: https://tu-berlin.zoom.us/my/fneum
> <https://tu-berlin.zoom.us/my/fneum>
> Schedule Meeting: https://calendly.com/fneum
> <https://calendly.com/fneum>
>
> Visitor Address:
> Einsteinufer 25 (TA 8)
> 10587 Berlin
>
> My working hours may not be your working hours. Do not feel pressure to
> reply to this email outside your working hours.
>
> --
> You received this message because you are subscribed to the Google
> Groups "pypsa" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pypsa+un...@googlegroups.com
> <mailto:pypsa+un...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/pypsa/1c6dc0de-95ed-419d-893e-f7c094da314cn%40googlegroups.com
> <https://groups.google.com/d/msgid/pypsa/1c6dc0de-95ed-419d-893e-f7c094da314cn%40googlegroups.com?utm_medium=email&utm_source=footer>.

Bo Lu

unread,
Feb 17, 2022, 2:55:11 PM2/17/22
to pypsa
I am currently focus on the battery storage.
The current SOC model in Pypsa assumes SOC min limit at 0mwh.
However, the battery can never reach to that level of low SOC in reality.
Usually min SOC is set as about 20% of max SOC.
I think it should be straight-forward to enforce min SOC by introducing min SOC as % value of max SOC in the "storage unit" component.
This quick improvement will make the storage unit model closer to real practice.
 
Regards,

Bo



On Wednesday, February 16, 2022 at 3:54:45 PM UTC-6 Bo Lu wrote:

Bo Lu

unread,
Feb 17, 2022, 3:32:28 PM2/17/22
to pypsa
Hi Fabian,

Thanks again for the quick reply on the reserve constraint.
However, the reserve constraint I expect is more than the custom constraint you provided.

In my expectation, different generator can provide different types of reserves with different amount (typically limited by ramp rate and specified ramping time).
For each generator, energy and various reserves will compete for the shared available capacity. 
So the extra constraints should like below:

sum_i(reserve_up_1_i_t) >= RESERVE_UP_1_t
sum_i(reserve_up_2_i_t) >= RESERVE_UP_2_t
sum_i(reserve_dn_1_i_t) >= RESERVE_DN_1_t  
P_i_t +  reserve_up_1_i_t  +  reserve_up_2_i_t  <= Pmax_i_t
P_i_t  - reserve_dn_1_i_t >= Pmin_i_t  

I think new parameters may be required in the generator component in order to add these constraints.
It will need some effort to implement these changes, but want to get your thought on the path to the implementation.

Regards,

Bo


Reply all
Reply to author
Forward
0 new messages