From a3dfd80d961ae4c7116285866d60908c906dc0c6 Mon Sep 17 00:00:00 2001 From: Luca Bonaldo <39280783+lbonaldo@users.noreply.github.com> Date: Fri, 2 Feb 2024 17:55:43 -0500 Subject: [PATCH] Fix scaling of tx losses in tlosses.csv #616 (#621) --- CHANGELOG.md | 1 + src/write_outputs/transmission/write_transmission_losses.jl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d62980d78c..2c410ec5cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Correctly write unmet reserves (in reg_dn.csv) (#575) - Correctly scale total reserves column (in reg_dn.csv) (#594) - Add validation for `Reg_Max` and `Rsv_Max` columns in `Generators_data.csv` when `MUST_RUN` is set to 1 (#576) +- Fix scaling of transmission losses in write_transmission_losses.jl (#621) ### Changed - Use add_to_expression! instead of the += and -= operators for memory performance improvements (#498). diff --git a/src/write_outputs/transmission/write_transmission_losses.jl b/src/write_outputs/transmission/write_transmission_losses.jl index 0bf70d298c..127d90fbc5 100644 --- a/src/write_outputs/transmission/write_transmission_losses.jl +++ b/src/write_outputs/transmission/write_transmission_losses.jl @@ -7,7 +7,7 @@ function write_transmission_losses(path::AbstractString, inputs::Dict, setup::Di tlosses = zeros(L, T) tlosses[LOSS_LINES, :] = value.(EP[:vTLOSS][LOSS_LINES, :]) if setup["ParameterScale"] == 1 - tlosses[LOSS_LINES, :] *= ModelScalingFactor^2 + tlosses[LOSS_LINES, :] *= ModelScalingFactor end dfTLosses.AnnualSum = tlosses * inputs["omega"] dfTLosses = hcat(dfTLosses, DataFrame(tlosses, :auto))