Change objective normalization in weighted_sum decision method#449
Merged
Change objective normalization in weighted_sum decision method#449
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #449 +/- ##
===========================================
- Coverage 71.28% 71.27% -0.01%
===========================================
Files 44 44
Lines 5885 5884 -1
Branches 1154 1154
===========================================
- Hits 4195 4194 -1
Misses 1369 1369
Partials 321 321 ☔ View full report in Codecov by Sentry. |
dalonsoa
approved these changes
Aug 13, 2024
Collaborator
dalonsoa
left a comment
There was a problem hiding this comment.
This looks really good! A very small change, a very big impact. I think the whole explanation of why this normalisation makes sense is solid, so happy with the changes.
Collaborator
Author
Great, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This changes the normalization in the weighted-sum decision method. Instead of normalizing objectives to [0,1] by subtracting the minimum and dividing by the maximum, we're now just dividing by the (absolute) maximum. See this comment for why I think this is a good idea.
There are probably other ways that this could be done, so happy to have a discussion about this.
Demonstrated below for the "LCOE" and "consumption" objectives
Single objectives:


Multiple objectives with weighted sum (before):



Multiple objectives with weighted sum (new):



With the new normalization method the behaviour looks much more in line with expectations (intermediate behaviour with 0.5/0.5 and equal to the single objective scenarios with 1/0 and 0/1)
I've also changed the tutorial models to use the "fuel_consumption_cost" objective instead of the EAC objective. I would have done this as a separate PR, but had to do it here as the original model didn't work with the changes I've made to the weighted sum method (it would jump between two solutions in the MCA and never converge). I think (hope) this is unrelated to the changes I've made to the weighted sum and just something that can happen sometimes. In any case, I think the "fuel_consumption_cost" is better for the tutorial as it has more contrast with the LCOE objective. See updated version here
Fixes #317
Fixes #337
Type of change
Please add a line in the relevant section of
CHANGELOG.md to
document the change (include PR #) - note reverse order of PR #s.
Key checklist
$ python -m pytest$ python -m sphinx -b html docs docs/buildFurther checks