-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix to cm_flex_tax bug #1150
fix to cm_flex_tax bug #1150
Conversation
Why did you go for the additional parameter? One more thing in the .gdx file … |
I could go either way. I will adjust the PR to whatever solution the reviewers vote for, so if @LaviniaBaumstark and @robertpietzcker have a preference for the parameter way, I would leave as is. If they are ok with the dollar conditional way, I will make the necessary changes to adapt this PR to that solution instead. |
Yeah, but … ☝️ there are dollar-conditions already, so not much is lost I would argue. |
Thanks for the fix, Renato! It seems I am not yet up to full speed - yesterday I somehow thought using a $ conditional in the multiplication in q32_flexAdj to take out the negative values would somehow cause a problem as it would leave vm_flexAdj free in that case (instead of fixing it to 0), but now I don't understand anymore why I thought so. I am sorry for the additional hassle! Please go with the version you prefer, Renato. |
Because you confused dollar conditions in assignments with those in equations.
will not assign anything to
will assign zero. But in equations, left hand side and right hand side are arbitrary. Everything behaves as does |
My original post in the IEA channel had a mistake as the dollar conditional was applied to the equation declaration and not to the right hand side of it. It was probably that version that you look at. I will set a run with the dollar conditional alternative and compare the solutions. If everything works the same way I will update this PR and use the dollar alternative instead. PS: didn't see that Michaja wrote a reply for that just before me :) |
I also prefer the dollar condition. In my first test this led to unbounded variables but probably I did a mistake. So, let's wait for your tests and if it is working, go with the dollar condition |
I changed the solution to use the dollar formulation. |
At least the test runs I tried were successful. I still got the issue I described here #1137 in one of the runs although. I am merging this PR as is, but we still need to verify if that is enough to solve the issue with the marginals use in equations, and if this issue was causing the REF and MEA consumption losses described by Marian in the validation results. |
Purpose of this PR
Aims to fix the problem discussed here: #1115
The proposed solution follows the addition of a non negative
pm_SEprice
parameter and its use in the q32_flexAdj equation.Test runs with and without the change can be found here (still running):
/p/projects/remind/users/renatoro/Debug_trunk/2023_01_11_cm_flex_tax/output/SSP2EU-AMT-Base_2022-12-24_00.08.15
/p/projects/remind/users/renatoro/Debug_trunk/2023_01_11_cm_flex_tax/output/SSP2EU-AMT-NDC_no_change_2023-01-11_10.33.56
Type of change
Checklist:
Further information:
pm_SEprice
, currently repeated in multiple places in the model.core/preloop
, and another in thecore/postsolve
. Repeating the assignment at every power sector module and at every presolve is quite unnecessary.