Skip to content

Conversation

@ariane-millot
Copy link

Corrects the salvage value formulation.
Previously, the model incorrectly applied:

  • The simple linear depreciation formula when discount rate > 0.
  • The annuity-based formula when discount rate = 0.

Corrects the salvage value formulation.
Previously, the model incorrectly applied:
- The simple linear depreciation formula when discount rate > 0.
- The annuity-based formula when discount rate = 0.
@robertodawid
Copy link

robertodawid commented Nov 26, 2025

Thanks @ariane-millot for pointing this out. Also extending on your proposed change :

In the current version of the model, these conditions are swapped, which would:

  • Make the annuity formula apply at DiscountRate = 0 → leads to 0/0 (mathematically invalid).
  • Use the linear formula when DiscountRate > 0 → ignores discounting, conceptually wrong.

Test on the CLEWs Demo\res\CO2TAX from the UI

model (UI) Eq OF NewCapacity Value
1 SV1,SV2 (=0, >0) currently 75008.45454 (RE1, PWRSOL, 2026) 0.88
2 SV1,SV2 (>0, =0) osemosys repo 69679.03367 (RE1, PWRSOL, 2026) 2.17

also tagging: @VedranKapor , @FraGard , @ShravanKumar23 .

As a suggestion, every time the model file is updated, the new version should be tested against a standard OSeMOSYS model/data, for example, UTOPIA, check: https://github.com/OSeMOSYS/OSeMOSYS_GNU_MathProg/blob/master/tests/test_gnu_mathprog.py

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