Commit ea843381 authored by jussi ikäheimo's avatar jussi ikäheimo
Browse files

Merge remote-tracking branch 'gitlab/master' into storagemapping

parents efe2ca3d 3c38c833
# Changelog
All notable changes to this project will be documented in this file.
## [Unreleased]
### Added
- Dynamic generation portfolios aka pathway modelling aka multi-year simulations with discounted costs enabled
## [1.4] - 2021-06-29
- Time series for transmission availability and losses
- More versatile reading of input files. Translating input Excel to input GDX supported inside Backbone 1e_inputs.gms
## [1.3.3] - 2021-04-14
- Transfer can have additional 'variable' costs (costs per MWh transferred)
- Reserve activation duration and reactivation time included (in state constraints)
- Raise execution error if solver did not finish normally
### Changed
- Updated the selection of unit efficiency approximation levels
- Additional result outputs
## [1.3.2] - 2021-01-19
- Moving from p_groupPolicy3D to separate p_groupPolicyUnit and p_groupPolicyEmission
## [1.3.1] - 2021-01-19
- Maximum (and minimum) limit to sum of energy inputs/outputs of selected group of units
- Additional result outputs concerning emissions
## [1.3] - 2020-10-21
- Static inertia requirement can be fulfilled by both rotational inertia of machines and certain reserve products
- Dynamic generation portfolios aka pathway modelling aka multi-year simulations with discounted costs enabled
- Parameters p_gnPolicy and p_groupPolicy3D replaced with p_groupPolicyEmission and p_groupPolicyUnit
### Fixed
- Updated the selection of unit efficiency approximation levels
## [1.2.2] - 2020-06-09
- Clean up, minor bug fixes and more results outputs
## [1.2.1] - 2019-11-26
### Fixed
......
# Backbone
Backbone is a generic energy network optimization tool written in [GAMS](https://www.gams.com/). It has been designed to be highly adaptable in different dimensions: temporal, spatial, technology representation and market design. The model can represent stochastics with a [model predictive control method](https://doi.org/10.1016/j.automatica.2008.03.002), with short-term forecasts and longer-term statistical uncertainties. Backbone can support multiple different models (e.g. investment or unit commitment) due to the modifiable temporal structure and varying lengths of the time steps.
Backbone is a generic energy network optimization tool written in [GAMS](https://www.gams.com/). It has been designed to be highly adaptable in different dimensions: temporal, spatial, technology representation and market design. The model can represent stochastics with a [model predictive control method](https://doi.org/10.1016/j.automatica.2008.03.002), with short-term forecasts and longer-term statistical uncertainties. Backbone can support multiple different models due to the modifiable temporal structure and varying lengths of the time steps.
If you use Backbone in a published work, please cite the [following publication](https://doi.org/10.3390/en12173388), which describes the Backbone energy systems modelling framework.
*MDPI and ACS Style*
Helistö, N.; Kiviluoma, J.; Ikäheimo, J.; Rasku, T.; Rinne, E.; O’Dwyer, C.; Li, R.; Flynn, D. Backbone—An Adaptable Energy Systems Modelling Framework. Energies 2019, 12, 3388. https://doi.org/10.3390/en12173388
*AMA Style*
Helistö N, Kiviluoma J, Ikäheimo J, Rasku T, Rinne E, O’Dwyer C, Li R, Flynn D. Backbone—An Adaptable Energy Systems Modelling Framework. Energies. 2019; 12(17):3388. https://doi.org/10.3390/en12173388
*Chicago/Turabian Style*
Helistö, Niina, Juha Kiviluoma, Jussi Ikäheimo, Topi Rasku, Erkka Rinne, Ciara O’Dwyer, Ran Li, and Damian Flynn. 2019. "Backbone—An Adaptable Energy Systems Modelling Framework" Energies 12, no. 17: 3388. https://doi.org/10.3390/en12173388
## Getting Started
Make sure that you have [Git](https://git-scm.com/) version control system and a Git interface, such as [TortoiseGit](https://tortoisegit.org/) or [SourceTree](https://www.sourcetreeapp.com/), installed on your computer.
You also need to have [GAMS](https://www.gams.com/) version 24.0 or later installed.
Check the Backbone wiki pages: [Backbone wiki](https://gitlab.vtt.fi/backbone/backbone/-/wikis/home)
Backbone requires [GAMS](https://www.gams.com) to work. While you can just download the repository, it will be easier to get new updates and to contribute to the development with [Git](https://git-scm.com/) version control system and a Git interface, such as [TortoiseGit](https://tortoisegit.org/) or [SourceTree](https://www.sourcetreeapp.com/), installed on your computer.
In order to get a copy of the Backbone project, you need to clone it using Git. Copy and paste the URL of the original Backbone repository and select the directory where you want Backbone to be cloned. The URL of the original Backbone repository is https://gitlab.vtt.fi/backbone/backbone.
Cloning the repository with Git: Copy and paste the URL of the original Backbone repository and select the directory where you want Backbone to be cloned. The URL of the original Backbone repository is https://gitlab.vtt.fi/backbone/backbone.
You should now have *Backbone.gms*, a few additional files and five subdirectories in the directory where you cloned Backbone.
......@@ -68,6 +78,7 @@ When starting to use Backbone, there is no immediate need to understand every si
* Dana Kirchem
* Ran Li
* Ciara O'Dwyer
* Jussi Ikäheimo
## License
......
......@@ -83,7 +83,7 @@ q_obj ..
// Start-up costs, initial startup free as units could have been online before model started
+ sum(uft_online(unit, f, t),
+ sum(unitStarttype(unit, starttype),
+ sum(unitStarttype(unit, starttype)$ts_startupCost_(unit, starttype, t),
+ [ // Unit startup variables
+ v_startup_LP(unit, starttype, s, f, t)${ uft_onlineLP(unit, f, t) }
+ v_startup_MIP(unit, starttype, s, f, t)${ uft_onlineMIP(unit, f, t) }
......@@ -93,7 +93,7 @@ q_obj ..
) // END sum(uft_online)
// Shut-down costs, initial shutdown free?
+ sum(uft_online(unit, f, t),
+ sum(uft_online(unit, f, t)$p_uShutdown(unit, 'cost'),
+ p_uShutdown(unit, 'cost')
* [
+ v_shutdown_LP(unit, s, f, t)
......@@ -104,7 +104,7 @@ q_obj ..
) // END sum(uft_online)
// Ramping costs
+ sum(gnuft_rampCost(grid, node, unit, slack, f, t),
+ sum(gnuft_rampCost(grid, node, unit, slack, f, t)$p_gnuBoundaryProperties(grid, node, unit, slack, 'rampCost'),
+ p_gnuBoundaryProperties(grid, node, unit, slack, 'rampCost')
* v_genRampUpDown(grid, node, unit, slack, s, f, t)
) // END sum(gnuft_rampCost)
......@@ -112,12 +112,12 @@ q_obj ..
] // END * p_sft_probability(s,f,t)
// Variable Transfer
+ sum(gn2n_directional(grid, node_, node),
+ sum(gn2n_directional(grid, node_, node)$p_gnn(grid, node, node_, 'variableTransCost'),
+ p_gnn(grid, node, node_, 'variableTransCost')
* v_transferLeftward(grid, node_, node, s, f, t)
) // END sum(gn2n_directional(grid, node_, node))
+ sum(gn2n_directional(grid, node_, node),
+ sum(gn2n_directional(grid, node_, node)$p_gnn(grid, node_, node, 'variableTransCost'),
+ p_gnn(grid, node_, node, 'variableTransCost')
* v_transferRightward(grid, node_, node, s, f, t)
) // END sum(gn2n_directional(grid, node_, node))
......
......@@ -2874,6 +2874,7 @@ q_inertiaMin(restypeDirectionGroup(restype_inertia, up_down, group), sft(s, f, t
] // END * p_groupPolicy
;
*--- Maximum Share of Instantaneous Generation --------------------------------
q_instantaneousShareMax(group, sft(s, f, t))
......@@ -2881,36 +2882,36 @@ q_instantaneousShareMax(group, sft(s, f, t))
} ..
// Generation of units in the group
+ sum(gnu_output(grid, node, unit)${ gnuGroup(grid, node, unit, group)
and p_gnu(grid, node, unit, 'unitSize')
and gnGroup(grid, node, group)
and gnuft(grid, node, unit, f, t)
},
+ sum(gnuft(gnu_output(grid, node, unit), f, t)$(
( gnuGroup(grid, node, unit, group)
$p_gnu(grid, node, unit, 'unitSize')
) $gnGroup(grid, node, group)
),
+ v_gen(grid, node, unit, s, f, t)
) // END sum(gnu)
// Controlled transfer to this node group
// Set gn2nGroup controls whether transfer is included in the equation
+ sum(gn2n_directional(grid, node, node_)${ gn2nGroup(grid, node, node_, group)
and gnGroup(grid, node, group)
and not gnGroup(grid, node_, group)
},
+ sum(gn2nGroup(gn2n_directional(grid, node, node_), group)$(
( not gnGroup(grid, node_, group)
) $gnGroup(grid, node, group)
),
+ v_transferLeftward(grid, node, node_, s, f, t)
* [1
* (1
- p_gnn(grid, node_, node, 'transferLoss')${not gn2n_timeseries(grid, node_, node, 'transferLoss')}
- ts_gnn_(grid, node_, node, 'transferLoss', f, t)${gn2n_timeseries(grid, node_, node, 'transferLoss')}
]
)
) // END sum(gn2n_directional)
+ sum(gn2n_directional(grid, node_, node)${ gn2nGroup(grid, node_, node, group)
and gnGroup(grid, node, group)
and not gnGroup(grid, node_, group)
},
+ sum(gn2nGroup(gn2n_directional(grid, node_, node),group)$(
( not gnGroup(grid, node_, group)
) $gnGroup(grid, node, group)
),
+ v_transferRightward(grid, node_, node, s, f, t)
* [1
* (1
- p_gnn(grid, node_, node, 'transferLoss')${not gn2n_timeseries(grid, node_, node, 'transferLoss')}
- ts_gnn_(grid, node_, node, 'transferLoss', f, t)${gn2n_timeseries(grid, node_, node, 'transferLoss')}
]
)
) // END sum(gn2n_directional)
=L=
......@@ -2923,23 +2924,24 @@ q_instantaneousShareMax(group, sft(s, f, t))
) // END sum(gnGroup)
// Consumption of units
- sum(gnu_input(grid, node, unit)${ p_gnu(grid, node, unit, 'unitSize')
and gnGroup(grid, node, group)
and gnuft(grid, node, unit, f, t)
},
- sum(gnuft(gnu_input(grid, node, unit), f, t)$( p_gnu(grid, node, unit, 'unitSize')
$gnGroup(grid, node, group)
),
+ v_gen(grid, node, unit, s, f, t)
) // END sum(gnu)
// Controlled transfer from this node group
+ sum(gn2n_directional(grid, node, node_)${ gnGroup(grid, node, group)
and not gnGroup(grid, node_, group)
},
+ sum(gn2n_directional(grid, node, node_)$(
( not gnGroup(grid, node_, group)
) $gnGroup(grid, node, group)
),
+ v_transferRightward(grid, node, node_, s, f, t)
) // END sum(gn2n_directional)
+ sum(gn2n_directional(grid, node_, node)${ gnGroup(grid, node, group)
and not gnGroup(grid, node_, group)
},
+ sum(gn2n_directional(grid, node_, node)$(
( not gnGroup(grid, node_, group)
) $gnGroup(grid, node, group)
),
+ v_transferLeftward(grid, node_, node, s, f, t)
) // END sum(gn2n_directional)
$ontext
......
......@@ -629,12 +629,18 @@ loop(m,
* --- Calculating fuel price time series --------------------------------------
loop(commodity${ p_price(commodity, 'useTimeSeries') },
tmp_ = smin(t_full(t),ord(t));
loop(commodity$p_price(commodity, 'useTimeSeries'),
// Determine the time steps where the prices change
Option clear = tt;
tt(t)${ ts_priceChange(commodity,t) }
= yes;
ts_price(commodity, t_full(t)) = sum(tt(t_)${ ord(t_) <= ord(t) }, ts_priceChange(commodity, t_));
tt(t)$ts_priceChange(commodity,t) = yes;
tmp = sum(tt(t)$(ord(t) < tmp_),
ts_priceChange(commodity, t)
);
loop(t_full(t),
tmp = tmp + ts_priceChange(commodity, t);
ts_price(commodity, t) = tmp;
);
); // END loop(commodity)
* --- Slack Direction ---------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment