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

Develop #245

Merged
merged 2 commits into from
Jan 29, 2021
Merged

Develop #245

merged 2 commits into from
Jan 29, 2021

Conversation

bodirsky
Copy link
Member

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

Purpose of this PR

  • Purpose
    Handle strange emissions in 2025. Reason are model prices which are very off. They caused an increase in ruminant demand and high deforestation in SSA.
    Fish prices were increased through production costs: there was actually a bug, because production costs were not corrected for DM.

Performance loss/gain from current default behavior

  • just a single parameter changed

image
slight improvement for engogenous demand
large speed-up of the model due to exo-demand, reducing iterations to 1

Type of change

  • [X ] Bug fix (Change which fixes an issue).
  • New feature (Change which adds functionality).
  • [X ] 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?

  • [X ] Runs using starting script which tests current defaults (using test_runs.R).
  • Runs using starting script which successfully runs the same scenarios as in test_runs.R but with the changes from PR.
  • (If applicable) Runs using different scenarios/mappings which are not the default (12 regions/c200 clusters).

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

Additions are the introduction of new model components in default config

  • exogenous demand by default

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

  • Realizations:
  • Scenario switches:
  • [X ] Scalars/Constants:cfg$gms$s15_elastic_demand <- 0 # def =0
  • Model interfaces:
  • Others:

Checklist:

  • [ X] Self-review of my own code.
  • [ X] Compilation check (model starts without compilation errors).
  • [ X] Added changes to CHANGELOG.md
  • [ X] No hard coded numbers and cluster/country/region names.
  • [ X] The code doesn't contain declared but unused parameters or variables.
  • [ X] 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

Currently shadow prices are not good enough, such that endogenous demand does not improve the results quality.
Furthermore, fish production cost issue has to be tackled first.
@bodirsky
Copy link
Member Author

comparison of emissions
image

blue old
green new but with endogenous demand
red new default

@tscheypidi tscheypidi merged commit 7252323 into magpiemodel:develop Jan 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants