-
Notifications
You must be signed in to change notification settings - Fork 164
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
Develop-sticky merge #199
Develop-sticky merge #199
Conversation
…r/develop' into develop_sticky_merge
Just for clarification: You ticked all categories for Default configuration additions/changes which would mean that you changed default settings in all categories, but my understanding is that you did not touch any default settings. Am I right? If so, please correct your description of the pull request and untick the corresponding categories. In addition, please do not delete lines from the template which contain check boxes. Just keep the lines unchecked to make clear what does not apply for your PR. |
Thanks Jan! Issues fixed. You are right, I didn't change any of the default configurations, so those items are now unticked, and I have left the unchecked items in the "Type of change" category. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, only some minor requests from my side before it can be merged
|
||
**scripts** removed GP_final start script due to obsolescence | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add your changes to the existing unreleased section instead of introducing a second unreleased section
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
@@ -197,7 +197,7 @@ $title magpie | |||
* | |||
* | |||
* | |||
* Last modification (input data): Thu Jun 18 18:28:38 2020 | |||
* Last modification (input data): Thu Jun 25 17:37:27 2020 | |||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ideally, you should not add files to your commit with irrelevant changes such as the modification date update. In case of main.gms it should be in most cases excluded from a commit.
You can keep it in the PR this time, but please avoid adding such files next time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, I'll keep it in mind for the next one.
; | ||
|
||
parameters | ||
p38_ovcosts(t,i,kcr) Overall factor costs (mio USD05MER) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is p38_ovcosts required/used in the fixed case?
@@ -5,15 +5,19 @@ | |||
*** | MAgPIE License Exception, version 1.0 (see LICENSE file). | |||
*** | Contact: magpie@pik-potsdam.de | |||
|
|||
p38_ovcosts(t,i,kcr) = vm_cost_prod.l(i,kcr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this used for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p38_ovcost originally accounts for the overall costs coming from sticky. Since I modified the costs.R function in magpie4 to read p38_ovcosts, I used it in the postsolve of all the factor costs realizations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for reporting please use ov_cost_prod instead (and remove p38_octcosts again)...it contains the values of vm_cost_prod for all time steps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you mean for the fixed and mixed realizations of factor costs, or for all the modules and realizations where I used these pxx_overall_costs parameters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the costs are not influencing the subsequent periods, then it should not be in the gams code.
all "pure" prosprocessing can happen in R, based on the level values of the variables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okie dokie
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from what I saw, it is only used in postprocessing. Then remove this parameter from the GAMS code and make the calculations in the magpie4 library.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in a run with different region setting, the calibration runs become infeasible.
Feli and I tracked it down:
its the upper bound for the investment constraint in the presolve. We have small region in africa (ruanda, uganda, tanzania) where this constraint is too narrow, as investments are higher than the defined gdp share.
Not sure whether this is only in the calibration, or in general with the model. The constraint should be relaxed.
@@ -5,15 +5,19 @@ | |||
*** | MAgPIE License Exception, version 1.0 (see LICENSE file). | |||
*** | Contact: magpie@pik-potsdam.de | |||
|
|||
p38_ovcosts(t,i,kcr) = vm_cost_prod.l(i,kcr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from what I saw, it is only used in postprocessing. Then remove this parameter from the GAMS code and make the calculations in the magpie4 library.
I have looked into it, and the maximum value of the capital investment in Feli's runs is close to 11%. I had set up this value for 5% for the default region setting (based on previous runs). I am thinking about increasing this value to 15%. Are there any other important regional settings that I might run, to make sure this constraint is valid in any case? ***It is important to mention that this constraint is key for speed performance, so increasing it might increase run times. |
…creased to consider other region settings
Description
The following PR includes the incorporation of the new "sticky" realization for calculation of factor costs, and the way modules with investment decisions account for overall costs.
Purpose of this PR
Performance loss/gain from the current default behavior
Default run time: 0.7 hours
New PR: 1.4 hours
Comparison: 1.8 times slower.
Type of change
How Has This Been Tested?
test_runs.R
).test_runs.R
but with the changes from PR.Default configuration additions/changes:
Checklist:
CHANGELOG.md
goxygen::goxygen()
for the new/updated parts.magpie4
R library for post-processing of model output (ideally backward compatible).Special comments/warnings