Skip to content

Commit

Permalink
Add DETAILS_FILES_TYPE column in the simulation_variables_names_by_su…
Browse files Browse the repository at this point in the history
…pport.csv
  • Loading branch information
boitardn committed Jun 11, 2024
1 parent 528c637 commit 3a3b8ac
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 20 deletions.
11 changes: 2 additions & 9 deletions R/importOutput.R
Original file line number Diff line number Diff line change
Expand Up @@ -297,22 +297,15 @@
assert_that(type %in% c("details","details-res","details-STstorage"))

simulation_variables_names_by_support <- data.table(read.table(system.file(
"simulation_variables_names_by_support.csv",package="antaresRead"
"format_output","simulation_variables_names_by_support.csv",package="antaresRead"
)))

# Order is important. There is a correspondance between elements
simulation_variables_names_by_support <- simulation_variables_names_by_support[
order(ORDINAL_POSITION_BY_TOPIC),
]

filtering_topic <- switch(
type,
"details"="Generation / Thermal",
"details-res"="Generation / Renewables",
"details-STstorage"="Generation / Short-Term Storages"
)

filtered_variables_names <- subset(simulation_variables_names_by_support,TOPIC==filtering_topic)
filtered_variables_names <- subset(simulation_variables_names_by_support,DETAILS_FILES_TYPE==type)
if (type=="details" && opts$antaresVersion < 830)
filtered_variables_names <- subset(filtered_variables_names,ANTARES_DISPLAYED_NAME!="Profit by plant")

Expand Down
4 changes: 2 additions & 2 deletions R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ utils::globalVariables(
"NODU", "min.stable.power", "thermalPmin", "name", "value",
"Folder", "Mode", "Stats", "Name", "progNam", "mrgprice", "isLOLD_cum",
"...To", "upstream", "downstream", "LOLD", "LOLD_data", "LOLP", "warn_for_status",
"MRG. PRICE", "H. LEV", "V2", "V1", "size", "ORDINAL_POSITION_BY_TOPIC", "TOPIC",
"ANTARES_DISPLAYED_NAME")
"MRG. PRICE", "H. LEV", "V2", "V1", "size", "ORDINAL_POSITION_BY_TOPIC",
"DETAILS_FILES_TYPE","ANTARES_DISPLAYED_NAME")
)

#----------------------------- HDF5 ------------------------------------#
Expand Down
9 changes: 9 additions & 0 deletions inst/format_output/simulation_variables_names_by_support.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"TOPIC" "DETAILS_FILES_TYPE" "ANTARES_DISPLAYED_NAME" "ORDINAL_POSITION_BY_TOPIC" "TITLE" "ALIAS" "MIN_VERSION" "OUTPUT_DISPLAYED_NAME" "RPACKAGE_DISPLAYED_NAME"
"1" "Generation / Thermal" "details" "DTG by plant" 1 "Dispatchable Thermal Generation by Thermal Cluster (MWh)" "dtgByPlant" NA "MWh" "production"
"2" "Generation / Thermal" "details" "NODU by plant" 3 "Number of Dispatched Units by Thermal Cluster" "noduByPlant" NA "NODU" "NODU"
"3" "Generation / Thermal" "details" "NP Cost by plant" 2 "Non-Proportional Costs by Thermal Cluster (�)" "npCostByPlant" NA "NP Cost - Euro" "NP Cost"
"4" "Generation / Thermal" "details" "Profit by plant" 4 "Net Profit by Thermal Cluster (�)" "profitByPlant" 830 "Profit - Euro" "profit"
"5" "Generation / Renewables" "details-res" "RES generation by plant" 1 "Renewable Energy Generation by Power Plant Cluster (MWh)" "resGenerationByPlant" 810 "MWh" "production"
"6" "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"
"7" "Generation / Short-Term Storages" "details-STstorage" "STS lvl by plant" 2 "Short-Term Storage Level by Power Plant (MWh)" "stsLvlByPlant" 860 "Levels - MWh" "levels"
"8" "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"
9 changes: 0 additions & 9 deletions inst/simulation_variables_names_by_support.csv

This file was deleted.

0 comments on commit 3a3b8ac

Please sign in to comment.