Example gallery
How to run the examples
To run the examples, we recommend to follow the instructions here to set up the basic SpineToolbox workflow, loading the JSON example file in your input data store depending on the example you want to run. We recommend creating a new SpineToolbox project for each example.
Examples
Each example has a link to the JSON file with the input data.
- Simple system: Example with two nodes and units, including the relationships among them for a temporal block with duration of one day.
- Temporal resolution: The model of the Temporal Resolution Tutorial: the simple system with an hourly demand over five hours, where the fuel node has a resolution of 1, 1, 1 and 2 hours.
- Stochastic model: Setup of stochastic structures for three forecast scenarios.
- Capacity planning: This example shows the definition of investment and operational temporal blocks in SpineOpt for one target year.
- Multi-year investment examples: The following examples have a setup for a multi-year investment case study (e.g., for pathway planning) in a five-year time horizon with investments every five years (e.g., at the beginning and end of the time horizon) with a 4-month operational temporal block duration. Here, we have different options in SpineOpt:
- Example without economic parameters calculation: No extra manipulation of the input data from SpineOpt (multiyear_economic_discounting not set). So, the user input data needs to account for the value of money over time according to discount rate and year.
- Example with economic parameters calculation without milestone years: SpineOpt internally calculates the parameters for discounting investment and operation costs given a discount rate, discount year, and lifetime information (multiyear_economic_discounting =
consecutive_years). - Example with economic parameters calculation with milestone years: Since solving five years of operation might be computationally intensive, SpineOpt offers the option of having milestone years (multiyear_economic_discounting =
milestone_years). In that case, only two years are solved in the model. Still, one represents the operation of the non-milestone years using a calculated weight, including the discounted operation costs.
- Reserves constraints: Extension of the simple system including operating reserve constraints.
- Unit commitment constraints: Extension of the simple system including unit commitment constraints.
- Ramping constraints: The model of the Ramping definition tutorial: the simple system with a three-hour demand and ramp limits, a minimum operating point and start-up and shut-down limits for one of the power plants.
- Rolling horizon: This is an Example with a total time horizon of one week, an optimization window of one day, and rolling forward one day at a time.
- Representative periods: Example with representative periods for a simple case with seasonal and short-term storage nodes.
- Multi-stage optimisation: The test system of the Multi-Stage Optimisation Tutorial, in which a long-term stage model passes results to an operational model. It has two electricity nodes connected by a line and candidate PV, wind, battery and hydrogen units.
- Retrofitting: The example of How to Model Retrofitting: an existing generator that can be either retrofitted or replaced by a new one.
- Hydropower coupling examples: The models of How to model hydropower coupling: two hydropower plants on the same river, where the water released by the upstream plant flows to the downstream plant, over one day in six-hour steps.
- Basic model: The reservoirs have fixed end levels and the electricity is sold at given prices. Its inflows and prices are also available as the Excel file hydro_time_series.xlsx, which is used in the tutorial Importing time series from Excel.
- Maximisation of stored water: The water left in the reservoirs at the end has a value, instead of a fixed end level.
- Spillage constraints: The spilt water of the upstream plant has a minimum, a maximum and a penalty.
- 6-unit system: A one-week system with hourly resolution and two electricity areas connected by a line. It has seven units (nuclear, CCGT, CHP, three OCGTs and wind), a battery, heat demand and CO2 and SO2 emission nodes, and includes unit commitment, start-up and shut-down costs and a user constraint linking the electricity and heat output of the CHP.
- Precompile: Not an example as such. SpineOpt runs this file when the package is precompiled, so that the first run of your own model starts faster. The content is identical to the capacity planning example above, so use that one as a starting point instead.
Some archived examples are also in the spine tools repository, e.g. case study A5.