* zmb2019_2025-sim2.inc



DISPLAY "#### START: zmb2019_2025-sim2.inc";    


$ONMULTI
SET
  
  t1924(t)
  /
  2019*2024
  /

  t2550(t)
  /
  2025*2050
  /

  t2530(t)
  /
  2025*2030
  /

  t3150(t)
  /2031*2050/

  sim
  /
  
BASE

INVEST
CLIMATE
CLIMAGRI
IRRIGAGRI
AFFORDEFOR
INTERV
COMBI
EROSION
AFFORDEFOR2
INTERV2
COMBI2

INVEST-TDir
CLIMATE-TDir
CLIMAGRI-TDir
IRRIGAGRI-TDir
AFFORDEFOR-TDir
INTERV-TDir
COMBI-TDir
  /
  
  simcur(sim)
  /

BASE
INVEST
CLIMATE
CLIMAGRI
IRRIGAGRI
AFFORDEFOR
INTERV
COMBI
EROSION
AFFORDEFOR2
INTERV2
COMBI2


*INVEST-TDir
*CLIMATE-TDir
*CLIMAGRI-TDir
*IRRIGAGRI-TDir
*AFFORDEFOR-TDir
*INTERV-TDir
*COMBI-TDir
  /





* start: financing source

  simtdir(sim)
  /
INVEST
CLIMATE
CLIMAGRI
IRRIGAGRI
AFFORDEFOR
INTERV
COMBI 
  /
  
  simtdir2(sim)
  /
INVEST-TDir
CLIMATE-TDir
CLIMAGRI-TDir
IRRIGAGRI-TDir
AFFORDEFOR-TDir
INTERV-TDir
COMBI-TDir  
  
  /
  
  simtcom(sim)
  /

  /
  
  simdbor(sim)
  /

  /

  simfbor(sim)
  /
  /

  simgeff(sim)
  /
 
  /


* end: financing source


* start: activitity groups

  aagr(a)
  /
a-crops
a-livestock
a-for
a-fsh


  /
  
  aman(a)
  /
a-food
a-bevtob
a-texapp
a-woodpaper
a-chemicals
a-rubbplast
a-nonmetminprod
a-metals
a-machineryeq
a-oman



  
  /

  aind(a)
  /
a-coal
a-metalores
a-othmin
a-food
a-bevtob
a-texapp
a-woodpaper
a-chemicals
a-rubbplast
a-nonmetminprod
a-metals
a-machineryeq
a-oman
a-elect
a-wat
a-cns


  
  /
  
  
  aser(a)
  /

a-trd
a-hotelrest
a-transp
a-publicadm
a-eduhealth
a-recreation
a-oser


  
  /
  
  ainf(a)
  /
  /



* end: activitity groups


;


$OFFMULTI

* start: closure and rules

govclossim('base',tmin) = 1;

govclossim(simtdir,t) = 1;
govclossim(simtcom,t) = 9;

govclossim(simdbor,t) = 2;
govclossim(simfbor,t) = 3;



govclossim(simgeff,tmin) = 4;


siclossim('base') = 1;

govrecrulesim('base',acgovrec) = 1;

govspndrulesim('base',acgovspnd) = 1;

ngovpayrulesim('base',acngovpay) = 1;


* end: closure and rules



* start: read shocks from Excel


SET
  cntry
  channel
  dgr
  acdum
;

PARAMETER
  simdefcc(cntry,channel,dgr,acdum,t)

;


$CALL 'GDXXRW user-files\%app%\From-JGEA\simdefcc.xlsx index=layout!A1'
$GDXIN simdefcc.gdx

$LOADDC cntry
$LOADDC channel
$LOADDC dgr
$LOADDC acdum
$LOADDC simdefcc

$ONTEXT

PARAMETER
  shk_erosion(cntry,t)
;

$CALL 'GDXXRW C:\wrk\BID-IEEM\Aplicacion-IEEM-AmCentral\Scenario-Definition\Erosion-Shock\Combined-Erosion-Shocks.xlsx index=layout!A1'
$GDXIN Combined-Erosion-Shocks.gdx

$LOADDC shk_erosion

$OFFTEXT

* end: read shocks from Excel


* start: INVEST

PARAMETER
  investdol(sim)
  /
  INVEST    141850000 
  CLIMAGRI   31750000
  IRRIGAGRI  79800000
  AFFORDEFOR 30225000

  /

  exr25
