diff --git a/CHANGELOG.md b/CHANGELOG.md index fdae709..b8297b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ ## Staged +## v0.5.0 +- add support JuMP 0.22, PMD 0.12,0.13, IM 0.7 +- nicer ternary operators +- change cite to IEEE TPWRS early access + ## v0.4.1-2 - clean-up of bad data code - adds bad data documentation diff --git a/Project.toml b/Project.toml index ff36d6c..1b2ee1b 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "PowerModelsDistributionStateEstimation" uuid = "d0713e65-ce0c-4a8e-a1da-2ed737d217c5" authors = ["Marta Vanin", "Tom Van Acker"] -version = "0.4.2" +version = "0.5.0" [deps] CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" @@ -27,12 +27,12 @@ DataFrames = "~0.21.0" Distributions = "0.22.3 - 0.24.14" ForwardDiff = "~0.10.18" GaussianMixtures = "0.3.2" -InfrastructureModels = "0.6.0" +InfrastructureModels = "~0.6, ~0.7" JSON = "~0.18, ~0.19, ~0.20, ~0.21" -JuMP = "~0.21.4" +JuMP = "~0.21, ~0.22" LoggingExtras = "~0.4" Optim = "~1.2.0" -PowerModelsDistribution = "0.11.1" +PowerModelsDistribution = "~0.11, ~0.12, ~0.13" SpecialFunctions = "~0.10.3" julia = "^1" diff --git a/README.md b/README.md index a8e17be..a67daa0 100644 --- a/README.md +++ b/README.md @@ -69,15 +69,15 @@ the following contributors: If you find PowerModelsDistributionStateEstimation.jl useful for your work, we kindly invite you to cite our [paper](https://arxiv.org/abs/2011.11614): ```bibtex -@article{VaninPMDSE, - title = {A framework for constrained static state estimation in unbalanced distribution networks}, - volume = {}, - number = {}, - journal = {[Online], arXiv:2011.11614 [eess.SY] }, - author = {Vanin, Marta and Van Acker, Tom and D'hulst, Reinhilde and Van Hertem, Dirk}, - month = {Nov.}, - year = {2020}, -} +@ARTICLE{9552554, + author={Vanin, Marta and Van Acker, Tom and D'hulst, Reinhilde and Van Hertem, Dirk}, + journal={IEEE Transactions on Power Systems}, + title={A Framework for Constrained Static State Estimation in Unbalanced Distribution Networks}, + year={2021}, + volume={}, + number={}, + pages={1-1}, + doi={10.1109/TPWRS.2021.3116291}} ``` diff --git a/src/core/constraint.jl b/src/core/constraint.jl index c5108a8..e49ae7a 100644 --- a/src/core/constraint.jl +++ b/src/core/constraint.jl @@ -48,9 +48,9 @@ function constraint_mc_residual(pm::_PMD.AbstractUnbalancedPowerModel, i::Int; n res[idx] * rsc * σ >= - (var[c] - μ) ) elseif crit == "mle" - ( isa(dst[idx], ExtendedBeta{Float64}) || isa(dst[idx], _GMM.GMM) ) ? pkg_id = _PMDSE : pkg_id = _DST - ( !isa(dst[idx], _GMM.GMM) && !isinf(pkg_id.minimum(dst[idx])) ) ? lb = pkg_id.minimum(dst[idx]) : lb = -10 - ( !isa(dst[idx], _GMM.GMM) && !isinf(pkg_id.maximum(dst[idx])) ) ? ub = pkg_id.maximum(dst[idx]) : ub = 10 + pkg_id = ( isa(dst[idx], ExtendedBeta{Float64}) || isa(dst[idx], _GMM.GMM) ) ? _PMDSE : _DST + lb = ( !isa(dst[idx], _GMM.GMM) && !isinf(pkg_id.minimum(dst[idx])) ) ? pkg_id.minimum(dst[idx]) : -10 + ub = ( !isa(dst[idx], _GMM.GMM) && !isinf(pkg_id.maximum(dst[idx])) ) ? pkg_id.maximum(dst[idx]) : 10 if isa(dst[idx], _GMM.GMM) lb = _PMD.ref(pm, nw, :meas, i, "min") end if isa(dst[idx], _GMM.GMM) ub = _PMD.ref(pm, nw, :meas, i, "max") end diff --git a/src/core/utils.jl b/src/core/utils.jl index 166cbe6..4b145d0 100644 --- a/src/core/utils.jl +++ b/src/core/utils.jl @@ -105,7 +105,7 @@ The function takes as input either a single measurement dictionary, e.g., `data[ and their product is used as the upper bound. Otherwise, """ function assign_residual_ub!(data::Dict; chosen_upper_bound::Float64=100.0, rescale::Bool=false) - rescale ? upp_bound = chosen_upper_bound*data["se_settings"]["rescaler"] : upp_bound = chosen_upper_bound + upp_bound = rescale ? chosen_upper_bound*data["se_settings"]["rescaler"] : chosen_upper_bound if haskey(data, "meas") for (_, meas) in data["meas"] meas["res_max"] = upp_bound diff --git a/src/core/variable.jl b/src/core/variable.jl index 6705924..7bd5aeb 100644 --- a/src/core/variable.jl +++ b/src/core/variable.jl @@ -28,7 +28,7 @@ function variable_mc_residual( pm::_PMD.AbstractUnbalancedPowerModel; if bounded for i in _PMD.ids(pm, nw, :meas), c in 1:connections[i] JuMP.set_lower_bound(res[i][c], 0.0) - haskey(_PMD.ref(pm, nw, :meas, i), "res_max") ? res_max = meas["res_max"] : res_max = Inf + res_max = haskey(_PMD.ref(pm, nw, :meas, i), "res_max") ? meas["res_max"] : Inf JuMP.set_upper_bound(res[i][c], res_max) end end diff --git a/src/io/measurement_parser.jl b/src/io/measurement_parser.jl index 82baffc..4060bb6 100644 --- a/src/io/measurement_parser.jl +++ b/src/io/measurement_parser.jl @@ -50,7 +50,7 @@ function read_measurement!(data::Dict, meas_row::_DFS.DataFrameRow, sample_fake_ if sample_fake_meas sorted_args = sample_fake_measurements(meas_row[:dst], sorted_args, seed) end - meas_row[:dst] == "ExtendedBeta" ? pkg_id = _PMDSE : pkg_id = _DST + pkg_id = meas_row[:dst] == "ExtendedBeta" ? _PMDSE : _DST data["dst"] = [getfield(pkg_id, Symbol(meas_row[:dst]))(tuple(sa...)...) for sa in sorted_args] end """