-
Notifications
You must be signed in to change notification settings - Fork 1
/
MMR_RandD_SSP.gms
executable file
·92 lines (66 loc) · 1.65 KB
/
MMR_RandD_SSP.gms
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
$include RandD_det.gms
* The following is added by Yongyang Cai
** Start Exogenous Projections**************************************************
$include RandD_SSPs.gms
*Output results
Parameter
year(t);
year(t) = 2004 + deltat *(ord(t)-1);
File resSSP /res_SSPs.csv/;
resSSP.pc=5;
resSSP.pw=4000;
Put resSSP;
loop(nscen,
Put "R&D Spending (annual global trillion USD)";
Loop (t, put RDs(t,nscen) ::4);
put /;
Put "R&D stock";
Loop (t, put RDstocks(t,nscen) ::4);
put /;
Put "TFP";
Loop (t, put TFPs(t,nscen) ::4);
put /;
);
*********************
$include MMR_SSP.gms
*Output results
File resMMRSSP /res_MMR_SSP.csv/;
resMMRSSP.pc=5;
resMMRSSP.pw=4000;
Put resMMRSSP;
Put "R&D Spending (annual global trillion USD)";
Loop (t, put RD.l(t) ::4);
put /;
Put "TFP";
Loop (t, put TFP.l(t) ::4);
put /;
Put "annual growth of R&D Spending in one period";
Loop (t, put growth_RD(t) ::4);
put /;
Put "average annual growth of R&D Spending since 2004";
Loop (t, put avg_growth_RD(t) ::6);
put /;
File regretSSP /regret_SSP.csv/;
regretSSP.pc=5;
regretSSP.pw=4000;
Put regretSSP;
put "regret measured with present value of flow of global loss (in real market billion USD)" /;
put "Model \ Realized";
put "SSP1";
put "SSP2";
put "SSP3";
put "SSP4";
put "SSP5";
put "max regret" /;
Loop (nscen,
put "Action for one SSP";
loop( nscen2, put regret_USD2(nscen,nscen2) ::6 );
maxreg = smax(nscen2, regret_USD2(nscen,nscen2));
put maxreg ::6;
put /;
);
put "Action for MMR";
loop(nscen, put regret_USD3(nscen) ::6 );
maxreg = smax(nscen, regret_USD3(nscen));
put maxreg ::6;
put /;