Comparing Runs/Scenarios

The generic way of comparing data of several simulation runs, i.e. combining the data to visualise in one plot, is the following:

  1. For each data set to compare
    • Store dumpfile into database
    • Generate a dexpa-list for each run and store them in a list dexpas.
  2. Pass the list dexpas to a comparison function

Output configuration

Filter

It is possible to filter data according to start and end dates. This is in particular helpful to filter out marginal differences during start and end of simulations.

dexpa$sim$starttime_min     <- as.numeric(strptime("30/11/19 12:00", "%d/%m/%y %H:%M"))*1000
dexpa$sim$starttime_max     <- as.numeric(strptime("03/12/19 12:00", "%d/%m/%y %H:%M"))*1000

Figures

Prerequesists

In order to run these examples, a working PostgreSQL-database is required with the following configuration in file config/R/dexpa-figures.R:

dexpa$db$host           <- "localhost"
dexpa$db$port           <- "5432"
dexpa$db$dbname         <- "enavi"
dexpa$db$username       <- "enavi"
dexpa$db$password       <- "enavi!"
dexpa$db$suname         <- "postgres"
dexpa$db$supassword     <- "WiScAn07"

Getting data into a figure

dexR::input_db_dumps2db(dexR::create_dexpas(c("id1", "id2"))

Comparisons: Clearing

Clearing price per clearing by clearing time and by product

dexpas <- dexR::demo_prepare_db4figures()
dexR::hl_figure_clearing_comp_clearingPriceByCTbyProduct(dexpas, filename=NULL)
dexR::input_db_dropdbs(dexpas)

Number of considered requests per clearing by clearing time

dexpas <- dexR::demo_prepare_db4figures()
dexR::hl_figure_clearing_comp_numConsideredRequests(dexpas, filename=NULL)
dexR::input_db_dropdbs(dexpas)

Comparisons: Requests

Nnumber of received requests per status by delivery start time

dexpas <- dexR::demo_prepare_db4figures()
dexR::hl_figure_requests_numRequests_comp_byStatusByStartT(dexpas, filename=NULL)
dexR::input_db_dropdbs(dexpas)

Reports

There are a few templates for the generation of PDF-slides as reports containing specific tables and figure.

Complete Comparison

source("/home/USER/dexr/scripts/dexpa-machine_machine.R")
hl_reports_comp(dexpa, c("enavi_08-01", "enavi_08-02"))


UniK-INES/dexR documentation built on June 30, 2021, 11:05 p.m.