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
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
4afaaf1
first test
Aug 4, 2022
aa7e07b
added parameter to not_used
Aug 4, 2022
098e187
update
Aug 4, 2022
9c16604
update
Aug 4, 2022
d23d5be
implemented minimum wage scneario
Aug 23, 2022
46e6305
Merge branch 'develop' of github.com:magpiemodel/magpie into f_laborP…
Aug 23, 2022
f5745e6
updated comments
Aug 23, 2022
4681dec
changed variable naming
Aug 23, 2022
e0106a3
bugfixes
Aug 23, 2022
9b435ff
bugfix
Aug 23, 2022
d3a54d4
Merge branch 'develop' of github.com:magpiemodel/magpie into f_laborP…
Sep 8, 2022
bd33ed2
updated documentation of employment module
Sep 8, 2022
f36b181
Merge branch 'develop' of github.com:magpiemodel/magpie into f_laborP…
Sep 20, 2022
2767681
fixed calibration of share parameter, updated changelog
Sep 20, 2022
a1761cb
updated documentation
Sep 21, 2022
33aa3c9
bugfix
Sep 21, 2022
33e5d02
Merge branch 'develop' of github.com:magpiemodel/magpie into f_laborP…
Sep 21, 2022
108dd90
Merge branch 'develop' of github.com:magpiemodel/magpie into f_labor…
Sep 22, 2022
ef2cf9b
Merge branch 'develop' of github.com:magpiemodel/magpie into f_laborP…
Sep 26, 2022
a0b8140
updated descriptions
Sep 27, 2022
5f86f13
replaced s38_wage by wages from eomployment module
Sep 27, 2022
77652b7
updated documentation
Sep 28, 2022
9809ff6
fixed noScaling wage scenario for sticky_labor
Sep 28, 2022
dbec0d5
updated documentation
Sep 28, 2022
fab45cf
updated switch and explanation
Sep 28, 2022
629d225
Merge branch 'develop' of github.com:magpiemodel/magpie into f_laborP…
Sep 29, 2022
51b0ad9
addressed comments
Sep 30, 2022
b02c47d
implemented productivity gain from wages for continuous values instea…
Oct 1, 2022
429f9b9
updated documentation
Oct 4, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

### changed
- **config** new switches `s36_minimum_wage`, `s36_scale_labor_costs`, and `s38_fix_capital_need`
- **38_factor_costs** and **70_livestock** included labor cost scaling in case of minimum wage scenario
deleip marked this conversation as resolved.
Show resolved Hide resolved
- **36_employment** included calculations for of minimum wage scenario
- **config** updated config to new module setup of MACCs
- **51_nitrogen** moved maccs into emission modules. change of interface from vm_btm_reg to vm_emissions_reg
- **58_peatland** moved maccs into emission modules. change of interface from vm_btm_reg to vm_emissions_reg
Expand Down Expand Up @@ -43,13 +46,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **57_maccs** added new Marginal Abatement Cost Curve (MACCs) data set from PBL (PBL2022)

### removed
- **38_factor_costs** removed `mixed_reg_feb17` realization
- **50_nr_soil_budget** old inconsistent module realizations
- **53_methane** old inconsistent module realizations
- **56_ghg_policy** old inconsistent module realizations
- **57_maccs** old inconsistent module realizations
- **15_food** removed read-in of non-needed input file "f15_calib_factor_FAOfsupply_iso"

### fixed
- **38_factor_costs** fixed calibration of share parameter in `sticky_labor` realization
- **59_som** corrected the som pool due to the carbon transfer from other and primary forest to secondary forest before optimization (presolve)
- **43_water_availability** added missing years after 2100 in "f43_wat_avail" to avoid infeasibilities in coupled runs with less_ts timesteps
- **scripts** fixed some bugs related to background execution of start/output scripts
Expand Down
5 changes: 5 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ authors:
affiliation: "Potsdam Institute for Climate Impact Research"
email: crawford@pik-potsdam.de

