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

Add discounted result calcualtions #238

Merged
merged 11 commits into from
Oct 27, 2024
Merged

Add discounted result calcualtions #238

merged 11 commits into from
Oct 27, 2024

Conversation

trevorb1
Copy link
Member

Description

I have an application where I want to use the DiscountedCostByTechnology result variable. However, otoole does this calculation internally within the TotalDiscountedCost calculation, and does not print out this data. This PR addresses this.

Specifically, in this PR I have:

  • Broken out the calculations for DiscountedCapitalInvestment, DiscountedCostByTechnology, and DiscountedOperationalCost into separate functions. When results are calculated, dataframes for each of these are generated, which can be written out in csvs or xlsx.

  • Functions that rely on this data (such as TotalDiscountedCost), now use these intermediate dataframes to perform the calculation. This simplifies the TotalDiscountedCost result calculation quite a bit.

  • Tests for each of TotalDiscountedCost, DiscountedCapitalInvestment, DiscountedCostByTechnology, and DiscountedOperationalCost have been added.

  • Updated the setup config file to write out DiscountedCapitalInvestment, DiscountedCostByTechnology, and DiscountedOperationalCost by default.

Additionally, I have

  • Checked that running Simplicity on this version and on version 1.1.3 produced identical results

IMPORTANT NOTE ON THE TOTAL DISCOUNTED COST
I believe otoole is currently following the old (incorrect) objective function definition found in OSeMOSYS_fast - it does not account for costs of storage (see this issue ticket for description). However, this has since been corrected with OSeMOSYS PR 81 and 91. This PR does NOT correct this issue, as it only updates implementation details and results stay the same. A new ticket (#237) has been created to address the incorrect calcualtion.

Issue Ticket Number

na

Documentation

na

@trevorb1 trevorb1 merged commit c2f104c into develop Oct 27, 2024
18 checks passed
@willu47 willu47 deleted the add-result-vars branch November 4, 2024 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants