Bugfix histTimesteps & ICEban trucks, busses #270
Merged
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.
This PR includes a bugfix to remove differences in historical timesteps (<= 2020) between scenarios.
The reason was the normalization of preferences, which was done only for scenarios, where mitigation factors were applied (mix2 upwards). Preference factors in 2015 were interpolated and thus changed.
Furthermore, I found a bug in the ICEban application. The hard-coded implementation refers to values in 2015 which are historical timesteps and not available in this part of the code.
To solve all the above-mentioned problems the steps were separated and now applied in the correct order:
-Bind historical timesteps and future scenario specific timesteps
-Interpolate
-Apply ICE ban
-Normalize
-> Output of Mix1 was compared to Mix4ICEban and showed no differences in historical timesteps.
-> Test fo NAs were included to prevent bug that occured in ICE ban application
-> Test to compare output of different scenarios and prevent changes in hist time steps will be integrated in advanced PR test routine of edgeTransport (integration of tests that require complete model runs in testthat not preferable as storing of large files like fulldata.gdx in the package would be necessary)
Before and after compScens are available here: /p/projects/edget/PRchangeLog/20240812_PR270_BugfixHistTImestepsAndICEbanBusTruck
Bug in ICEban application for trucks and busses had only minor impact