- family-names: Leip
given-names: Debbora
affiliation: "Potsdam Institute for Climate Impact Research"
email: leip@pik-potsdam.de

- family-names: Klein
given-names: David
affiliation: "Potsdam Institute for Climate Impact Research"
Expand Down
293 changes: 153 additions & 140 deletions config/default.cfg

Large diffs are not rendered by default.

18 changes: 11 additions & 7 deletions modules/36_employment/exo_may22/declarations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@ positive variables
;

parameters
p36_hourly_costs_iso(t,iso) Hourly labor costs in agriculture on iso level (USDMER05 per hour)
p36_hourly_costs(t,i) Hourly labor costs in agriculture on regional level (USDMER05 per hour)
p36_total_hours_worked(iso) Total hours worked by all employed people (mio. hours per year)
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)
p36_hourly_costs_iso_baseline(t,iso) Hourly labor costs in agriculture on iso level (USDMER05 per hour)
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)
p36_hourly_costs_baseline(t,i) Hourly labor costs in agriculture on regional level (USDMER05 per hour)
p36_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

p36_total_hours_worked(iso) Total hours worked by all employed people (mio. hours per year)
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)

;

*#################### R SECTION START (OUTPUT DECLARATIONS) ####################
Expand Down
12 changes: 6 additions & 6 deletions modules/36_employment/exo_may22/equations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@

*' @equations

*' Employment is calculated as total labor costs devided by hourly labor costs and
deleip marked this conversation as resolved.
Show resolved Hide resolved
*' 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.

* excluding labor costs for crop residues (as this is not include in the
* data on agricultural employment by the International Labour Organization)
* and fish (as we cannot calibrate labor costs for fish to employment data)

q36_employment(i2) .. v36_employment(i2)
=e= (vm_cost_prod_crop(i2,"labor") + vm_cost_prod_livst(i2,"labor") + sum(ct,p36_nonmagpie_labor_costs(ct,i2))) *
(1 / sum(ct,f36_weekly_hours(ct,i2)*s36_weeks_in_year*p36_hourly_costs(ct,i2)));

*' Employment is calculated as total labor costs devided by hourly labor costs and
*' 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...

4 changes: 4 additions & 0 deletions modules/36_employment/exo_may22/input.gms
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

scalars
s36_weeks_in_year number of weeks in a year / 52.1429 /
s36_minimum_wage global minimum wage / 3 /
s36_scale_labor_costs whether total labor costs should be scaled according to wage increase / 0 /
;
deleip marked this conversation as resolved.
Show resolved Hide resolved

table f36_weekly_hours(t_all,i) Historical values of average weekly hours worked per person in agriculture (h per week)
Expand Down Expand Up @@ -66,3 +68,5 @@ $ondelim
$include "./modules/36_employment/exo_may22/input/f36_historical_share.csv"
$offdelim
;


54 changes: 52 additions & 2 deletions modules/36_employment/exo_may22/preloop.gms
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,55 @@

* get calibration factors and aggregation weight
p36_calibration_hourly_costs(iso) = sum(t_past$(ord(t_past) eq card(t_past)), f36_hist_hourly_costs(t_past,iso)-(im_gdp_pc_mer_iso(t_past,iso)
*f36_regr_hourly_costs("slope")+f36_regr_hourly_costs("intercept")));
p36_total_hours_worked(iso) = sum(t_past$(ord(t_past) eq card(t_past)), f36_historic_ag_empl(t_past,iso)*f36_weekly_hours_iso(t_past,iso)*s36_weeks_in_year);
*f36_regr_hourly_costs("slope")+f36_regr_hourly_costs("intercept")));
p36_total_hours_worked(iso) = sum(t_past$(ord(t_past) eq card(t_past)), f36_historic_ag_empl(t_past,iso)*f36_weekly_hours_iso(t_past,iso)*s36_weeks_in_year);

