irena-flextool / flextool

IRENA FlexTool is an energy and power systems model for understanding the role of variable power generation in future energy systems.
https://www.irena.org/energytransition/Energy-System-Models-and-Data/IRENA-FlexTool
Other
21 stars 5 forks source link

Stochastics to flextool with small bugfixes #177

Closed ArttuTupala closed 3 months ago

ArttuTupala commented 4 months ago

Creates the option to model stochastic timeseries.

Commits from first idea to multi_peridodic create the stochastics.

non_stachastic fixes the system to work without stochastic time settings

unit_curtailment_share_with_potential fixes the unfinished unit_curtailment_share to include the potential values as well

2d input fix, period history rewrite fixes the special way to input multiperiodic data and corrects the period_history to work with stochastic branches.

checks and rolling state fix adds checks to stochastic input data and allows the storage state to also change between the last timestep of the previous roll and the first of the current one.

If branch at the first timestep of the period allows the branching to start at the first timestep of the period ie. first year realized, second stochastic.

Documentation includes how to with an example database

input speedup changes the order of matrixes in the stochastic timeseries parameter defining: major speedup 35s ->1s with the two year example scenario

double csv to single combines the set and parameter csv imports

sum to exists replaces some sum searches with exists (no significant speedup)

optional output check 1 per parameter changes the order of loops so that it is checked before looping over time steps

speedups with matrix orders changes the orders in the rolling state continue and changes some of the result parameters to only dt_realize_dispatch as they are not used with dt or period.

Merge the previous update_fix to allow clean merge to master