refactor and remove capacity term from npv objective#997
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #997 +/- ##
==========================================
+ Coverage 84.26% 84.28% +0.01%
==========================================
Files 52 52
Lines 5974 5974
Branches 5974 5974
==========================================
+ Hits 5034 5035 +1
+ Misses 695 694 -1
Partials 245 245 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
dalonsoa
left a comment
There was a problem hiding this comment.
The solution seems OK to me, but it can be implemented with much less code duplication, and less changes, I would say,
|
Actually, the simplest solution I think would be to add |
|
I think these are all valid options. Just to confuse things even more I'll give another option: Going back to how it was before, you could modify I'd probably lean towards this so that |
|
I agree with @tsmbland 's solution. If a non-zero capacity coefficient is not really needed in |
|
Thanks, suggestions make sense. Just wanted to raise one other thing - I've temporarily added Also I'll add something to the docs about zeroing the term in npv mode |
I'm guilty of doing But in this case, if you went for my suggestion above, I don't think you'd need to do this, right? ( |
ah yes that's a good point thanks. I forgot it had one less variable |
|
Thanks for the comments, I agree simpler this way. Although I'm wondering if we should remove so would replace with On that same thread I would also consider making calculate_coefficients_for_lcox/npv two different constructors for Appreciate this might be outside of the scope of the PR though! |
I like this. I'd maybe rename it to |
|
I like all of these suggestions. They surely make the code clerer.
And this one I would leave for a separate PR, yes. |
change function to consturctor method
Description
A slight refactoring so that that the lcox and npv optimisations can have different variables, then removes the annualised fixed cost from the npv maximisation
Fixes #996
see #998 for a results comparison with simple model
Type of change
Key checklist
$ cargo test$ cargo docFurther checks