diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 8579c5e4..18167c00 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-10-29T06:56:50","documenter_version":"1.7.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-10-29T08:09:46","documenter_version":"1.7.0"}} \ No newline at end of file diff --git a/dev/10-how-to-use/index.html b/dev/10-how-to-use/index.html index 2b51948c..5cc14411 100644 --- a/dev/10-how-to-use/index.html +++ b/dev/10-how-to-use/index.html @@ -3,4 +3,4 @@ compute_conflict!(energy_problem.model) iis_model, reference_map = copy_conflict(energy_problem.model) print(iis_model) -end
Section Storage Modeling explains the main concepts for modeling seasonal and non-seasonal storage in TulipaEnergyModel.jl. To define if an asset is one type or the other then consider the following:
is_seasonal
to true
in the assets-data.csv
.is_seasonal
to false
in the assets-data.csv
.Note: If the input data covers only one representative period for the entire year, for example, with 8760-hour timesteps, and you have a monthly hydropower plant, then you should set the
is_seasonal
parameter for that asset tofalse
. This is because the length of the representative period is greater than the storage capacity of the storage asset.
Energy storage assets have a unique characteristic wherein the investment is based not solely on the capacity to charge and discharge, but also on the energy capacity. Some storage asset types have a fixed duration for a given capacity, which means that there is a predefined ratio between energy and power. For instance, a battery of 10MW/unit and 4h duration implies that the energy capacity is 40MWh. Conversely, other storage asset types don't have a fixed ratio between the investment of capacity and storage capacity. Therefore, the energy capacity can be optimized independently of the capacity investment, such as hydrogen storage in salt caverns. To define if an energy asset is one type or the other then consider the following parameter setting in the file assets-data.csv
:
Investment energy method: To use this method, set the parameter storage_method_energy
to true
. In addition, it is necessary to define:
investment_cost_storage_energy
: To establish the cost of investing in the storage capacity (e.g., kEUR/MWh/unit).fixed_cost_storage_energy
: To establish the fixed cost of energy storage capacity (e.g., kEUR/MWh/unit).investment_limit_storage_energy
: To define the potential of the energy capacity investment (e.g., MWh). Missing
values mean that there is no limit.investment_integer_storage_energy
: To determine whether the investment variables of storage capacity are integers of continuous.Fixed energy-to-power ratio method: To use this method, set the parameter storage_method_energy
to false
. In addition, it is necessary to define the parameter energy_to_power_ratio
to establish the predefined duration of the storage asset or ratio between energy and power. Note that all the investment costs should be allocated in the parameter investment_cost
.
In addition, the parameter capacity_storage_energy
in the graph-assets-data.csv
defines the energy per unit of storage capacity invested in (e.g., MWh/unit).
For more details on the constraints that apply when selecting one method or the other, please visit the mathematical formulation
section.
Depending on the configuration of the energy storage assets, it may or may not be possible to charge and discharge them simultaneously. For instance, a single battery cannot charge and discharge at the same time, but some pumped hydro storage technologies have separate components for charging (pump) and discharging (turbine) that can function independently, allowing them to charge and discharge simultaneously. To account for these differences, the model provides users with three options for the use_binary_storage_method
parameter in the assets-data.csv
file:
binary
: the model adds a binary variable to prevent charging and discharging simultaneously.relaxed_binary
: the model adds a binary variable that allows values between 0 and 1, reducing the likelihood of charging and discharging simultaneously. This option uses a tighter set of constraints close to the convex hull of the full formulation, resulting in fewer instances of simultaneous charging and discharging in the results.missing
value, the storage asset can charge and discharge simultaneously.For more details on the constraints that apply when selecting this method, please visit the mathematical formulation
section.
The unit commitment constraints are only applied to producer and conversion assets. The unit_commitment
parameter must be set to true
to include the constraints in the assets-data.csv
. Additionally, the following parameters should be set in that same file:
unit_commitment_method
: It determines which unit commitment method to use. The current version of the code only includes the basic version. Future versions will add more detailed constraints as additional options.units_on_cost
: Objective function coefficient on units_on
variable. (e.g., no-load cost or idling cost in kEUR/h/unit)unit_commitment_integer
: It determines whether the unit commitment variables are considered as integer or not (true
or false
)min_operating_point
: Minimum operating point or minimum stable generation level defined as a portion of the capacity of asset (p.u.)For more details on the constraints that apply when selecting this method, please visit the mathematical formulation
section.
The ramping constraints are only applied to producer and conversion assets. The ramping
parameter must be set to true
to include the constraints in the assets-data.csv
. Additionally, the following parameters should be set in that same file:
max_ramp_up
: Maximum ramping up rate as a portion of the capacity of asset (p.u./h)max_ramp_down:
Maximum ramping down rate as a portion of the capacity of asset (p.u./h)For more details on the constraints that apply when selecting this method, please visit the mathematical formulation
section.
For the model to add constraints for a maximum or minimum energy limit for an asset throughout the model's timeframe (e.g., a year), we need to establish a couple of parameters:
is_seasonal = true
in the assets-data.csv
. This parameter enables the model to use the inter-temporal constraints.max_energy_timeframe_partition
$\neq$ missing
or min_energy_timeframe_partition
$\neq$ missing
in the assets-data.csv
. This value represents the peak energy that will be then multiplied by the profile for each period in the timeframe.Note: These parameters are defined per period, and the default values for profiles are 1.0 p.u. per period. If the periods are determined daily, the energy limit for the whole year will be 365 times
max
ormin_energy_timeframe_partition
.
profile_type
and profile_name
in the assets-timeframe-profiles.csv
and the profile values in the profiles-timeframe.csv
. If there is no profile defined, then by default it is 1.0 p.u. for all periods in the timeframe.assets-timeframe-partitions.csv
. If there is no partition defined, then by default the constraint is created for each period in the timeframe, otherwise, it will consider the partition definition in the file.Tip: If you want to set a limit on the maximum or minimum outgoing energy for a year with representative days, you can use the partition definition to create a single partition for the entire year to combine the profile.
Let's assume we have a year divided into 365 days because we are using days as periods in the representatives from TulipaClustering.jl. Also, we define the max_energy_timeframe_partition = 10 MWh
, meaning the peak energy we want to have is 10MWh for each period or period partition. So depending on the optional information, we can have:
Profile | Period Partitions | Example |
---|---|---|
None | None | The default profile is 1.p.u. for each period and since there are no period partitions, the constraints will be for each period (i.e., daily). So the outgoing energy of the asset for each day must be less than or equal to 10MWh. |
Defined | None | The profile definition and value will be in the assets-timeframe-profiles.csv and profiles-timeframe.csv files. For example, we define a profile that has the following first four values: 0.6 p.u., 1.0 p.u., 0.8 p.u., and 0.4 p.u. There are no period partitions, so constraints will be for each period (i.e., daily). Therefore the outgoing energy of the asset for the first four days must be less than or equal to 6MWh, 10MWh, 8MWh, and 4MWh. |
Defined | Defined | Using the same profile as above, we now define a period partition in the assets-timeframe-partitions.csv file as uniform with a value of 2. This value means that we will aggregate every two periods (i.e., every two days). So, instead of having 365 constraints, we will have 183 constraints (182 every two days and one last constraint of 1 day). Then the profile is aggregated with the sum of the values inside the periods within the partition. Thus, the outgoing energy of the asset for the first two partitions (i.e., every two days) must be less than or equal to 16MWh and 12MWh, respectively. |
A group of assets refers to a set of assets that share certain constraints. For example, the investments of a group of assets may be capped at a maximum value, which represents the potential of a specific area that is restricted in terms of the maximum allowable MW due to limitations on building licenses.
In order to define the groups in the model, the following steps are necessary:
Create a group in the groups-data.csv
file by defining the name
property and its parameters.
In the file graph-assets-data.csv
, assign assets to the group by setting the name
in the group
parameter/column.
Note: A missing value in the parameter
group
in thegraph-assets-data.csv
means that the asset does not belong to any group.
Groups are useful to represent several common constraints, the following group constraints are available.
The mathematical formulation of the maximum and minimum investment limit for group constraints is available here. The parameters to set up these constraints in the model are in the groups-data.csv
file.
invest_method = true
. This parameter enables the model to use the investment group constraints.
min_investment_limit
$\neq$ missing
or max_investment_limit
$\neq$ missing
. This value represents the limits that will be imposed on the investment that belongs to the group.
Notes:
- A missing value in the parameters
min_investment_limit
andmax_investment_limit
means that there is no investment limit.- These constraints are applied to the investments each year. The model does not yet have investment limits to a group's accumulated invested capacity.
Let's explore how the groups are set up in the test case called Norse. First, let's take a look at the groups-data.csv file:
Row | name | year | invest_method | min_investment_limit | max_investment_limit |
---|---|---|---|---|---|
String15 | Int64 | Bool | Int64? | Int64? | |
1 | renewables | 2030 | true | missing | 40000 |
2 | ccgt | 2030 | true | 10000 | missing |
In the given data, there are two groups: renewables
and ccgt
. Both groups have the invest_method
parameter set to true
, indicating that investment group constraints apply to both. For the renewables
group, the min_investment_limit
parameter is missing, signifying that there is no minimum limit imposed on the group. However, the max_investment_limit
parameter is set to 40000 MW, indicating that the total investments of assets in the group must be less than or equal to this value. In contrast, the ccgt
group has a missing value in the max_investment_limit
parameter, indicating no maximum limit, while the min_investment_limit
is set to 10000 MW for the total investments in that group.
Let's now explore which assets are in each group. To do so, we can take a look at the graph-assets-data.csv file:
Row | name | type | group |
---|---|---|---|
String31 | String15 | String15? | |
1 | Asgard_Solar | producer | renewables |
2 | Asgard_CCGT | conversion | ccgt |
3 | Midgard_Wind | producer | renewables |
4 | Midgard_CCGT | conversion | ccgt |
Here we can see that the assets Asgard_Solar
and Midgard_Wind
belong to the renewables
group, while the assets Asgard_CCGT
and Midgard_CCGT
belong to the ccgt
group.
Note: If the group has a
min_investment_limit
, then assets in the group have to allow investment (investable = true
) for the model to be feasible. If the assets are notinvestable
then they cannot satisfy the minimum constraint.
It is possible to simutaneously model different years, which is especially relevant for modeling multi-year investments. Multi-year investments refer to making investment decisions at different points in time, such that a pathway of investments can be modeled. This is particularly useful when long-term scenarios are modeled, but modeling each year is not practical. Or in a business case, investment decisions are supposed to be made in different years which has an impact on the cash flow.
In order to set up a model with year information, the following steps are necessary.
Fill in all the years in year-data.csv
file by defining the year
property and its parameters.
Differentiate milestone years and non-milestone years.
Note: A year can both be a year that you want to model and that there are existing units invested, then this year is a milestone year.
Fill in the parameters in vintage-assets-data.csv
and vintage-flows-data.csv
. Here you need to fill in parameters that are only related to the investment year (commission_year
in the data) of the asset, i.e., investment costs and fixed costs.
Fill in the parameters in graph-assets-data.csv
and graph-flows-data.csv
. These parameters are for the assets across all the years, i.e., not dependent on years. Examples are lifetime (both technical_lifetime
and economic_lifetime
) and capacity of a unit.
You also have to choose a investment_method
for the asset, between none
, simple
, and compact
. The below tables shows what happens to the activation of the investment and decommission variable for certain investment methods and the investable
parameter.
Consider you only want to model operation without investments, then you would need to set investable_method
to none
. Neither investment variables and decommission variables are activated. And here the investable_method
overrules investable
, because the latter does not matter.
Note: Although it is called
investment_method
, you can see from the table that, actually, it controls directly the activation of the decommission variable. The investment variable is controlled byinvestable
, which is overruled byinvestable_method
in case of a conflict (i.e., for thenone
method).
investment_method | investable | investment variable | decommission variable |
---|---|---|---|
none | true | false | false |
none | false | false | false |
simple | true | true | true |
simple | false | false | true |
compact | true | true | true |
compact | false | false | true |
For more details on the constraints that apply when selecting these methods, please visit the mathematical formulation
section.
Note:
compact
method can only be applied to producer assets and conversion assets. Transport assets and storage assets can only usesimple
method.
Fill in the assets and flows information in assets-data.csv
and flows-data.csv
.
year
column, fill in all the milestone years. In the commission_year
column, fill in the investment years of the existing assets that are still available in this year
.commission_year
is a non-milestone year, then it means the row is for an existing unit. The investable
has to be set to false
, and you put the existing units in the column initial_units
.commission_year
is a milestone year, then you put the existing units in the column initial_units
. Depending on whether you want to model investments or not, you put the investable
to either true
or false
.Let's explain further using an example. To do so, we can take a look at the assets-data.csv file:
Row | name | year | commission_year | investable | initial_units |
---|---|---|---|---|---|
String7 | Int64 | Int64 | Bool | Float64 | |
1 | ocgt | 2030 | 2030 | true | 0.0 |
2 | ccgt | 2030 | 2028 | false | 1.0 |
3 | ccgt | 2030 | 2030 | true | 0.0 |
4 | battery | 2030 | 2020 | false | 0.07 |
5 | battery | 2030 | 2030 | true | 0.02 |
6 | wind | 2030 | 2020 | false | 0.07 |
7 | wind | 2030 | 2030 | true | 0.02 |
8 | solar | 2030 | 2030 | true | 0.0 |
9 | ens | 2030 | 2030 | false | 1.0 |
10 | demand | 2030 | 2030 | false | 0.0 |
We allow investments of ocgt
, ccgt
, battery
, wind
, and solar
in 2030.
ocgt
has no existing units.ccgt
has 1 existing units, invested in 2028, and still available in 2030.ccgt
has 0.07 existing units, invested in 2020, and still available in 2030. Another 0.02 existing units, invested in 2030.wind
has 0.07 existing units, invested in 2020, and still available in 2030. Another 0.02 existing units, invested in 2030.solar
has no existing units.Note: We only consider the existing units which are still available in the milestone years.
Fill in relevant profiles in assets-profiles.csv
, flows-profiles.csv
, and profiles-rep-periods.csv
. Important to know that you can use different profiles for assets that are invested in different years. You fill in the profile names in assets-profiles.csv
for relevant years. In profiles-rep-periods.csv
, you relate the profile names with the modeled years.
Let's explain further using an example. To do so, we can take a look at the assets-profiles.csv
file:
Row | asset | commission_year | profile_type | profile_name |
---|---|---|---|---|
String7 | Int64 | String15 | String31 | |
1 | wind | 2020 | availability | availability-wind2020 |
2 | wind | 2030 | availability | availability-wind2030 |
We have two profiles for wind
invested in 2020 and 2030. Imagine these are two wind turbines with different efficiencies due to the year of manufacture. These are reflected in the profiles for the model year 2030, which are defined in the profiles-rep-periods.csv
file.
For economic representation, the following parameters need to be set up:
[optional] discount year
and discount rate
in the model-parameters-example.toml
file: model-wide discount year and rate. By default, the model will use a discount rate of 0, and a discount year of the first milestone year. In other words, the costs will be discounted to the cost of the first milestone year.
discount_rate
in graph-assets-data.csv
and graph-flows-data.csv
: technology-specific discount rates.
economic_lifetime
in graph-assets-data.csv
and graph-flows-data.csv
: used for discounting the costs.
Note: Since the model explicitly discounts, all the inputs for costs should be given in the costs of the relevant year. For example, to model investments in 2030 and 2050, the
investment_cost
should be given in 2030 costs and 2050 costs, respectively.
For more details on the formulas for economic representation, please visit the mathematical formulation
section.
Settings
This document was generated with Documenter.jl version 1.7.0 on Tuesday 29 October 2024. Using Julia version 1.11.1.