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

Fix handling of activity years and life time of technologies in the tutorials #525

Closed
LauWien opened this issue Oct 19, 2021 · 3 comments · Fixed by #815
Closed

Fix handling of activity years and life time of technologies in the tutorials #525

LauWien opened this issue Oct 19, 2021 · 3 comments · Fixed by #815
Labels
docs Documentation

Comments

@LauWien
Copy link
Contributor

LauWien commented Oct 19, 2021

Secondly, as observed in the follow-up discussions on the last capacity building workshop, when we add parameters where the index includes both vintage and activity years, then in the past we have just added activity years that stretch the entire model horizon, irrespective of the lifetime of the technology. This definitely needs to be fixed as this causes too much confusion for new users.

Originally posted by @OFR-IIASA in #502 (comment)

@LauWien LauWien changed the title Fix handeling activity years and the life time of technologies in the tutorials Fix handeling activity years and life time of technologies in the tutorials Oct 19, 2021
@LauWien LauWien self-assigned this Oct 19, 2021
@LauWien LauWien added the docs Documentation label Oct 19, 2021
@OFR-IIASA
Copy link
Contributor

@LauWien I added a small bit of code for the Indian colleagues in a tutorial. Please find the snippet below:

for tec, val in costs.items():
    for y in scenario.par('technical_lifetime',
                          filters={'node_loc': country,
                                   'technology': tec})['year_vtg'].tolist():
        year_act = scenario.years_active(node=country, tec=tec, yr_vtg=y)
        df = make_df(base_fix_cost,
                     technology=tec,
                     value=val,
                     year_vtg=y,
                     year_act=year_act)
        scenario.add_par('fix_cost', df)

@LauWien
Copy link
Contributor Author

LauWien commented Oct 20, 2021

Perfect, thank you!

@khaeru khaeru changed the title Fix handeling activity years and life time of technologies in the tutorials Fix handling of activity years and life time of technologies in the tutorials Jan 26, 2022
@awais307
Copy link

awais307 commented Feb 9, 2022

I think this issue is relevant beyond tutorials. While trying to add data frames for new technologies in the global model using make_df , the year_act and year_vtg are not mapped according to technical_lifetime

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation
Projects
None yet
3 participants