OpenEnergyPlatform / oedatamodel

A common open energy data model (oedatamodel) and datapackage format for energy and scenario data
Creative Commons Zero v1.0 Universal
7 stars 3 forks source link

Enable bandwidths for scalars and timeseries #52

Open henhuy opened 2 years ago

henhuy commented 2 years ago

A new OEDatamodel version shall be developed, which allows bandwidths for scalars and timeseries per scenario. IMO this needs three implementation changes:

  1. value in scalars must be changed to hold bandwidths (allowing fixed, discrete and continuous values)
  2. multiple timeseries regarding same region/tech/etc. are allowed, but must be distinguishable by user
  3. a concrete instance of the scenario using fixed values and fixed timeseries from scenario with bandwiths must be build

Possible implementations can be discussed here.

henhuy commented 2 years ago

My suggestion for task one (bandwidths in scalars), is to change type of column value (now float) into list-of-floats and to add column bandwith_type (or different name) of type string containing one of fixed/discrete/continuous.

henhuy commented 2 years ago

Regarding task two, we could use tag column for explanations about the timeseries

henhuy commented 2 years ago

Task three could be implemented, by adding three new tables scenario_instance, scalar_instances, timeseries_instances (search for better names!) with following functions:

From those tables all needed information for one reference scenario can be gathered...

jnnr commented 2 years ago

Great initiative! Regarding 1., I suggest to allow for fixed scalars, lists of scalars and distributions. Distributions can be specified by a finite number of parameters, i.e. a uniform distribution between an upper and lower bound, a Gaussian characterized by mean and variance etc. Together with a sampling method, this is enough information to produce a concrete scenario instance.

Similarly for 2., but for timeseries in most of the cases you would have a fixed timeseries or a list of timeseries that can be used to sample from.

chrwm commented 2 years ago

Hi @jnnr Regarding 1., @srhbrnds, @henhuy and I discussed your suggestion to "specify distributions by a finite number of parameters" and were wondering what the use-case of this could be? Do I understand you correctly that in essence, it wouldn't change henhuy suggestion other than allowing more values of type string other than fixed/discrete/continuous, for example Gaussian. I suppose in that case somewhere would need to be defined in which order mean, variance, etc. are given.

jnnr commented 2 years ago

Hi @chrwm! The usecase would be the similar to the usecase of that feature in general: Support creation of several concrete scenarios by specifing some higher-level parameters. This can be applied in scenario comparison and sensitivity analysis.

You are right, this is an extension of @henhuy s proposal. In fact, I wonder what "discrete" or "continous" should mean without defining some distribution to sample from?

To make it a bit more concrete:

update replaced "discrete" with "list", as you could think of discrete distributions as well. List would imply that all values are equally probable to be drawn.

chrwm commented 2 years ago

The bandwidth_types will be based on NetCDF conventions and extended with custom conventions from the SEDOS project. Your proposals and definitions can be included as the latter.

chrwm commented 2 years ago

@chrwm from 2022-07-28 AP1 meeting: