From dd4f77f788c83e0415c559aa89d29dc1a70e3998 Mon Sep 17 00:00:00 2001 From: Luca Bonaldo <39280783+lbonaldo@users.noreply.github.com> Date: Mon, 1 Jul 2024 14:26:42 -0400 Subject: [PATCH] Make None colum in Fuels_data optional (#720) --- CHANGELOG.md | 1 + Project.toml | 2 +- src/time_domain_reduction/time_domain_reduction.jl | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44bf601fc1..f728104434 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fix formatting and images in tutorials 3, 5, 6, and 8 to address issue #697 (#698) - Fix `devbranch` in the docs `make.jl` file to track the develop branch (#710) +- Fix `TDR` to load `Fuels_data.csv` w/wo optional `None` column (#720) ### Added - Add objective scaler for addressing problem ill-conditioning (#667) diff --git a/Project.toml b/Project.toml index 88be114d82..0b11e78b6a 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "GenX" uuid = "5d317b1e-30ec-4ed6-a8ce-8d2d88d7cfac" authors = ["Bonaldo, Luca", "Chakrabarti, Sambuddha", "Cheng, Fangwei", "Ding, Yifu", "Jenkins, Jesse D.", "Luo, Qian", "Macdonald, Ruaridh", "Mallapragada, Dharik", "Manocha, Aneesha", "Mantegna, Gabe ", "Morris, Jack", "Patankar, Neha", "Pecci, Filippo", "Schwartz, Aaron", "Schwartz, Jacob", "Schivley, Greg", "Sepulveda, Nestor", "Xu, Qingyu", "Zhou, Justin"] -version = "0.4.0-dev.9" +version = "0.4.0-dev.10" [deps] CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" diff --git a/src/time_domain_reduction/time_domain_reduction.jl b/src/time_domain_reduction/time_domain_reduction.jl index 8f7f1e7a61..36aa7ecb6d 100644 --- a/src/time_domain_reduction/time_domain_reduction.jl +++ b/src/time_domain_reduction/time_domain_reduction.jl @@ -1339,6 +1339,7 @@ function cluster_inputs(inpath, "inputs_p$per", mysetup["SystemFolder"], "Fuels_data.csv")) + ensure_column!(fuel_in, "None", 0.0) select!(fuel_in, Not(:Time_Index)) SepFirstRow = DataFrame(fuel_in[1, :]) NewFuelOutput = vcat(SepFirstRow, FPOutputData) @@ -1484,6 +1485,7 @@ function cluster_inputs(inpath, input_stage_directory, mysetup["SystemFolder"], "Fuels_data.csv")) + ensure_column!(fuel_in, "None", 0.0) select!(fuel_in, Not(:Time_Index)) SepFirstRow = DataFrame(fuel_in[1, :]) NewFuelOutput = vcat(SepFirstRow, FPOutputData) @@ -1599,6 +1601,7 @@ function cluster_inputs(inpath, ### TDR_Results/Fuels_data.csv system_path = joinpath(inpath, mysetup["SystemFolder"]) fuel_in = load_dataframe(joinpath(system_path, "Fuels_data.csv")) + ensure_column!(fuel_in, "None", 0.0) select!(fuel_in, Not(:Time_Index)) SepFirstRow = DataFrame(fuel_in[1, :]) NewFuelOutput = vcat(SepFirstRow, FPOutputData)