balmorelcommunity / Balmorel

Balmorel Model
33 stars 20 forks source link

Seasonal rolling horizon jgb #6

Closed jgeab closed 5 years ago

jgeab commented 5 years ago

Many changes are part of this pull request (this branch should be tested with data branch "Data_update_2019_JGB")::

"DECOMMISSIONING ADD-ON" Endogenous decommissioning of exogenous and endogenous capacities add-on implemented. Several possibilities are allowed for decommissioning or exogenous and/or endogenous capacities (detailed information is explained in balopt): -No decommissioning -Decommissioning based on lifetime -Decommissioning based on economic profitability -Combination of some of the others -Bringing back to "life" endogenously decommissioned power plants The introduction of a variable called "VGKFX", i.e. a variable that without decommissioning would equal GKFX, was considered but in the end I decided not to include it, since it would make the base model more complex (GKFX would become a variable). Instead, I introduced the following exemplary sentence in most of the equations: $ifi %DECOM%==yes -VDECOM_EXO_ACCUM(IY411,IA,IGEXT)$IGDECOMEXOPOT(IY411,IA,IGEXT) To be done: Hydrogen add-on not modified yet. It needs to be modified by someone with more experience with the add-on (Ida, Rasmus,??) Decommissioning variables might be used in future code for refurbishment possibilities, etc

"EXPORT AND IMPORT RESULTS OPTIONS" The options "export results" and "import results" are now activated and are meant to be used to exchange key results from run to run. The following export results have been included: -Hydro levels at the beginning of each season -Storage level of seasonal storages at the beginning of each season -Technology development -Transmission development Any of these exported results can be the introduced in future runs by activating the option "import results" and the corresponding option to introduce in the run.

SEASONAL ROLLING HORIZON MODE This option is meant to be an improved version of the old "BB3" mode, where seasons were optimized one by one. The implemented code allows to optimize set of seasons defined by the user in a rolling horizon way (just like the yearly rolling horizon of BB4). This option is meant to be combined with the option "import_results" to define seasonal variables like interseasonal storage levels, for instance. When performing a seasonal rolling horizon, the user can specify whether to link or not results from the previous optimization. This can be relevant for ramping constraints, Unit Commitment, etc, if continuity between the seasons is desired. To carry out this work, I redefined slightly the meaning and use of IHOURSINST. This parameter is supposed to compare the timesteps used in each optimization with respect to the full year, so annual constraints are respected in all the optimizations. I replaced the parameter IHOURSINST of equation QHYRSSEQ with the new parameter IHYRST. This new parameter is defined with the new user option HYRS_AGG in balopt.opt. This option will affect the variable VHYRS_S so the level of storage represents an annual aggregation change, or a seasonal aggregation change. IHOURSINST is so far also used for timeseries scaling (which actually leads to misleading results sometimes), so I expect to move it to auxils and improve the scaling soon.

ADDITIONAL CHANGES: -Rampingstepwise adapted to latest changes -Unit Commitment adapted to latest changes -GKRATE, XKRATE and GEFFRATE are defined in the code in a more efficient way to reduce RAM use example: (1$(NOT GEFFRATE(IA,G))+GEFFRATE(IA,G)) -BYPASS equations included for Back Pressure technology (for Extraction technologies it will come in a future pull request) -Cleaning up Balmorelbb4.sim by moving code to Balmorelbb4.inc -SUBTECHGROUP (and others) set included to be able to model potentials (and other stuff) in an easier way. -Equation that limit the use of fuel in a seasonal bases is introduced. Relevant for Municipal Solid Waste. -Timestep conversion tool implemented in auxils -Variable costs are split into whether they correspond to the input or to the output. Relevant for CHP.