PowerModels.jl icon indicating copy to clipboard operation
PowerModels.jl copied to clipboard

Basic LODF utility?

Open mtanneau opened this issue 1 year ago • 2 comments

The current version (v0.21.2) supports calc_basic_ptdf_matrix, but there is no Line Outage Distribution Factor (LODF) matrix computation utility.

I have a working implementation that I would be happy to contribute if you'd like that.

What I am thinking about is a calc_basic_lodf_matrix function, which would return a matrix LODF of size ExE, where E is the number of branches in the system. Thereby, given pre-contingency flow vector pf, the flow on branch e under contingency k is given by

pf_after_outage[e] = pf[e] + LODF[e, k] * pf[k]

mtanneau avatar Jul 08 '24 21:07 mtanneau

This would be a welcome addition, please make a PR.

The name calc_basic_lodf_matrix sounds right to me.

I personally don't know the definition of LODF off the top of my head, but what you write here sounds right to me. Make sure the this new feature is discussed in the basic data utilities docs and that the expected usage is something like pf_after_outage[e] = pf[e] + LODF[e, k] * pf[k]

ccoffrin avatar Jul 20 '24 22:07 ccoffrin

You can use PowerNetworkMatrices.jl to get the LODF

jd-lara avatar Jun 04 '25 16:06 jd-lara