From 298b3ca3694fff2748eba5b5ba73519f64a3ce52 Mon Sep 17 00:00:00 2001 From: jvendries Date: Tue, 17 Dec 2024 16:19:10 -0500 Subject: [PATCH] Add code for 2017 waste disagg model in test model build.r --- tests/test_model_build.R | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/tests/test_model_build.R b/tests/test_model_build.R index 7e25c808..1c23f218 100644 --- a/tests/test_model_build.R +++ b/tests/test_model_build.R @@ -50,7 +50,7 @@ printValidationResults(model) ### NEW -## USEEIOv2.2.1-408-GHG Detail, commodity model (2017 Schema) +## USEEIOv2.2.1-408-GHG Detail, commodity model (2017 Schema) with disaggregation m <- "USEEIOv2.2.1-408-GHG" cfg <- c(paste0("modelspecs/", m, ".yml"), "disaggspecs/WasteDisaggregationDetail2017.yml", @@ -62,6 +62,32 @@ cfg <- c(paste0("modelspecs/", m, ".yml"), model <- buildModel(m, configpaths = file.path(cfg)) printValidationResults(model) +## USEEIOv2.2-s-GHG Summary, commodity model (2017 Schema) +m <- "USEEIOv2.2.1-408-GHG" +cfg <- c(paste0("modelspecs/", m, ".yml"), + "disaggspecs/WasteDisaggregationSummary2017.yml", + "disaggspecs/WasteDisaggregationSummary2017_Make.csv", + "disaggspecs/WasteDisaggregationSummary2017_Use.csv", + "disaggspecs/WasteDisaggregationSummary2017_Env.csv", + "disaggspecs/WasteDisaggregationSummary2017_Sectors.csv" +) + + + +model <- useeior:::initializeModel(m, configpaths = file.path(cfg)) +model$specs$Model <- "USEEIOv2.2.1-s-GHG" +model$specs$BaseIOLevel <- "Summary" +model$crosswalk <- useeior:::getModelCrosswalk(model) # reassign for summary model +model$specs$DisaggregationSpecs <- +model <- useeior:::loadIOData(model) +model <- useeior:::loadandbuildSatelliteTables(model) +model <- useeior:::loadandbuildIndicators(model) +model <- useeior:::loadDemandVectors(model) +model <- useeior:::constructEEIOMatrices(model) +printValidationResults(model) + + + ###