Skip to content

Commit 45b9994

Browse files
committed
update tests for waste disaggregation
1 parent 3105ee2 commit 45b9994

File tree

1 file changed

+17
-19
lines changed

1 file changed

+17
-19
lines changed

tests/test_model_build.R

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -48,31 +48,32 @@ model <- useeior:::loadDemandVectors(model)
4848
model <- useeior:::constructEEIOMatrices(model)
4949
printValidationResults(model)
5050

51-
52-
### NEW - Need to an an alias as per https://github.com/USEPA/USEEIO/blob/master/versioning/aliases.csv
53-
## USEEIOv2.4.1-408-GHG Detail, commodity model (2017 Schema) with disaggregation
54-
m <- "USEEIOv2.4.1-408-GHG"
51+
## USEEIOv2.2-GHG Detail, commodity model (2017 Schema) with disaggregation
52+
m <- "USEEIOv2.2-GHG"
5553
cfg <- c(paste0("modelspecs/", m, ".yml"),
5654
"disaggspecs/WasteDisaggregationDetail2017.yml",
5755
"disaggspecs/WasteDisaggregationDetail2017_Make.csv",
58-
"disaggspecs/WasteDisaggregationDetail2017_Use.csv",
59-
"disaggspecs/WasteDisaggregationDetail2017_Env.csv",
60-
"disaggspecs/WasteDisaggregationDetail2017_Sectors.csv"
61-
)
62-
model <- buildModel(m, configpaths = file.path(cfg))
56+
"disaggspecs/WasteDisaggregationDetail2017_Use.csv"
57+
)
58+
model <- useeior:::initializeModel(m, configpaths = file.path(cfg))
59+
model$specs$Model <- "USEEIOv2.2-GHG-408"
60+
model$specs$DisaggregationSpecs <- "WasteDisaggregationDetail2017"
61+
model <- useeior:::loadIOData(model, configpaths = cfg)
62+
model <- useeior:::loadandbuildSatelliteTables(model)
63+
model <- useeior:::loadandbuildIndicators(model)
64+
model <- useeior:::loadDemandVectors(model)
65+
model <- useeior:::constructEEIOMatrices(model, configpaths = cfg)
6366
printValidationResults(model)
6467

65-
## USEEIOv2.4-s-GHG Summary, commodity model (2017 Schema)
66-
m <- "USEEIOv2.4.1-408-GHG"
68+
## USEEIOv2.2-s-GHG Summary, commodity model (2017 Schema) with disaggregation
69+
m <- "USEEIOv2.2-GHG"
6770
cfg <- c(paste0("modelspecs/", m, ".yml"),
6871
"disaggspecs/WasteDisaggregationSummary2017.yml",
6972
"disaggspecs/WasteDisaggregationSummary2017_Make.csv",
70-
"disaggspecs/WasteDisaggregationSummary2017_Use.csv",
71-
"disaggspecs/WasteDisaggregationSummary2017_Sectors.csv"
72-
)
73-
73+
"disaggspecs/WasteDisaggregationSummary2017_Use.csv"
74+
)
7475
model <- useeior:::initializeModel(m, configpaths = file.path(cfg))
75-
model$specs$Model <- "USEEIOv2.4.1-s-GHG"
76+
model$specs$Model <- "USEEIOv2.2-s-GHG-79"
7677
model$specs$BaseIOLevel <- "Summary"
7778
model$crosswalk <- useeior:::getModelCrosswalk(model) # reassign for summary model
7879
model$specs$DisaggregationSpecs <- "WasteDisaggregationSummary2017"
@@ -84,9 +85,6 @@ model <- useeior:::constructEEIOMatrices(model, configpaths = cfg)
8485
printValidationResults(model)
8586

8687

87-
88-
###
89-
9088
## USEEIOv2 - integrated hybrid
9189
m <- "USEEIOv2.0-GHG-NGCombustion"
9290
cfg <- c(paste0("modelspecs/", m, ".yml"),

0 commit comments

Comments
 (0)