Model object
The anyModel
object is the overarching structure that contains all data and objects of particular energy system model created with AnyMOD.
anyModel(inDir::Union{String,Array{String,1}}, outDir::String; kwargs)
In- and output files
The constructor function above has two mandatory arguments that the directories for in- and output files. inDir::Union{String,Array{String,1}}
specifies the directory (or directories) of input files. This can either be a string or an array of strings if input files are spread across different directories.
All .csv
files within the provided directories (and their sub-directories) starting with set_
or par_
will be read-in as an input file. Other files are ignored and can be used for documentation. Within the specific files, only columns whose name contains one of the following keywords are actually read-in: parameter
, variable
, value
, id
, region
, timestep
, carrier
, technology
, and mode
. Other columns can be used freely for documentation.
Within the input files all
is a reserved keyword. For an explanation on how it is used, see Time-steps.
outDir::String
: defines the directory of output files. All reporting files including status reports, results, or graphs are written to this directory.
Optional arguments
Additionally, the constructor accepts a list of optional arguments listed in the table below.
argument | explanation | default | group |
objName |
| "" | data handling |
csvDelim |
| "," | |
shortExp |
| 10 | model generation |
supTsLvl |
| 0 | |
redStep |
| 1.0 | |
decomm |
| :decomm | |
interCapa |
| :linear | |
reportLvl |
| 2 | reporting |
errCheckLvl |
| 2 | |
errWrtLvl |
| 1 | |
avaMin |
| 0.01 | performance and stability |
emissionLoss |
| true | |
checkRng |
| NaN | |
scaFac |
| ||
coefRng |
| ||
bound |
|
Fields
Relevant fields of the model object include:sets::Dict{Symbol,Tree}
: sets defined within the model and their tree structure each saved asTree
object (see Sets and mappings for details)parts::NamedTuple
: all parts of the model, these contain the specific parameters, variables, and constraints (see Parts for details)report::Array{Tuple,1}
: entries for writing to the reporting file (see Error handling for details)graInfo::graInfo
: properties for creation of plots and graphics, can be used to adjust colors and labels (see Styling for details)optModel::Model
: the actual JuMP object of the models underlying optimization problem