*' @code

*' Hourly labor costs are projected into the future by using a linear regression with
*' GDPpcMER, which is calibrated such that historic values of agricultural employment
*' are met. A threshold is used in the regression to avoid too low or negative hourly
*' labor costs.
p36_hourly_costs_iso_baseline(t,iso) = max((im_gdp_pc_mer_iso(t,iso)*f36_regr_hourly_costs("slope") + f36_regr_hourly_costs("intercept") + p36_calibration_hourly_costs(iso)), f36_regr_hourly_costs("threshold"));

*' @stop

p36_hourly_costs_iso_baseline(t,iso)$(sum(sameas(t_past,t),1) = 1) = f36_hist_hourly_costs(t,iso);


* necessary increase in hourly labor costs in target year (2050) to match minimum wage
p36_hourly_costs_increase(iso) = s36_minimum_wage-p36_hourly_costs_iso_baseline("y2050",iso);

p36_hourly_costs_iso(t,iso) = p36_hourly_costs_iso_baseline(t,iso);

*' @code
*' In case of a scenario with an external global minimum wage we add a linear term to the baseline
*' hourly labor costs, starting from 0 zero in 2020 and increasing such that resulting hourly labor costs will match
*' the minimum wage in 2050. After 2050 the additional term is decreased again, reaching 0 in 2100 (where baseline
*' hourly labor costs and new hourly labor costs will match again).
*' In case this means that hourly labor costs would decrease again below the minimum wage after 2050, we keep them
*' at minimum wage.
*' If baseline hourly labor costs are already high enough to meet the minimum wage in 2050, they are not changed.
*' @stop

p36_hourly_costs_iso(t,iso)$((m_year(t) gt 2020) and (m_year(t) le 2050)) = p36_hourly_costs_iso_baseline(t,iso) + max(0, ((m_year(t)-2020)/(2050-2020))*p36_hourly_costs_increase(iso));

p36_hourly_costs_iso(t,iso)$((m_year(t) gt 2050) and (m_year(t) le 2100)) = max(s36_minimum_wage, p36_hourly_costs_iso_baseline(t,iso) + max(0, p36_hourly_costs_increase(iso)-((m_year(t)-2050)/(2100-2050))*p36_hourly_costs_increase(iso)));

* Hourly labor costs are then aggregated to regional level using the total hours worked in the last
* year of `t_past` as weight.
p36_hourly_costs_baseline(t,i) = sum(i_to_iso(i,iso), p36_hourly_costs_iso_baseline(t,iso)*p36_total_hours_worked(iso)) * (1/sum(i_to_iso(i,iso),p36_total_hours_worked(iso)));
p36_hourly_costs(t,i) = sum(i_to_iso(i,iso), p36_hourly_costs_iso(t,iso)*p36_total_hours_worked(iso))*(1/sum(i_to_iso(i,iso),p36_total_hours_worked(iso)));

*' @code
*' If productivity is assumed to increase proportional to hourly labor costs also with external minimum wage,
*' total labor costs should not be scaled. Otherwise, the scaling factor between baseline and increased hourly labor costs will
*' be applied to labor costs for crop production ([38_factor_costs]), livestock production ([70_livestock]), and the
*' non-MAgPIE labor costs.
if (s36_scale_labor_costs eq 0,
pm_labor_cost_scaling(t,i) = 1;
elseif (s36_scale_labor_costs eq 1),
pm_labor_cost_scaling(t,i) = p36_hourly_costs(t,i) / p36_hourly_costs_baseline(t,i);
);
*' @stop

20 changes: 1 addition & 19 deletions modules/36_employment/exo_may22/presolve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,6 @@ elseif (m_year(t)>=2010),
*' categories not covered by MAgPIE (i.e. wool, beeswax, honey, silk-worms), which
*' are both kept constant for future years.

