Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document duration_period & related params #385

Open
DIUANA opened this issue Aug 17, 2020 · 7 comments
Open

Document duration_period & related params #385

DIUANA opened this issue Aug 17, 2020 · 7 comments
Labels
docs Documentation

Comments

@DIUANA
Copy link

DIUANA commented Aug 17, 2020

Hi all once again I hope you are fine.

I would like to expose some issues I am facing regarding the duration_period parameter.

According to the documentation in MESSAGEix, the key of an element in set year identifies the last year of the period, i.e., in a set year=[2000, 2005, 2010, 2015], the period ‘2010’ comprises the years [2006, …, 2010].

  1. First of all, duration_period_sum is not computing correctly the values if there are different time steps between the periods.
    If we take the Westeros tutorial, for instance, and change the model horizon to:

    • history = [695]
    • model_horizon = [700, 710, 725]

    …instead of the original one in which the interval between all periods is 10, we can see that duration_period_sum has wrong values for the second vintage-year_all pair:

    • duration_period_sum(695, 700) is 5, which is correct.
    • duration_period_sum(695, 710) is 10, when it should be 15.

    This happens because the equation computes the duration period of the first year and ignores the duration period of the last year:

    duration_period_sum(year_all,year_all2) =
        SUM(year_all3$( ORD(year_all) <= ORD(year_all3) AND ORD(year_all3) < ORD(year_all2) ) , duration_period(year_all3) ) ;
    
  2. (1) also generate issues with the elapsed_years parameter.

  3. Finally it is not clear for me how the parameter remaining_years is being considered, since it takes into account the whole period of the year. For example, remaining_years(700) is 30 because it is considering 696 until 725 in the presented case. It raises a difference in the period treatment since duration_period_sum does not take into account the years before the period like remaining_years does.

It would be good to have an unique approach for the duration_period-related parameters in order to avoid bad interpretation and have all of them aligned. Or in case of different approaches it would be nice to have it clearly documented.

Related issue: #112

All the Best

@khaeru
Copy link
Member

khaeru commented Aug 17, 2020

Thanks @DIUANA for this description. I am going to copy-edit it a little to make it easier to read, but—since I'm not the author of that GAMS code—I am not the one most suited to address the issue(s) raised.

@DIUANA
Copy link
Author

DIUANA commented Aug 18, 2020

@khaeru thanks again. May you please raise it in the modelling meetings? Or maybe if it is possible to put me in touch with the most suited person atm to tackle this.

@khaeru
Copy link
Member

khaeru commented Aug 18, 2020

May you please raise it in the modelling meetings?

I've already put it on the agenda for 2020-08-19. If someone is assigned, we will update the issue.

@DIUANA
Copy link
Author

DIUANA commented Aug 18, 2020

Many thanks

@behnam-zakeri
Copy link
Contributor

behnam-zakeri commented Aug 20, 2020

Thanks @DIUANA for your question and raising this topic. I try to answer some of your questions.

  1. duration_period_sum(a, b) is the sum of the duration_period between two model periods a and b, including the preceding period, i.e., a. For the example you laid out, duration_period_sum(695, 710) is the sum of the duration periods of 695 and 700 (but not 710), which are both 5. That's why the sum is 10 (=5 + 5). So, as you suggested the definition of this parameter should be modified from "number of years between two periods", to something like "sum of the duration of the periods between two periods, including the duration of the preceding period". Please suggest a more clear definition if you have in mind.
  2. In general, we should consider the way duration_period_sum is being used for calculating remaining_capacity in each vintage year. For your example, duration_period_sum(695, 710) = 10 means that any technology installed in 695 with the lifetime of longer than 10 years will be active in 710, i.e., has "remaining capacity" in 710. For example, if a technology with the lifetime of 12 years is installed in the model period 695: it is active 5 years in this period (i.e., until the end of 695), plus 5 years in the model period 700 (i.e., from the beginning of 696 until the end of 700), and 2 years in the model period 710 (i.e., from the beginning of 701 until the end of 702). So, remaining_capacity of this technology in 710 is scaled to 0.2, i.e., 20% of the capacity is active in the whole period. You can see the output GDX of your example, to see how remaining_capacity is calculated for each technology.
    image
  3. As you mentioned, remaining_years is calculated differently, and for another purpose. Considering the explanation above, we can say that remaining_years and duration_period_sum show different information and they are not directly related.
    I hope it helps to clarify this. Please don't hesitate to let us know if something is unclear.

@behnam-zakeri behnam-zakeri added the docs Documentation label Aug 21, 2020
@khaeru khaeru changed the title Duration_period and dependencies Document duration_period & related params Aug 21, 2020
@khaeru
Copy link
Member

khaeru commented Aug 21, 2020

I updated the title to reflect that the resolution here will be to expand the documentation of these parameters.

@DIUANA
Copy link
Author

DIUANA commented Aug 26, 2020

@behnam-zakeri and @khaeru many thanks for the explanation. Now it is much clearer for me. I agree with Paul that the current title is more appropriate, there is a lack of documentation regarding these parameters.

@khaeru khaeru changed the title Document duration_period & related params Document duration_period & related params May 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation
Projects
None yet
Development

No branches or pull requests

3 participants