Skip to content
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

Bugfix SCP "mixed" scenario + "kfo_rd" set added to config file #270

Merged
merged 15 commits into from
Apr 30, 2021

Conversation

flohump
Copy link
Contributor

@flohump flohump commented Apr 25, 2021

Please fill following information
(Add additional info if you think its important and not covered by this Pull Request (PR)):

Purpose of this PR

  • The "mixed" scenario for single-cell protein production (c20_scp_type) was not working as expected. The corresponding code in 20_processing has been updated. Review needed from @bodirsky
  • The set "kfo_rd" (livst_rum, livst_milk), which is used in the food substitution scenarios c15_rumdairy_scp_scen and c15_rumdairyscen, has been added to the default.cfg file. This allows for sensitivity scenarios (e.g. only livst_milk or only livst_rum). Review needed from @weindl

Performance loss/gain from current default behavior

  • Add an image using plot from shinyresults::appResults() and annotate accordingly.

Unknown-44
Both scenarios reflecting a default model run (based on default.cfg)
SCP34 = current develop
SCP35 = f_SCP2
The run time is almost the same (slightly faster).

  • %performance loss/gain = 100*Runtime from PR/Runtime from current default from develop branch.

Type of change

  • Bug fix (Change which fixes an issue).
  • New feature (Change which adds functionality).
  • Minor change (Change which does not modify core model code i.e., in /modules).
  • Major change (fix or feature that would change current model behavior).

How Has This Been Tested?

  • Runs using starting script paper_scp.R

Additions or Changes to default configuration (default.cfg):

Additions are the introduction of new model components in default config

Changes are deletion or updates to the existing model components in default config

  • Realizations:
  • Scenario switches: cfg$gms$c20_scp_type <- "sugar" (change), cfg$gms$kfo_rd <- "livst_rum,livst_milk" (addition)
  • Scalars/Constants:
  • Model interfaces:
  • Others:

Checklist:

  • Self-review of my own code.
  • Compilation check (model starts without compilation errors).
  • Added changes to CHANGELOG.md
  • No hard coded numbers and cluster/country/region names.
  • The code doesn't contain declared but unused parameters or variables.
  • In-code comments added including documentation comments.
  • Compiled and checked resulting documentation with goxygen::goxygen() for the new/updated parts.
  • Changes to magpie4 R library for post processing of model output (ideally backward compatible).

Special comments/warnings

  • Notes

@flohump flohump added bug Something isn't working enhancement New feature or request Low risk Low risk Minor Smaller modifications labels Apr 25, 2021
@@ -72,6 +72,9 @@ sets
VIR,VNM,VUT,WLF,WSM,YEM,ZAF,ZMB,ZWE /
;

$onMultiR
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you need $onMultiR here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the set kfo_rd needs to be defined in sets.gms (some declarations depend on kfo_rd) and then overwritten in input.gms.

@flohump flohump requested a review from tscheypidi April 27, 2021 15:27
@flohump flohump self-assigned this Apr 28, 2021
@flohump
Copy link
Contributor Author

flohump commented Apr 28, 2021

@bodirsky @weindl @tscheypidi I need your feedback on this PR.

Copy link
Member

@tscheypidi tscheypidi left a 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, but could you please pull the recent version of develop into your branch as there was recently another PR accepted (I don't see these changes in your diff view at the moment for some reason)

@flohump
Copy link
Contributor Author

flohump commented Apr 28, 2021

looks good to me, but could you please pull the recent version of develop into your branch as there was recently another PR accepted (I don't see these changes in your diff view at the moment for some reason)

Done!

config/default.cfg Outdated Show resolved Hide resolved
Copy link
Member

@bodirsky bodirsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a few tiny changes (see comments above)

config/default.cfg Outdated Show resolved Hide resolved
config/default.cfg Show resolved Hide resolved
@flohump flohump requested a review from bodirsky April 29, 2021 14:34
@bodirsky bodirsky merged commit fa997ed into magpiemodel:develop Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request Low risk Low risk Minor Smaller modifications
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants