From 48f2377037a493f8f032b7498fb360fb5f02ade6 Mon Sep 17 00:00:00 2001 From: tabeado Date: Fri, 17 Mar 2023 16:26:17 +0100 Subject: [PATCH 1/3] remove deltaCap time split for vm_capCum --- core/equations.gms | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/equations.gms b/core/equations.gms index c7d2d61cb..8acff0497 100644 --- a/core/equations.gms +++ b/core/equations.gms @@ -373,8 +373,7 @@ qm_deltaCapCumNet(ttot,regi,teLearn)$(ord(ttot) lt card(ttot) AND pm_ttot_val(tt vm_capCum(ttot+1,regi,teLearn) =e= sum(te2rlf(teLearn,rlf), - (pm_ts(ttot) / 2 * vm_deltaCap(ttot,regi,teLearn,rlf)) + (pm_ts(ttot+1) / 2 * vm_deltaCap(ttot+1,regi,teLearn,rlf)) - ) + vm_deltaCap(ttot+1,regi,teLearn,rlf)) + vm_capCum(ttot,regi,teLearn); From bd7b6bd02ea2f44d320f7386fdba43be7c7ec573 Mon Sep 17 00:00:00 2001 From: tabeado Date: Thu, 6 Apr 2023 09:49:19 +0200 Subject: [PATCH 2/3] no deltaCap split in marg benefit spillover calc --- modules/22_subsidizeLearning/globallyOptimal/presolve.gms | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/22_subsidizeLearning/globallyOptimal/presolve.gms b/modules/22_subsidizeLearning/globallyOptimal/presolve.gms index 8631947ed..c691822dd 100644 --- a/modules/22_subsidizeLearning/globallyOptimal/presolve.gms +++ b/modules/22_subsidizeLearning/globallyOptimal/presolve.gms @@ -18,9 +18,7 @@ display pm_capCumForeign; * calculate marginal benefit of spillovers in each region. This expression for the subsidy can be derived analytically. loop(regi$(pm_SolNonInfes(regi) eq 1), p22_marginalCapcumBenefit(ttot,regi,teLearn) = - pm_ts(ttot)/2 * (abs(qm_deltaCapCumNet.m(ttot,regi,teLearn)) / max(abs(qm_budget.m(ttot,regi)),1E-9)) - + pm_ts(ttot)/2 * (abs(qm_deltaCapCumNet.m(ttot -1,regi,teLearn)) / max(abs(qm_budget.m(ttot,regi)),1E-9)) - + pm_ts(ttot) * (abs(qm_deltaCapCumNet.m(ttot,regi,teLearn)) / max(abs(qm_budget.m(ttot,regi)),1E-9)) ); From 712a2630d0609b21155e700a4b3f1c76d34ba557 Mon Sep 17 00:00:00 2001 From: tabeado Date: Thu, 6 Apr 2023 09:51:37 +0200 Subject: [PATCH 3/3] fix missing factor in vm_capCum --- core/equations.gms | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/equations.gms b/core/equations.gms index 8acff0497..ae1d05304 100644 --- a/core/equations.gms +++ b/core/equations.gms @@ -373,7 +373,7 @@ qm_deltaCapCumNet(ttot,regi,teLearn)$(ord(ttot) lt card(ttot) AND pm_ttot_val(tt vm_capCum(ttot+1,regi,teLearn) =e= sum(te2rlf(teLearn,rlf), - vm_deltaCap(ttot+1,regi,teLearn,rlf)) + pm_ts(ttot+1)* vm_deltaCap(ttot+1,regi,teLearn,rlf)) + vm_capCum(ttot,regi,teLearn);