diff --git a/CHANGELOG.md b/CHANGELOG.md index 94c14e5..80add05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ PowerWaterModels.jl Change Log -======================= +============================== + +### staged +- nothing + +### v0.3.1 +- Improve facade pattern implementation ### v0.3.0 - Update documentation. diff --git a/Project.toml b/Project.toml index 074dead..bc92a6b 100644 --- a/Project.toml +++ b/Project.toml @@ -2,7 +2,7 @@ name = "PowerWaterModels" uuid = "7f4f7f52-2f44-4c87-b9ed-462dc784f1b2" authors = ["Byron Tasseff", "Russell Bent", "Carleton Coffrin"] repo = "https://github.com/lanl-ansi/PowerWaterModels.jl" -version = "0.3.0" +version = "0.3.1" [deps] InfrastructureModels = "2030c09a-7f63-5d83-885d-db604e0e9cc0" diff --git a/src/core/helpers.jl b/src/core/helpers.jl index ce0f103..e99af35 100644 --- a/src/core/helpers.jl +++ b/src/core/helpers.jl @@ -1,18 +1,12 @@ -function _get_powermodel_from_powerwatermodel(pwm::AbstractPowerWaterModel) - # Determine the PowerModelsDistribution modeling type. - pmd_type = typeof(pwm).parameters[1] - +function _get_powermodel_from_powerwatermodel(pwm::AbstractPowerWaterModel{PMDT,WMT}) where {PMDT,WMT} # Power-only variables and constraints. - return pmd_type(pwm.model, pwm.data, pwm.setting, pwm.solution, + return PMDT(pwm.model, pwm.data, pwm.setting, pwm.solution, pwm.ref, pwm.var, pwm.con, pwm.sol, pwm.sol_proc, pwm.ext) end -function _get_watermodel_from_powerwatermodel(pwm::AbstractPowerWaterModel) - # Determine the WaterModels modeling type. - wm_type = typeof(pwm).parameters[2] - +function _get_watermodel_from_powerwatermodel(pwm::AbstractPowerWaterModel{PMDT,WMT}) where {PMDT,WMT} # Water-only variables and constraints. - return wm_type(pwm.model, pwm.data, pwm.setting, pwm.solution, + return WMT(pwm.model, pwm.data, pwm.setting, pwm.solution, pwm.ref, pwm.var, pwm.con, pwm.sol, pwm.sol_proc, pwm.ext) end diff --git a/test/runtests.jl b/test/runtests.jl index 4b5c8a0..a007cc7 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -13,9 +13,10 @@ const Memento = _IM.Memento # Suppress warnings during testing. Memento.setlevel!(Memento.getlogger(_IM), "error") -Memento.setlevel!(Memento.getlogger(_PMD), "error") +Memento.setlevel!(Memento.getlogger(_PM), "error") Memento.setlevel!(Memento.getlogger(_WM), "error") PowerWaterModels.logger_config!("error") +_PMD.silence!() import HiGHS import Ipopt