From ef5ac596e3e71657570f66db64504859a5f33248 Mon Sep 17 00:00:00 2001 From: KKamel67 <58913912+KKamel67@users.noreply.github.com> Date: Thu, 21 Nov 2024 15:12:39 +0100 Subject: [PATCH] Match column name and content, add column CashFlow (#264) Co-authored-by: kemihak --- NEWS.md | 1 + inst/format_output/simulation_variables_names_by_support.csv | 5 +++-- tests/testthat/test-importOutputForClusters.R | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/NEWS.md b/NEWS.md index ac0b78bf..b551f89c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -7,6 +7,7 @@ BUGFIXES : * `setSimulationPathAPI()` : encode URL before reading the data in simulation mode * `api_get()` : add warn_for_status in importFrom section +* `readAntares()` : In disk mode, return all the available columns for a short-term storage output and match the column with the content BREAKING CHANGES : * `setSimulationPathAPI()` : reads and returns the new converted study version format (ex : 9.0 => 900) diff --git a/inst/format_output/simulation_variables_names_by_support.csv b/inst/format_output/simulation_variables_names_by_support.csv index 8e7dc32d..67e6c1e4 100644 --- a/inst/format_output/simulation_variables_names_by_support.csv +++ b/inst/format_output/simulation_variables_names_by_support.csv @@ -5,5 +5,6 @@ "Generation / Thermal";"details";"Profit by plant";4;"Net Profit by Thermal Cluster (€)";"profitByPlant";830;"Profit - Euro";"profit" "Generation / Renewables";"details-res";"RES generation by plant";1;"Renewable Energy Generation by Power Plant Cluster (MWh)";"resGenerationByPlant";810;"MWh";"production" "Generation / Short-Term Storages";"details-STstorage";"STS inj by plant";1;"Short-Term Storage Injection by Power Plant (MWh)";"stsInjByPlant";860;"P-injection - MW";"P.injection" -"Generation / Short-Term Storages";"details-STstorage";"STS lvl by plant";2;"Short-Term Storage Level by Power Plant (MWh)";"stsLvlByPlant";860;"Levels - MWh";"levels" -"Generation / Short-Term Storages";"details-STstorage";"STS withdrawal by plant";3;"Short-Term Storage Withdrawal by Power Plant (MWh)";"stsWithdrawalByPlant";860;"P-withdrawal - MW";"P.withdrawal" +"Generation / Short-Term Storages";"details-STstorage";"STS withdrawal by plant";2;"Short-Term Storage Withdrawal by Power Plant (MWh)";"stsWithdrawalByPlant";860;"P-withdrawal - MW";"P.withdrawal" +"Generation / Short-Term Storages";"details-STstorage";"STS lvl by plant";3;"Short-Term Storage Level by Power Plant (MWh)";"stsLvlByPlant";860;"Levels - MWh";"levels" +"Generation / Short-Term Storages";"details-STstorage";"STS Cashflow By Cluster";4;"Storage Cashflow by Thermal Cluster (€)";"stsCashflowByCluster";880;"CashFlow - Euro";"Cashflow" diff --git a/tests/testthat/test-importOutputForClusters.R b/tests/testthat/test-importOutputForClusters.R index c41f90bc..b61f287d 100644 --- a/tests/testthat/test-importOutputForClusters.R +++ b/tests/testthat/test-importOutputForClusters.R @@ -53,7 +53,7 @@ test_that(".importOutputForSTClusters is ok", { opts=opts ) - required_order_simulation_variables <- c("P.injection","levels","P.withdrawal") + required_order_simulation_variables <- c("P.injection","P.withdrawal","levels") order_simulation_variables <- colnames(OutputForSTClusters)[colnames(OutputForSTClusters) %in% required_order_simulation_variables]