Skip to content

Commit

Permalink
Specify the separator for the simulation_variables_names_by_support.c…
Browse files Browse the repository at this point in the history
…sv import
  • Loading branch information
boitardn committed Jun 12, 2024
1 parent caad5bb commit 020198a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
11 changes: 6 additions & 5 deletions R/importOutput.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#' - "areas", "values" => areas
#' - "areas", "details" => clusters
#' - "areas", "details-res" => renewables clusters
#' - "areas", "details-STstorage" => short-term clusters
#' - "links", "values" => links
#'
#' @return
Expand Down Expand Up @@ -298,7 +299,7 @@

simulation_variables_names_by_support <- read.table(system.file(
"format_output","simulation_variables_names_by_support.csv",package="antaresRead"
))
),sep=";",fileEncoding="UTF-8",header = TRUE)

filtered_variables_names <- subset(simulation_variables_names_by_support,DETAILS_FILES_TYPE==type)
if (type=="details" && opts$antaresVersion < 830)
Expand Down Expand Up @@ -354,7 +355,7 @@
showProgress, opts, mustRun = FALSE, parallel) {

reshapeFun <- function(x){
.reshape_details_file(x,"details",opts)
.reshape_details_file(x,file_type="details",opts=opts)
}

if (!mustRun) {
Expand Down Expand Up @@ -492,7 +493,7 @@
idVarsNames <- n[idVarsId]

# Column names of the output table
colNames <- .get_value_columns_details_file(opts,file_type)
colNames <- .get_value_columns_details_file(opts=opts,type=file_type)

# Loop over clusters
nclusters <- length(clusterNames)
Expand Down Expand Up @@ -522,7 +523,7 @@


reshapeFun <- function(x) {
.reshape_details_file(x,"details-res",opts)
.reshape_details_file(x,file_type="details-res",opts=opts)
}

suppressWarnings(
Expand All @@ -546,7 +547,7 @@
showProgress, opts, parallel) {

reshapeFun <- function(x) {
.reshape_details_file(x,"details-STstorage",opts)
.reshape_details_file(x,file_type="details-STstorage",opts=opts)
}

suppressWarnings(
Expand Down
18 changes: 9 additions & 9 deletions inst/format_output/simulation_variables_names_by_support.csv
Original file line number Diff line number Diff line change
@@ -1,9 +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"
"TOPIC";"DETAILS_FILES_TYPE";"ANTARES_DISPLAYED_NAME";"ORDINAL_POSITION_BY_TOPIC";"TITLE";"ALIAS";"MIN_VERSION";"OUTPUT_DISPLAYED_NAME";"RPACKAGE_DISPLAYED_NAME"
"Generation / Thermal";"details";"DTG by plant";1;"Dispatchable Thermal Generation by Thermal Cluster (MWh)";"dtgByPlant";;"MWh";"production"
"Generation / Thermal";"details";"NODU by plant";3;"Number of Dispatched Units by Thermal Cluster";"noduByPlant";;"NODU";"NODU"
"Generation / Thermal";"details";"NP Cost by plant";2;"Non-Proportional Costs by Thermal Cluster (€)";"npCostByPlant";;"NP Cost - Euro";"NP Cost"
"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"

0 comments on commit 020198a

Please sign in to comment.