Skip to content

Commit

Permalink
added changelog entry, improved comments
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidhoPIK committed May 21, 2024
1 parent 74ed9a0 commit 4c08628
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased]

### changed
- **21_trade** refactor equations for enhanced readablility
- **22_land_conservation and default.cfg** Added options for baseline protection
- **15_food, default.cfg and scenario_config.csv** changed fader setup and introduced new switches for specifying food substitution scenarios and exogeneous food intake scenarios
- **70_livestock, default.cfg and scenario_config.csv** changed fader setup and introduced new switches for specifying feed substitution with SCP scenarios
Expand Down
14 changes: 8 additions & 6 deletions modules/21_trade/selfsuff_reduced/equations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,21 @@
q21_trade_glo(k_trade)..
sum(i2 ,vm_prod_reg(i2,k_trade)) =g=
sum(i2, vm_supply(i2,k_trade)) + sum(ct,f21_trade_balanceflow(ct,k_trade));

*'
*' For non-tradable commodites, the regional supply should be larger or equal to the regional demand.
*' For non-tradable commodites, the superregional supply should be larger or equal to the superregional demand.
q21_notrade(h2,k_notrade)..
sum(supreg(h2,i2),vm_prod_reg(i2,k_notrade)) =g= sum(supreg(h2,i2), vm_supply(i2,k_notrade));

*' The following equation indicates the regional trade constraint for the self-sufficiency pool.
*' The share of regional demand that has to be fulfilled through the self-sufficiency pool is
*' The following equations indicate the superregional trade constraint for the self-sufficiency pool.
*' The share of superregional demand that has to be fulfilled through the self-sufficiency pool is
*' determined by a trade balance reduction factor for each commodity `i21_trade_bal_reduction(ct,k_trade)`
*' according to the following equations [@schmitz_trading_2012].
*' If the trade balance reduction equals 1 (`f21_self_suff(ct,i2,k_trade) = 1`), all demand enters the self-sufficiency pool.
*' If it equals 0, all demand enters the comparative advantage pool.

*' Baseline value for a corridor in which the superregional production
*'
*' The below equation defines the baseline value for a corridor in which the superregional production
*' can move freely based on comparative advantage.

q21_prod_baseline(h2,k_trade)..
Expand All @@ -34,15 +36,15 @@
+ (sum(supreg(h2,i2),vm_supply(i2,k_trade)) * sum(ct,f21_self_suff(ct,h2,k_trade)))
$(sum(ct,f21_self_suff(ct,h2,k_trade) < 1));

*' Lower bound for production.
*' Lower bound of corridor for production.

q21_trade_reg(h2,k_trade)..
sum(supreg(h2,i2),vm_prod_reg(i2,k_trade)) =g=
v21_prod_baseline(h2,k_trade)
* sum(ct,i21_trade_bal_reduction(ct,k_trade))
- v21_import_for_feasibility(h2,k_trade);

*' Upper bound for production.
*' Upper bound of corridor for production.

q21_trade_reg_up(h2,k_trade) ..
sum(supreg(h2,i2),vm_prod_reg(i2,k_trade)) =l=
Expand Down

0 comments on commit 4c08628

Please sign in to comment.