TulipaEnergy / TulipaEnergyModel.jl

An energy system optimization model that is flexible, computationally efficient, and academically robust.
Apache License 2.0
27 stars 18 forks source link

Multi-year investment #462

Open datejada opened 9 months ago

datejada commented 9 months ago

Description

Update the model to handle multi-year investments. The checks below should be converted into issues when this development starts, to keep the changes as atomic as possible.

One big challenge in this implementation is the data handling. For instance, the capacity of the assets will be year-dependent, meaning that they will no longer be a single value, but a vector or time series. Therefore we will have a large data set for the input data.

Must-haves and nice-to-haves

For this epic, we want a working version that achieves the same features as COMPETES and allows different levels of detail for performance considerations. This means we want the following.

This leaves us the following nice-to-haves.

Sub issues

Improvements

After first release

Also add this table https://github.com/TulipaEnergy/TulipaEnergyModel.jl/issues/462#issuecomment-2345997142

In the refactor (mainly related to performance improvements)

abelsiqueira commented 8 months ago

This will influence #505. We should have a brief discussion about where years come up, and how they propagate. Are they present in the profiles from the influxDB?

abelsiqueira commented 6 months ago

We discussed some data aspects of this issue on 15/04/2024:

gnawin commented 2 months ago

We discussed how to move forward on 02/09/2024 with @abelsiqueira @datejada @g-moralesespana

_Note: when I talk about data input, I mean data input for the TEM, e.g., assetsdata.csv. The raw data should already be processed somehow outside TEM.

datejada commented 2 months ago

@g-moralesespana, the ramping constraints also must be modified to consider the accumulated investment (either simple or compact) in the constraints' RHS. Am I correct?

EDIT: And the constraints for the charging and discharging limits for storage assets when adding the binary variable to avoid simultaneous charging and discharging

g-moralesespana commented 2 months ago

Yes that is correct. The ramp is in unit of installed capacity. It is like in the clustered unit commitment, the ramp gets scaled by the number of units on, and the upper bound of the number of units on is given by the number of invested units. Similar with the storage also...

datejada commented 2 months ago

@gnawin can an asset have a missing investment_method? Or must we guarantee in the input data that we always use either simple or compact?

If we allow investment_method==missing what does that mean in the constraints?

My opinion: It can't be missing, but I am open to listening to other options

datejada commented 2 months ago

@g-moralesespana and @gnawin, we need to add something for the investment in the flows; otherwise, the model could invest one year to get capacity, and the next one doesn't invest, and the capacity disappears; that is weird. I suggest we implement the same equations for the simple method to flow for the time being. Then, we will have the lifetime parameter to avoid that situation. What do you both think?

g-moralesespana commented 2 months ago

What you mention flows, you mean to have investment in lines/connections, right? Yes, we can use the simple method, which includes lifetime.

gnawin commented 2 months ago

@datejada I agree that we should not allow investment method to be missing. And as @g-moralesespana mentioned, investment in flows should use the simple method.

What I was hesitant about is hub and consumer, that's why I removed that from the data, do we have a capacity constraint there?

datejada commented 2 months ago

@datejada I agree that we should not allow investment method to be missing. And as @g-moralesespana mentioned, investment in flows should use the simple method.

What I was hesitant about is hub and consumer, that's why I removed that from the data, do we have a capacity constraint there?

Great. It is better to have all defined even if they don't yet have a capacity constraint. My question was also because in the multi-year case study, the ens is a producer with an empty method. But I will fix it in the input data and in the structure.

Thanks both!

datejada commented 1 month ago

After discussion with the team, we need the following options:

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
datejada commented 1 month ago

@gnawin I suggest having this table (or similar) in the update of the documentation: https://github.com/TulipaEnergy/TulipaEnergyModel.jl/issues/462#issuecomment-2345997142

datejada commented 1 month ago

@gnawin With the proposed formulation, the concept of initial_units has changed since it depends on the year. As it is now, that parameter is actually representing the existing_units at that year. Note that the formulation does not accumulate that parameter over the years, so if the data is initial_units[2030] = 1 and then initial_units[2050] = 0, then the constraint for 2050 won't count the "initial" (I would say existing) units in 2030, it would assume that they were "decommissioned" for free.

It will depend on what we want to represent and how. Some options that I see:

As I said, it is a matter of what we want to represent and how.

I prefer the option of making the initial_units not year-dependant. But please discuss it with German.

@g-moralesespana, any thoughts on this?

datejada commented 1 month ago

@gnawin since we are working with the accumulated units, then either the capacity should not depend on the year or if it depends on the year then it should be multiplying the units in the accumulated expression and then represent the accumulated capacity instead of the accumulated units.

As it is formulated, if the user has capacity[2030] = 100MW and capacity[2050] = 200MW, you will get for free extra 100MW for each unit invested in 2030 when you analyze the 2050. Do you see what I mean?

Again, it depends on what we want to represent and how. So, if the capacity is not dependent on the year, we don't need to change the expression of the current accumulated units. If we want to keep the capacity changing by year, we must change the accumulated expression to represent the accumulated capacity instead of the accumulated units.

Here, I prefer capacity non depending on the year...

@g-moralesespana, any thoughts?

gnawin commented 1 month ago

@gnawin since we are working with the accumulated units, then either the capacity should not depend on the year or if it depends on the year then it should be multiplying the units in the accumulated expression and then represent the accumulated capacity instead of the accumulated units.

As it is formulated, if the user has capacity[2030] = 100MW and capacity[2050] = 200MW, you will get for free extra 100MW for each unit invested in 2030 when you analyze the 2050. Do you see what I mean?

Again, it depends on what we want to represent and how. So, if the capacity is not dependent on the year, we don't need to change the expression of the current accumulated units. If we want to keep the capacity changing by year, we must change the accumulated expression to represent the accumulated capacity instead of the accumulated units.

Here, I prefer capacity non depending on the year...

@g-moralesespana, any thoughts?

@datejada Yes, I agree. I realized that because I was in a rush to translate the formulation into Tulipa jargons before sending the pdf to you, I made some mistakes regarding this. The idea behind the formulation was indeed a capacity NOT depending on year...but we can discuss further

g-moralesespana commented 1 month ago

I suppose all this was already solved in our last meeting.