How to set up representative days for investment problems
Assuming you already have an investment model with a certain temporal structure that works, you can turn it into a representative periods model with the following steps.
Note that representative days often limit the ability to properly account for seasonal storages. However, SpineOpt takes this into account and allows for seasonal storage.
- Select the representative periods. For example if you are modelling a year, you can select a few weeks (one in summer, one in winder, and one in mid season).
- For each representative period, create a temporal_block specifying block_start, block_end and resolution.
- Associate these temporal_blocks to some nodes and units in your system, via node__temporal_block and units_on__temporal_block relationships.
- Finally, for each original temporal_block associated to the nodes and units above, specify the value of the representative_periods_mapping parameter. This should be a
map
where each entry associates a date-time to the name of one of the representative period temporal_blocks created in step 3. More specifically, an entry witht
as the key andb
as the value means that time slices from the original block starting att
, are 'represented' by time slices from theb
block. In other words, time slices betweent
andt
plus the duration ofb
are represented byb
.
In SpineOpt, this will be interpreted in the following way:
- For each node and unit associated to any of your representative temporal_blocks, the operational variables (with the exception of node_state) will be created only for the representative periods. For the non-representative periods, SpineOpt will use the variable of the corresponding representative period according to the value of the representative_periods_mapping parameter.
- The node_state variable and the investment variables will be created for all periods, representative and non-representative.
The SpinePeriods.jl package provides an alternative, perhaps simpler way to setup a representative periods model based on the automatic selection and ordering of periods.