Use the package
The main function of the EnergyModelsRecedingHorizon package is run_model_rh. Similarly to EnergyModelsBase, a problem is defined by its case and model objects. The following points should be accounted for when setting up a problem in EnergyModelsRecedingHorizon:
The modeltype object must be a subtype of
RecHorEnergyModelfor dispatching purposes.The provided case object should be a
Casewith problem horizons included in the case object through themiscdictionary using the:horizonskey.The case must have its
OperationalProfiles covering the full problem horizon, otherwise the last value in the time profile will be repeated.The horizon object must be compatible with the case's
TimeStructure.Parameters indexed over strategic periods Some parameters with a
Caseare indexed over strategic periods. Examples are the CO₂ limit ofRecHorEnergyModelor all fixed operating expenses. The time divisor (e.g., year in €/kW/year) is per default given by the time of a duration of 1 of an operational period (see the description in *the documentation ofEnergyModelsBase).It can be manually chosen by changing the keyword argument
use_op_per_stratof the functionrun_model_rhtotrue. In this case, the specified valueop_per_stratof theTwoLevelis used to scale the values correctly.The elements in the problem case must have
AbstractInitDataobjects in their data fields where applicable. This is a necessity for allStoragenodes that utilize the new behaviorRecedingAccumulatingwhich should be utilized irrespectively of the individual storage node. This initial data must be used to define the first operational period (see the initialization section for more details).
Contrary to other EnergyModelsX packages, the current package does not solve a single optimization problem, but it solves a sequence of optimization problems. Therefore, the function run_model_rh returns the overall results in a DataFrame format, containing only results related to the implementation horizons of the model.
ParametricOptInterface extension
If one wants to use the ParametricOptInterface extension, the following adjustments must be made. The only supported type for horizons is PeriodHorizons (please refer to the horizons section). Additionally, the optimizer provided to run_model_rh must be a POI.Optimizer object.
EnergyModelsGeography extension
The basic version includes as well extensions that are loaded if you utilize EnergyModelsGeography. The first extensions provides support for utilizing both Areas and Transmission corridors, including TransmissionModes. The second extension provides a minor update to a function of EnergyModelsGeography when ParametricOptInterface is utilized.
In general, you do not have to take any specific precautions when using EnergyModelsGeography and EnergyModelsRecedingHorizon. However, if you use the transmission mode PipeLinepackSimple, you must provide initialization data through the type TransInitData. Similarly, if you have individual dynamic states in developed transmission modes, you must utilize the same initialization data as well.