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.
Description
I have an application where I want to use the
DiscountedCostByTechnology
result variable. However,otoole
does this calculation internally within theTotalDiscountedCost
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
, andDiscountedOperationalCost
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 theTotalDiscountedCost
result calculation quite a bit.Tests for each of
TotalDiscountedCost
,DiscountedCapitalInvestment
,DiscountedCostByTechnology
, andDiscountedOperationalCost
have been added.Updated the setup config file to write out
DiscountedCapitalInvestment
,DiscountedCostByTechnology
, andDiscountedOperationalCost
by default.Additionally, I have
1.1.3
produced identical resultsIMPORTANT 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