*  cpi21
  cpi23
  cpi19
  
  invest(sim)
;

$ONTEXT
Parece que los escenarios que tenemos serán los escenarios finales. Lo que si creo que sería bueno investigar es: (i) 
una alternativa para financiar los escenarios (e.g. 50% deuda externa, 50% 
impuestos indirectos como habías sugerido; (ii) incluir un escenario donde se 
repaga el préstamo. ¿Como lo ves?
$OFFTEXT


exr25=misc('exrdolcurr');
*cpi21=misc('cpi00');
cpi19=misc('cpi00');
cpi23=misc('cpicurr');

invest(sim) = investdol(sim)*exr25/cpi23*cpi19;
invest(sim) = invest(sim)/scaling('samto1');

ddkinssim('invest','govz','f-capg',t)$t2530(t) = invest('invest')/CARD(t2530);

NFFGSIM('invest',t) = ddkinssim('invest','govz','f-capg',t);


* end: INVEST


* start: CLIMATE

tfpexogsim('CLIMATE',acro,t)$tsol(t) = 1 + simdefcc('ZMB','agrprd','plus4','dummy',t);
fprdabsim('CLIMATE',flab,aagr,t)$tsol(t) = 1 + simdefcc('ZMB','lprd','plus4','agr',t);
fprdabsim('CLIMATE',flab,aind,t)$tsol(t) = 1 + simdefcc('ZMB','lprd','plus4','man',t);
fprdabsim('CLIMATE',flab,aser,t)$tsol(t) = 1 + simdefcc('ZMB','lprd','plus4','ser',t);
fprdabsim('CLIMATE',flab,a,t)$tsol(t) = 1 + simdefcc('ZMB','health','plus4','dummy',t);
*!!note: add health to lprd effects
qtrstbsim('CLIMATE','all','trstf',t)$tsol(t) = 1 + simdefcc('ZMB','trst','plus4','dummy',t);




* end: CLIMATE



* start: CLIMAGRI



PARAMETER
  ha_numb(*)

  scal0(t)
  
  qfbase000(f,a)  
;
  
qfbase000(f,a)$(NOT flab(f)) = qfbase(f,a)*scaling('qlandsol')*scaling('qlandto1');

  
scal0('2025') = 1/6;
scal0('2026') = 2/6;
scal0('2027') = 3/6;
scal0('2028') = 4/6;
scal0('2029') = 5/6;
scal0('2030') = 6/6;
scal0(t)$t3150(t) = 1;



ha_numb('CLIMAGRI-cro') = 500000;
ha_numb('CLIMAGRI-liv') = 7000;


ddkinssim('CLIMAGRI','govz','f-capg',t)$t2530(t) = invest('CLIMAGRI')/CARD(t2530);
NFFGSIM('CLIMAGRI',t) = ddkinssim('CLIMAGRI','govz','f-capg',t);


tfpexogsim('CLIMAGRI',acro,t)$t1924(t) = 1;
tfpexogsim('CLIMAGRI',acro,t)$t2550(t) = 1 + 0.02 * scal0(t) * ha_numb('CLIMAGRI-cro')/SUM((flandcrop,acrop), qfbase000(flandcrop,acrop));

tfpexogsim('CLIMAGRI',aliv,t)$t1924(t) = 1;
tfpexogsim('CLIMAGRI',aliv,t)$t2550(t) = 1 + 0.02 * scal0(t) * ha_numb('CLIMAGRI-liv')/SUM((flandlivp,alivp), qfbase000(flandlivp,alivp));


* end: CLIMAGRI



* start: IRRIGAGRI

ha_numb('IRRIGAGRI') = 2600;


ddkinssim('IRRIGAGRI','govz','f-capg',t)$t2530(t) = invest('IRRIGAGRI')/CARD(t2530);
NFFGSIM('IRRIGAGRI',t) = ddkinssim('IRRIGAGRI','govz','f-capg',t);

tfpexogsim('IRRIGAGRI',acro,t)$t1924(t) = 1;
tfpexogsim('IRRIGAGRI',acro,t)$t2550(t) = 1 + 0.5 * scal0(t) * ha_numb('IRRIGAGRI')/SUM((flandcrop,acrop), qfbase000(flandcrop,acrop));


* end: IRRIGAGRI




* start: AFFORDEFOR

PARAMETER
  ratdefor
  
  ha_costdol
  /72/
  ha_cost
;


$ONTEXT
This scenario simulates the reduction in the rate of deforestation from 172,000 ha/yr (2018) to 120,000 ha/yr between 2025 and 2030. 
$OFFTEXT

ha_cost = ha_costdol*exr25/cpi23*cpi19;


ratdefor = 120000/172000;

dqdeforbsim('AFFORDEFOR','fortot',t)$t2530(t) = 120000-172000;
 
ddkinssim('AFFORDEFOR','govz','f-capg',t)$t2530(t) = -ha_cost*dqdeforbsim('AFFORDEFOR','fortot',t)/scaling('samto1')
  + invest('AFFORDEFOR')/CARD(t2530)

;
NFFGSIM('AFFORDEFOR',t) = ddkinssim('AFFORDEFOR','govz','f-capg',t);


$ONTEXT
In addition, 600,000 hectares will be regenerated (Ministry of Green Economy and Environment, 2024)
$OFFTEXT


$ONTEXT
60,000 ha will be reforested. 

$OFFTEXT

* increase in non-productive forest 
dqfortotsim('AFFORDEFOR',lndfortot,t)$t2530(t) = 600000/CARD(t2530) + 60000/CARD(t2530);


dqdeforbsim('AFFORDEFOR2','fortot',t)      =  dqdeforbsim('AFFORDEFOR','fortot',t);
ddkinssim('AFFORDEFOR2','govz','f-capg',t) =  ddkinssim('AFFORDEFOR','govz','f-capg',t);
NFFGSIM('AFFORDEFOR2',t)                   =  NFFGSIM('AFFORDEFOR',t); 
dqfortotsim('AFFORDEFOR2',lndfortot,t)     =  dqfortotsim('AFFORDEFOR',lndfortot,t);

* end: AFFORDEFOR



* start: INTERV

ddkinssim('INTERV','govz','f-capg',t) = ddkinssim('INVEST','govz','f-capg',t)
  + ddkinssim('CLIMAGRI','govz','f-capg',t)
  + ddkinssim('IRRIGAGRI','govz','f-capg',t)
  + ddkinssim('AFFORDEFOR','govz','f-capg',t);
NFFGSIM('INTERV',t) = ddkinssim('INTERV','govz','f-capg',t);


tfpexogsim('INTERV',a,t)$tsol(t) = 1
*  + (tfpexogsim('CLIMATE',a,t) - 1)$tfpexogsim('CLIMATE',a,t)
  + (tfpexogsim('CLIMAGRI',a,t) - 1)$tfpexogsim('CLIMAGRI',a,t)
  + (tfpexogsim('IRRIGAGRI',a,t) - 1)$tfpexogsim('IRRIGAGRI',a,t);

*fprdabsim('INTERV',f,a,t) = fprdabsim('CLIMATE',f,a,t);  
  
*qtrstbsim('INTERV','all','trstf',t) = qtrstbsim('CLIMATE','all','trstf',t);  

dqdeforbsim('INTERV','fortot',t) = dqdeforbsim('AFFORDEFOR','fortot',t);

dqfortotsim('INTERV',lndfortot,t) = dqfortotsim('AFFORDEFOR',lndfortot,t);


ddkinssim('INTERV2','govz','f-capg',t) =  ddkinssim('INTERV','govz','f-capg',t); 
NFFGSIM('INTERV2',t)                   =  NFFGSIM('INTERV',t);
tfpexogsim('INTERV2',a,t)              =  tfpexogsim('INTERV',a,t);
dqdeforbsim('INTERV2','fortot',t)      =  dqdeforbsim('INTERV','fortot',t); 
dqfortotsim('INTERV2',lndfortot,t)     =  dqfortotsim('INTERV',lndfortot,t);

* end: INTERV




* start: COMBI

ddkinssim('COMBI','govz','f-capg',t) = ddkinssim('INVEST','govz','f-capg',t)
  + ddkinssim('CLIMAGRI','govz','f-capg',t)
  + ddkinssim('IRRIGAGRI','govz','f-capg',t)
  + ddkinssim('AFFORDEFOR','govz','f-capg',t);
NFFGSIM('COMBI',t) = ddkinssim('COMBI','govz','f-capg',t);


tfpexogsim('COMBI',a,t)$tsol(t) = 1
  + (tfpexogsim('CLIMATE',a,t) - 1)$tfpexogsim('CLIMATE',a,t)
  + (tfpexogsim('CLIMAGRI',a,t) - 1)$tfpexogsim('CLIMAGRI',a,t)
  + (tfpexogsim('IRRIGAGRI',a,t) - 1)$tfpexogsim('IRRIGAGRI',a,t);

fprdabsim('COMBI',f,a,t) = fprdabsim('CLIMATE',f,a,t);  
  
qtrstbsim('COMBI','all','trstf',t) = qtrstbsim('CLIMATE','all','trstf',t);  

dqdeforbsim('COMBI','fortot',t) = dqdeforbsim('AFFORDEFOR','fortot',t);

dqfortotsim('COMBI',lndfortot,t) = dqfortotsim('AFFORDEFOR',lndfortot,t);
  

* end: COMBI


* start: EROSION

SET
  erosioncol
  /
national
national-prod-shock
  
  /
;
PARAMETER
  shk_erosion(erosioncol,t)
;


$CALL 'GDXXRW user-files\%app%\20250505LULC_ESM_ZAMBIA-Shocks-Erosion.xlsx index=layout!A1'
$GDXIN 20250505LULC_ESM_ZAMBIA-Shocks-Erosion.gdx

$LOADDC shk_erosion

tfpexogsim('EROSION',acro,t)$t2550(t) = 1 + shk_erosion('national-prod-shock',t);


* end: EROSION

* start: COMBI2

ddkinssim('COMBI2','govz','f-capg',t) = ddkinssim('COMBI','govz','f-capg',t);

NFFGSIM('COMBI2',t) = NFFGSIM('COMBI',t);

tfpexogsim('COMBI2',a,t) = 1 
  + (tfpexogsim('COMBI',a,t) -1)$tfpexogsim('COMBI',a,t) 
  + (tfpexogsim('EROSION',a,t) - 1)$tfpexogsim('EROSION',a,t);


fprdabsim('COMBI2',f,a,t) = fprdabsim('COMBI',f,a,t);
  
qtrstbsim('COMBI2','all','trstf',t) = qtrstbsim('COMBI','all','trstf',t);

dqdeforbsim('COMBI2','fortot',t) = dqdeforbsim('COMBI','fortot',t);

dqfortotsim('COMBI2',lndfortot,t) = dqfortotsim('COMBI',lndfortot,t);
  

* end: COMBI2


* start: add erosion shock to AFFORDEFOR2 and INTERV2

tfpexogsim('AFFORDEFOR2',a,t) = 1 
  + (tfpexogsim('AFFORDEFOR',a,t) -1)$tfpexogsim('AFFORDEFOR',a,t) 
  + (tfpexogsim('EROSION',a,t) - 1)$tfpexogsim('EROSION',a,t);

tfpexogsim('INTERV2',a,t) = 1 
  + (tfpexogsim('INTERV',a,t) -1)$tfpexogsim('INTERV',a,t) 
  + (tfpexogsim('EROSION',a,t) - 1)$tfpexogsim('EROSION',a,t);


* end: add erosion shock to AFFORDEFOR2 and INTERV2


* start: no foreign financing for simulations in simtdir2

NFFGSIM(simtdir2,t) = 0;


* end: no foreign financing for simulations in simtdir2



$EXIT
$STOP



Hola Martin,
Copio abajo las condiciones de repago. No estoy 100% seguro en como aplicar estas distintas tasas de interés. ¿Como lo ves? Si tampoco te queda claro, quizás podríamos simplificar y aplicar una tasa de interés de 1.75%? ¿Como se compara con lo que aplicábamos en el caso del BID?
Muchas gracias y saludos,
Onil
 
 
Maximum Commitment charge rate of 0.5% per year on unwithdrawn financing balance.
A Service Charge of 0.75% per year on the withdrawn credit balance.
The Interest Charge is 1.25% per year on withdrawn credit balance.

Principal amount of the credit repayable is 1.65% for first 20 years and 3.4% for the subsequent and final 5 years. There is a 5-year grace period before the first payment must be made.




DISPLAY "#### END: zmb2019_2025-sim2.inc";    