Clean up core declarations - #2189
Conversation
fschreyer
left a comment
There was a problem hiding this comment.
Great, thanks! Could you do an NPi and a PkBudg650 run before and after your changes and check in the compare scenario PDF whether there are differences? I had differences in this PR (#2142) which presumably related to the order in which variables / parameters are declared in GAMS. I hope this is not the case this time, but would be worth to check.
|
Hi @fbenke-pik @LaviniaBaumstark I just saw this now, I have to admit I am a bit surprised. Concretely, I wanted to ask: is there a general change of rules/coding etiquette for I had always understood the rule to be that we only declare parameters and variables inside modules that are only used in this model and thus have the module number in the name, while all interface parameters should be declared in code. I have to admit I found this rule quite clear and easy to apply, and it was easy to check the declaration because you know from the name either in which module to check or to go to core (if it has I am sure I will be able to adapt :-) , I am just wondering about the "why" of this refactoring, and if there is a clear rule which declarations go into core, and which into the modules? |
|
Hi, |
Hi Robert, a few thoughts on why I think declaring all interface variables in the core is really not the way forward and we should stop this practice:
We can also follow-up on the discussion here: https://github.com/remindmodel/development_issues/issues/618 |
|
@LaviniaBaumstark @fschreyer thanks for sharing your thoughts! |
The requested comparison can be found here |
|
I had a look at the comparison PDF and it mostly looks fine. The only point where there are slight differences is transport energy service demand in the US. It appears that with the refactoring of the REMIND code EDGE-T behaves slightly different in this region. I also observed that in my refactoring #2142. It might be that EDGE-T is not stable there against small changes of input GDX or order of declarations? I think in this case this should not stall merging this. Could somebody of the transport team have a look and say whether that's an issue. @robertpietzcker |
|
@fschreyer I don't think this is a result of the refactoring (sometimes the refactored runs are much higher, sometimes the non-refactored runs are much higher), but I guess it is rather a fundamental problem of non-convergence between REMIND and EDGE-T in the US: in some of the runs, liquids prices spike high, with low aviation as a result, while in the others the opposite occurs. I would guess this flip-flops between iterations.
I have no idea where it comes from, and I hope this was just a number of unlucky runs - the latest validation runs don't show it. The transport team has on its radar to implement a convergence test between REMIND and EDGE-T, but it will be some time before this happens |
|
Thanks for your input, Robert and Felix. I read your comments as an ok to merge. |


Purpose of this PR
Type of change
Indicate the items relevant for your PR by replacing ◻️ with ☑️.
Do not delete any lines. This makes it easier to understand which areas are affected by your changes and which are not.
Parts concerned
Impact
Checklist
Do not delete any line. Leave unfinished elements unchecked so others know how far along you are.
In the end all checkboxes must be ticked before you can merge.
make test) after my final commit and all tests pass (FAIL 0)remind2if and where it was neededforbiddenColumnNamesin readCheckScenarioConfig.R in case the PR leads to deprecated switchesCHANGELOG.mdcorrectly (added, changed, fixed, removed, input data/calibration)Further information (optional)