Data files

AnyMOD includes several functions to obtain the results of a solved model.

Analysed results

Different analysis can be printed with the reportResults functions depending on the reportType keyword.

reportResults(reportType::Symbol, model_object::anyModel; rtnOpt::Tuple = (:csv,))

The keyword argument rtnOpt controls the output format. Available options are:

  • :csv: writes a "readable" .csv file
  • :csvDf: returns the same "readable" data as a DataFrame
  • :raw: writes a .csv file with "raw" data, this means sets are not indicated by their name, but their internal id
  • :rawDf: returns the same "raw" data as a DataFrame

Summary

Using the reportType keyword :summary will provide a general overview of results. If the optional argument wrtSgn is set to true, output quantities (e.g. use or storage input) are given a negative sign. The table below lists all variables included.

explanation definition
exp{Conv/StIn/StOut/StSize}
capa{Conv/StIn/StOut/StSize}
oprCapa{Conv/StIn/StOut/StSize}
demand
use & gen
stIn & stOut
stExt{In/Out} & stInt{In/Out}
import & export
trdBuy & trdSell
crt & lss
emission
  • aggregated emissions
  • defined as $emFac \cdot \bm{use} \cdot 10^3$
flhConv
  • measure of conversion capacity utilization
  • defined as $\frac{oprCapaConv}{\sum use + stIntOut}$ or $\frac{oprCapaConv}{\sum gen + stIntIn}$ if no carriers are used
flhStIn
  • measure of capacity utilization regarding storage input
  • defined as $\frac{oprCapaStIn}{\sum stExtIn + stIntIn}$
flhStOut
  • measure of capacity utilization regarding storage output
  • defined as $\frac{oprCapaStOut}{\sum stExtOut + stIntOut}$
cycStIn
  • measure to characterize utilization of storage size based on charged quantities
  • small values indicate long- and large values short-term storage
  • defined as $\frac{oprCapaStSize}{\sum stExtIn + stIntIn}$
cycStOut
  • measure to characterize utilization of storage size based on discharged quantities
  • small values indicate long- and large values short-term storage
  • defined as $\frac{oprCapaStSize}{\sum stExtOut + stIntOut}$

Exchange

The keyword :exchange gives detailed results on exchange capacities and quantities. Again, reported variables are listed below.

explanation definition
expExc
capaExc
oprCapaExc
flhExc
  • utilization of exchange capacities
  • defined as $\frac{oprCapaExc}{exc}$
exc

Costs

The keyword :costs provides the values of all cost variables. All costs are provided in million Euros.

Time-series

The reportTimeSeries function writes a table with the values of all elements occuring in the energy balance of a respective carrier.

reportTimeSeries(carrier::Symbol, model_object::anyModel)

Optional arguments include:

argument explanation default
filterFunc
  • function to filter certain time-series data
  • for example x -> x.R_dis == 1 will only provide time-series data for the region with id 1 (see
    documentation of tree objects on how to obtain ids)
x -> true
unstck
  • controls if data is provided as an unstacked table or in pivot format
true
signVar
  • specifies groups of variables to write to output table
  • :in refers to energy inputs (e.g. generated or bought quantities) and :out refers to energy out-
    puts (e.g. used, demanded, or sold quantities)
(:in,:out)
mergeVar
  • if set to false results for energy in- and output are written to separate files
true
minVal
  • threshold for values to be included
  • useful to filter out really small but non-zero values that result from using Barrier without Crossover
1e-3
rtnOpt (:csv,)

Individual elements

In addition to the reportResults and reportTimeSeries that aggregate various model elements and report on them, individual variables or constraints can also be printed directly. In this case, the DataFrames used to store variables and constraints within the model part objects serve as inputs.

The printObject function writes a copy of the respective inputted DataFrame, but replaces the internal node ids with their written name.

printObject(element::DataFrame, model_object::anyModel)

For variables, the table will provide their value and for constraints the corresponding constraint expression.

The printDuals function works analogously, but returns the duals or shadow prices for the respective elements.

printDuals(element::DataFrame, model_object::anyModel)

For both functions the optional arguments filterFunc and rtnOpt as introduced for Analysed results and Time series are available. In addition, the argument fileName can be used to specify the name of the output file.