p36_nonmagpie_labor_costs(t,i) = (f36_unspecified_subsidies(t,i) + f36_nonmagpie_factor_costs(t,i)) * (1-p36_cost_share(t,i));


*' Hourly labor costs are projected into the future by using a linear regression with
*' GDPpcMER, which is calibrated such that historic values of agricultural employment
*' are met.
p36_nonmagpie_labor_costs(t,i) = (f36_unspecified_subsidies(t,i) + f36_nonmagpie_factor_costs(t,i)) * (1-p36_cost_share(t,i)) * pm_labor_cost_scaling(t,i);

*' @stop

* historic hourly labor costs for t_past, calibrated regression values based on GDPpcMER for future years
* A threshold of 0.1$/h is used in the regression to avoid too low or negative hourly labor costs.
if (sum(sameas(t_past,t),1) = 1,
p36_hourly_costs_iso(t,iso) = f36_hist_hourly_costs(t,iso)
else
p36_hourly_costs_iso(t,iso) = max((im_gdp_pc_mer_iso(t,iso)*f36_regr_hourly_costs("slope")+
f36_regr_hourly_costs("intercept")+p36_calibration_hourly_costs(iso)),
f36_regr_hourly_costs("threshold"));
);


p36_hourly_costs(t,i) = sum(i_to_iso(i,iso),p36_hourly_costs_iso(t,iso)*p36_total_hours_worked(iso))*(1/sum(i_to_iso(i,iso),p36_total_hours_worked(iso)));
5 changes: 3 additions & 2 deletions modules/36_employment/exo_may22/realization.gms
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
*' @description This realization calculates agricultural employment based
*' on it's relation to total labor costs. It therefore depends
*' on the labor costs calculated in the modules [38_factor_costs] and
*' [70_livestock], but does not affect resulting total costs or production
*' patterns.
*' [70_livestock]. Resulting total costs and production patterns can be affected
*' if an external minimum wage is set, which increases labor costs for
*' crop and livestock production in [38_factor_costs] and [70_livestock].

*' @limitations Labor availability is not seen as a limiting factor for
*' agricultural production, as the number of people employed is directly linked
Expand Down
9 changes: 6 additions & 3 deletions modules/36_employment/module.gms
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@

*' @description This module is used to calculate hourly labor costs in agriculutre
*' and the number of people employed in crop and livestock production.
*' The calculation is based on labor costs in crop and livestock production
*' coming from [38_factor_costs] and [70_livestock], as well as GDP pc from
*' [09_drivers].
*' Hourly labor costs are calculated based on a regression with GDP pc from [09_drivers].
*' They can be increased by an externally set global minimum wage, and the module
*' provides a scaling factor for labor costs to [38_factor_costs] and [70_livestock],
*' to increase total labor costs according to the increase in hourly labor costs.
*' The calculation of employment then uses labor costs for crop and livestock production
*' coming from [38_factor_costs] and [70_livestock].

*' @authors Debbora Leip

Expand Down
29 changes: 0 additions & 29 deletions modules/38_factor_costs/mixed_reg_feb17/declarations.gms

This file was deleted.

35 changes: 0 additions & 35 deletions modules/38_factor_costs/mixed_reg_feb17/equations.gms

This file was deleted.

37 changes: 0 additions & 37 deletions modules/38_factor_costs/mixed_reg_feb17/input.gms

This file was deleted.

3 changes: 0 additions & 3 deletions modules/38_factor_costs/mixed_reg_feb17/input/files

This file was deleted.

13 changes: 0 additions & 13 deletions modules/38_factor_costs/mixed_reg_feb17/not_used.txt

This file was deleted.

17 changes: 0 additions & 17 deletions modules/38_factor_costs/mixed_reg_feb17/postsolve.gms

This file was deleted.

8 changes: 0 additions & 8 deletions modules/38_factor_costs/mixed_reg_feb17/preloop.gms

This file was deleted.

Loading