Skip to content

Commit

Permalink
Add code for 2017 waste disagg model in test model build.r
Browse files Browse the repository at this point in the history
  • Loading branch information
jvendries committed Dec 17, 2024
1 parent 2178145 commit 298b3ca
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion tests/test_model_build.R
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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)



###


Expand Down

0 comments on commit 298b3ca

Please sign in to comment.