Build
The buildstream process and all of the notation included in the SLiDE documentation here is meant to replicate the WiNDC buildstream. For more information, please reference:
- Thomas F. Rutherford and Andrew Schreiber, "Tools for Open Source, Subnational CGE Modeling with an Illustrative Analysis of Carbon Leakage," J Global Econ Anal 4(2): 1-66.
Input
Build stream preferences can be specified using the SLiDE.Dataset
input type.
name::String
: dataset identifier. Data produced by the build stream will be saved in the directorydata/<name>
. If no name is specified,state_model
will be used.
The following options can be specified using keyword arguments.
overwrite::Bool
. Would you like to overwrite the existing dataset with this name? If set to true, the existing directory will be renamed.eem::Bool
. Would you like to build the Energy-Environment Module? By default, this is set tofalse
.
Examples
Build model data, using the default name and all default options:
d, set = build()
Build model data, using the default name but enabling the Energy-Environment Module.
d, set = build( ; eem=true)
Build model data, naming the dataset slug_trails
and using all default options:
d, set = build("slug_trails")
Build model data, naming the dataset slug_trails
and overwriting the previous slug_trails
dataset:
d, set = build("slug_trails"; overwrite=true)
Process
The buildstream is executed using the build
function.
SLiDE.build
— Functionbuild(dataset::Dataset)
This function executes the SLiDE buildstream and generates the parameters necessary to run the model. If the dataset has already been generated and saved, the function will read and return those values. Otherwise, it will generate these parameters by executing:
SLiDE.build_io
SLiDE.build_eem
– ifdataset.eem=true
SLiDE.build_io
— Functionbuild_io(dataset::Dataset)
If the dataset has already been generated and saved, the function will read and return those values.
Otherwise, it will read input data from the /SLIDE_DIR/data/input/
directory and execute the four steps of the SLiDE buildstream via the following functions:
Arguments
dataset::Dataset
identifier
Returns
d::Dict
of model parametersset::Dict
of Arrays describing parameter indices (years, regions, goods, sectors, etc.)
SLiDE.build_eem
— Functionbuild_eem(dataset::Dataset)
If dataset.eem=true
, continue the SLiDE buildstream for the Energy-Environment Module. If the dataset has already been generated and saved, the function will read and return those values.
Otherwise, it will execute the build routine via the following functions:
SLiDE.scale_sector
SLiDE.partition_seds
SLiDE.disaggregate_energy!
SLiDE.partition_co2!
SLiDE.calibrate_regional
Arguments
dataset::Dataset
identifier
Returns
d::Dict
of model parametersset::Dict
of Arrays describing parameter indices (years, regions, goods, sectors, etc.)