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

minimum wage scneario #454

Merged
merged 29 commits into from
Oct 4, 2022
Merged

Conversation

deleip
Copy link
Contributor

@deleip deleip commented Sep 21, 2022

🐦 Purpose of this PR 🐦

This PR introduces the option to include a global minimum wage set by s36_minimum_wage, which can either lead to total labor costs being scaled accordingly (s36_scale_labor_costs <- 1), or it is assumed that productivity increases such that total labor costs stay the same (s36_scale_labor_costs <- 0).
The 38_factor_costs realization "mixed_reg_feb17" was removed as it is not used anymore. In the realization sticky_labor the calibration of the share parameter was fixed, and the option to fix the capital need (i.e. not allowing for substitution between labor and capital) until a given year s38_fix_capital_need was introduced.

🔧 Checklist for PR creator 🔧

  • Low risk : Simple bugfixes (missing files, updated documentation, typos) or Start/output scripts
  • Medium risk : New realization / Changes to existing realization / Other changes which don't modify default.cfg
  • High risk : New input files (if cfg$input is changed in default.cfg) / Modification to core model (eg. changes in equations, calculations, introduction of new sets etc.) / Other changes in default.cfg
  • Providing additional information based on PR label
  • Low risk : No new model run needed.
  • Medium risk : Default run based on the current version of the fork from which PR is made
  • High risk
    • Default run from the current develop branch
    • Default run based on the current version of the fork from which PR is made
  • 📉 Performance loss/gain from current default behavior 📈

    • Current develop branch default : 22 mins
    • This PR's default : 22 mins
  • Added changes to CHANGELOG.md

  • Compilation check (model starts without compilation errors - use gams main.gms action=c in model folder for testing).

  • No hard coded numbers and cluster/country/region names.

  • The new code doesn't contain declared but unused parameters or variables.

  • Where relevant, In-code comments added including documentation comments.

  • Made sure that documentation created with goxygen is okay (use goxygen::goxygen() for testing).

  • Changes to magpie4 R library for post processing of model output (ideally backward compatible).

  • Self-review of my own code.

  • For high risk runs: validation of major model indicators - Land-use, emissions, food prices, Tau. %Delete this line in case it is not a high risk run%

  • old default vs. new default
    default_cropland
    deafult_tau
    default_foodExpenditure

  • results of wage scenario (blue: no minimum wage, red: minimum wage without productivity gain and no labor/capital substitution, green: minimum wage without productivity gain but with labor/capital substitution, purple: minimum wage with higher labor productivity fully compensation higher labor costs, orange: minimum wage which leads to some productivity gains but not fully compensating the higher costs)
    wageScenario_laborCostShare
    wageScenario_agEmpl
    wageScenario_cropProduction
    wageScenario_foodExpenditure

  • change in default sticky_labor behavior (due to updated calibration of the share parameter)
    stickyLaborUpdate_laborCostShare
    stickyLaborUpdate_cropland
    stickyLaborUpdate_cropProduction

⚠️ Additional notes or warnings ⚠️

NA

🚨 Checklist for RSE reviewer 🚨

  • PR is labeled correctly.
  • CHANGELOG is updated correctly
  • No hard coded numbers and cluster/country/region names.
  • No unnecessary increase in module interfaces
  • All required updates in interfaces (if any) have been properly adressed in the module contracts
  • In-code comments and documentation comments are satisfactory.
  • model behavior/performance is satisfactory.
  • Requested changes (if any) were applied correctly

🚨 Checklist for MAgPIE reviewer 🚨

  • PR is labeled correctly.
  • CHANGELOG is updated correctly
  • No hard coded numbers and cluster/country/region names.
  • Changes to the model are scientifically sound
  • In-code comments and documentation comments are satisfactory.
  • model behavior/performance is satisfactory.
  • Requested changes (if any) were applied correctly

@deleip deleip added High risk Higher risk bugfix labels Sep 21, 2022
@deleip deleip added the enhancement New feature or request label Sep 22, 2022
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.

All in all reads already well and nicely docuemnted.
I suggest to replace s_wage by the actual labor_costs_per_unit that you have in your other module. Is that possible?

modules/38_factor_costs/per_ton_fao_may22/declarations.gms Outdated Show resolved Hide resolved
modules/38_factor_costs/per_ton_fao_may22/declarations.gms Outdated Show resolved Hide resolved
modules/38_factor_costs/sticky_feb18/equations.gms Outdated Show resolved Hide resolved
modules/38_factor_costs/sticky_labor/equations.gms Outdated Show resolved Hide resolved
modules/38_factor_costs/sticky_labor/presolve.gms Outdated Show resolved Hide resolved
modules/70_livestock/fbask_jan16/declarations.gms Outdated Show resolved Hide resolved
Copy link
Contributor

@flohump flohump left a comment

Choose a reason for hiding this comment

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

Looks fine in general!
I have some minor requests for changes.

