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 provided case object should be an
EMB.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. - The model object must be of a subtype of
RecHorEnergyModelfor dispatching purposes. - 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.