diff --git a/CHANGELOG.md b/CHANGELOG.md index 2609fda..380218a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,8 @@ # LinDistFlow Changelog -## dev +## v0.5.1 - add `get_line_amps`, `get_peak_line_amps_percent`, and `define_line_amps_pu` +- mv SinglePhase `rij` and `xij` to CommonOPF ## v0.5.0 - deprecate `get_edge_values` and `get_bus_values` in favor of `CommonOPF.get_variable_values` diff --git a/Project.toml b/Project.toml index a81a216..6e4ac8d 100644 --- a/Project.toml +++ b/Project.toml @@ -10,6 +10,6 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" [compat] -CommonOPF = "0.3.5" +CommonOPF = "0.3.6" JuMP = "^0.21, 1.0" julia = "1" diff --git a/src/LinDistFlow.jl b/src/LinDistFlow.jl index 4548b96..19e11f1 100644 --- a/src/LinDistFlow.jl +++ b/src/LinDistFlow.jl @@ -1,6 +1,7 @@ module LinDistFlow using CommonOPF +import CommonOPF: rij, xij # extending to MultiPhase, need to consolidate into CommonOPF using JuMP using LinearAlgebra import SparseArrays: sparse diff --git a/src/utils.jl b/src/utils.jl index 46d6afa..05d0418 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -1,12 +1,4 @@ - -function rij(i::String, j::String, p::Inputs{SinglePhase}) - linecode = get_ijlinecode(i, j, p) - linelength = get_ijlinelength(i, j, p) - rmatrix = p.Zdict[linecode]["rmatrix"] * linelength / p.Zbase - return rmatrix[1] -end - - +# TODO mv MultiPhase rij xij to CommonOPF (requires something new to handle BFM vs. LDF) function rij(i::String, j::String, p::Inputs{MultiPhase}) linecode = get_ijlinecode(i, j, p) linelength = get_ijlinelength(i, j, p) @@ -30,14 +22,6 @@ function rij(i::String, j::String, p::Inputs{MultiPhase}) end -function xij(i::String, j::String, p::Inputs{SinglePhase}) - linecode = get_ijlinecode(i, j, p) - linelength = get_ijlinelength(i, j, p) - xmatrix = p.Zdict[linecode]["xmatrix"] * linelength / p.Zbase - return xmatrix[1] -end - - function xij(i::String, j::String, p::Inputs{MultiPhase}) linecode = get_ijlinecode(i, j, p) linelength = get_ijlinelength(i, j, p)