config/default.cfg Outdated Show resolved Hide resolved
p36_calibration_hourly_costs(iso) Additive calibration term for hourly labor costs (USDMER05 per hour)
p36_cost_share(t,i) Capital share of factor costs (1)
p36_share_calibration(i) Additive calibration term for capital shares (1)
p36_nonmagpie_labor_costs(t,i) Labor costs from subsidies and VoP not covered by MAgPIE (mio. USDMER05)
Copy link
Contributor

Choose a reason for hiding this comment

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

What is VoP? Can you add an explanation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

VoP means Value of Production (the part not covered by MAgPIE comes from wool, beeswax, honey, silk-worms)

modules/36_employment/exo_may22/equations.gms Outdated Show resolved Hide resolved
modules/36_employment/exo_may22/input.gms Outdated Show resolved Hide resolved
p36_hourly_costs_increase(iso) Difference between minimum hourly labor costs and actual hourly labor costs in 2050 (USDMER05 per hour)
p36_hourly_costs_iso(t,iso) Hourly labor costs in agriculture on iso level after including minimum wage (USDMER05 per hour)
pm_hourly_costs_baseline(t,i) Hourly labor costs in agriculture on regional level (USDMER05 per hour)
pm_hourly_costs(t,i) Hourly labor costs in agriculture on regional level after including minimum wage (USDMER05 per hour)
Copy link
Contributor

Choose a reason for hiding this comment

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

These two new interfaces are very similar and also have the same unit.
Therefore, you could merge these into one interface with a set for distinction between baseline and minimum wage scenario.
@tscheypidi What do you suggest?

Copy link
Member

Choose a reason for hiding this comment

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

I agree, that should be merged into one parameter

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done (also for p36_hourly_costs_iso)

CHANGELOG.md Outdated Show resolved Hide resolved
@@ -859,6 +859,16 @@ cfg$gms$s35_hvarea <- 0 # def = 0
# * optimization
cfg$gms$employment <- "exo_may22" # default = "exo_may22"

# * global minimum wage that needs to reached in all countries by 2050
cfg$gms$s36_minimum_wage <- 0 # default = 0 (no minimum wage)
Copy link
Member

Choose a reason for hiding this comment

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

is that a binary 1/0 switch or does it have a unit?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's a USD/h value, I added the unit in the description

p36_hourly_costs_increase(iso) Difference between minimum hourly labor costs and actual hourly labor costs in 2050 (USDMER05 per hour)
p36_hourly_costs_iso(t,iso) Hourly labor costs in agriculture on iso level after including minimum wage (USDMER05 per hour)
pm_hourly_costs_baseline(t,i) Hourly labor costs in agriculture on regional level (USDMER05 per hour)
pm_hourly_costs(t,i) Hourly labor costs in agriculture on regional level after including minimum wage (USDMER05 per hour)
Copy link
Member

Choose a reason for hiding this comment

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

I agree, that should be merged into one parameter

p36_hourly_costs_iso(t,iso) Hourly labor costs in agriculture on iso level after including minimum wage (USDMER05 per hour)
pm_hourly_costs_baseline(t,i) Hourly labor costs in agriculture on regional level (USDMER05 per hour)
pm_hourly_costs(t,i) Hourly labor costs in agriculture on regional level after including minimum wage (USDMER05 per hour)
pm_labor_cost_scaling(t,i) Multiplicative factor describing increase in hourly labor costs to match minimum wage (1)
Copy link
Member

Choose a reason for hiding this comment

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

why is that interface needed? I would have thought that if you provide the hourly costs to the modules they should be able to compute the respective labor costs? Isn't it possible that the modules compute the required working hours and then base their calculations on pm_hourly_costs (diving the given labor costs by hourly costs should give the hours one should start with)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the switch s36_scale_productivity_with_wage can now take any positive value which defines how strongly labor productivity should be affected by higher wages (instead of being a binary switch). The new interface is pm_productivity_gain_from_wages which replaces the interface pm_labor_cost_scaling

*' average hours worked per employed person per year. Total labor costs include
*' labor costs from crop production (see [38_factor_costs]) and livestock production
*' (see [70_livestock]), and some labor costs for crop and livestock production
*' which are not covered by MAgPIE.
Copy link
Member

Choose a reason for hiding this comment

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

Github is complaining here and in some other spots about missing newlines. Perhaps you can check why this is happening (might be coming from the text editor you use)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't see any complains in the updated files, either I'm not looking for the right thing, or I already fixed them unknowingly with the other changes...

modules/36_employment/exo_may22/input.gms Show resolved Hide resolved
modules/38_factor_costs/sticky_labor/preloop.gms Outdated Show resolved Hide resolved
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

@deleip deleip dismissed bodirsky’s stale review October 4, 2022 15:31

all requested changes have been addressed

@deleip deleip merged commit 1271a91 into magpiemodel:develop Oct 4, 2022
@deleip deleip deleted the f_laborProductivity branch November 2, 2023 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix enhancement New feature or request High risk Higher risk
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants