Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
4bc4fac
Update parameter and variable description; included new parameters an…
Jan 8, 2026
15a5ac3
Update GAMS parameter and variable definition
Jan 8, 2026
abd38c4
Update new equation description
Jan 8, 2026
db4042a
Update model equations and descriptions
Jan 8, 2026
22db222
Update model definition
Jan 8, 2026
14631d9
Update PARAMETERS
Jan 8, 2026
6e38180
update * load relevant sets and parameters from dataset gdx
Jan 8, 2026
d47ea20
update gdp_mer_macro(node_macro,year) = Y.L(node_macro,year) * 1000 ;…
Jan 8, 2026
8466d7e
Delete NEWENE as it no longer exists
Jan 8, 2026
a845336
Add startvalue for TE (in original model PRODENE)
Jan 8, 2026
5bce212
Delete startvalues for KN, YN, I, and NEWENE as they do not longer exist
Jan 8, 2026
4f24682
Change PRODENE in TE
Jan 8, 2026
44e7fa7
Add start values for E and YE as they are new Variables
Jan 8, 2026
be165fe
Update base year values of variables
Jan 8, 2026
50af513
Change GDP.L equation as the original accounting equation does no lon…
Jan 8, 2026
84f21e4
Update ixmp items
Jan 8, 2026
9d95c10
update macro calibration parameters
Jan 8, 2026
f56e4ea
Add new model description document
Jan 8, 2026
7ca0f6a
Add macro_calibration_parameters for macro calibration
Jan 8, 2026
fcc7768
Only move documentaion pdf
Jan 8, 2026
6e08a05
Upload latest run script of adding the new macro model to MESSAGE wit…
Jan 8, 2026
0f52b79
Upload MESSAGE-MACRO_run log and lst file from scenario.add_macro()
Jan 9, 2026
01fdc27
move excel sheet
Jan 9, 2026
5428ed5
Changed name of xlsx macro file
Jan 13, 2026
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
12 changes: 10 additions & 2 deletions message_ix/macro/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ def initialize(cls, scenario, with_data=False):
#: ixmp items (sets, parameters, variables, and equations) for MACRO.
_set("sector")
_set("mapping_macro_sector", "sector c l")
par("EMIN", "node")
par("alpha", "node")
par("wage", "n y")
par("h", "n sector")
par("beta_rc_spec", "node")
par("beta_rc_therm", "node")
par("beta_transport", "node")
par("MERtoPPP", "n y")
par("aeei", "n sector y")
par("cost_MESSAGE", "n y")
Expand All @@ -59,10 +66,11 @@ def initialize(cls, scenario, with_data=False):
var("COST_NODAL_NET", "n y", "Net of trade and emissions cost")
var("DEMAND", "n c l y h")
var("EC", "n y")
var("EC_household", "n y")
var("EC_production", "n y")
var("GDP", "n y")
var("I", "n y", "Total investment")
var("K", "n y")
var("KN", "n y")
var("MAX_ITER", "")
var("N_ITER", "")
var("NEWENE", "n sector y")
Expand All @@ -71,7 +79,7 @@ def initialize(cls, scenario, with_data=False):
var("PRODENE", "n sector y")
var("UTILITY", "")
var("Y", "n y")
var("YN", "n y")
var("Y_GOODS", "n y")
var("aeei_calibrate", "n sector y")
var("grow_calibrate", "n y")
equ("COST_ACCOUNTING_NODAL", "n y")
7 changes: 7 additions & 0 deletions message_ix/macro/calibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@
"lotol",
"MERtoPPP",
"price_ref",
"EMIN",
"alpha",
"wage",
"h",
"beta_rc_spec",
"beta_rc_therm",
"beta_transport",
]


Expand Down
2 changes: 1 addition & 1 deletion message_ix/model/MACRO/macro_calibration.gms
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ demand_new(node_macro,sector,year) = demand_scale(node_macro,sector,year) * dema

If (mod(ctr, 2) eq 0,
* calculate correction factor for labour force growth rate and apply for next iteration of MACRO
gdp_mer_macro(node_macro,year) = (I.L(node_macro,year) + C.L(node_macro,year) + EC.L(node_macro,year)) * 1000 ;
gdp_mer_macro(node_macro,year) = Y.L(node_macro,year) * 1000 ;
gdp_scale(node_macro,year) = gdp_mer_macro(node_macro,year)/gdp_calibrate(node_macro,year) ;
growth_correction(node_macro,year) $ (NOT macro_base_period(year)) = SUM(year2 $ seq_period(year2,year), ((gdp_calibrate(node_macro,year)/gdp_calibrate(node_macro,year2))**(1/duration_period(year)))
- ((gdp_mer_macro(node_macro,year)/gdp_mer_macro(node_macro,year2))**(1/duration_period(year))) ) ;
Expand Down
272 changes: 108 additions & 164 deletions message_ix/model/MACRO/macro_core.gms

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion message_ix/model/MACRO/macro_data_load.gms
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ PARAMETERS
lakl(node) Production function coefficient of capital and labor
prfconst(node, sector) Production function coefficient of different energy sectors

EMIN(node) Test Lukas
wage(node,year_all) Test Lukas
h(node,sector) Test Lukas
beta_rc_spec(node) Test Lukas
beta_rc_therm(node) Test Lukas
beta_transport(node) Test Lukas
alpha(node) Test Lukas

enestart(node,sector,year_all) Consumption level of energy services from MESSAGE model run
eneprice(node,sector,year_all) Shadow prices of energy services from MESSAGE model run
total_cost(node,year_all) Total energy system costs from MESSAGE model run
Expand Down Expand Up @@ -131,9 +139,11 @@ $LABEL macro_data

$LOAD type_node,cat_node
$LOAD sector,mapping_macro_sector
$LOAD kpvs,kgdp,esub,depr,drate,lotol
$LOAD kpvs,kgdp,esub,depr,drate,lotol,alpha,EMIN,beta_rc_spec,beta_rc_therm,beta_transport
$LOAD lakl,prfconst
$LOAD aeei,grow
$LOAD wage
$LOAD h
$LOAD gdp_calibrate,historical_gdp
$LOAD demand_MESSAGE,price_MESSAGE,cost_MESSAGE
$GDXIN
Expand Down
2 changes: 1 addition & 1 deletion message_ix/model/MACRO/macro_reporting.gms
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
* MACRreport
* ------------------------------------------------------------------------------

GDP.L(node_macro,year) = (I.L(node_macro,year) + C.L(node_macro,year) + EC.L(node_macro,year)) * 1000 ;
GDP.L(node_macro,year) = Y.L(node_macro,year) * 1000 ;
14 changes: 4 additions & 10 deletions message_ix/model/MACRO/macro_solve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ SVNEWE(node_macro, sector, year) = (
)
)$(NOT macro_base_period(year));

NEWENE.L(node_macro, sector, macro_horizon) = (
TE.L(node_macro, sector, macro_horizon) = (
SVNEWE(node_macro, sector, macro_horizon)$(SVNEWE(node_macro, sector, macro_horizon) > 0) + epsilon
);

Expand All @@ -32,28 +32,22 @@ KN.L(node_macro, macro_horizon) = SVKN(node_macro, macro_horizon) $ (SVKN(node_
* ------------------------------------------------------------------------------

K.LO(node_macro, macro_horizon) = LOTOL(node_macro) * k0(node_macro) ;
KN.LO(node_macro, macro_horizon) = LOTOL(node_macro) * i0(node_macro) * duration_period(macro_horizon) ;
Y.LO(node_macro, macro_horizon) = LOTOL(node_macro) * y0(node_macro) ;
YN.LO(node_macro, macro_horizon) = LOTOL(node_macro) * y0(node_macro) * newlab(node_macro, macro_horizon) ;

C.LO(node_macro, macro_horizon) = LOTOL(node_macro) * c0(node_macro) ;
I.LO(node_macro, macro_horizon) = LOTOL(node_macro) * i0(node_macro) ;

PRODENE.LO(node_macro, sector, macro_horizon) = LOTOL(node_macro) * enestart(node_macro, sector, macro_horizon) / aeei_factor(node_macro, sector, macro_horizon) ;
NEWENE.LO(node_macro, sector, macro_horizon) = LOTOL(node_macro) * enestart(node_macro, sector, macro_horizon) / aeei_factor(node_macro, sector, macro_horizon) ;
TE.LO(node_macro, sector, macro_horizon) = LOTOL(node_macro) * enestart(node_macro, sector, macro_horizon) / aeei_factor(node_macro, sector, macro_horizon) ;
YE.LO(node_macro, sector, macro_horizon) = (1-h(node_macro, sector)) * LOTOL(node_macro) * enestart(node_macro, sector, macro_horizon) / aeei_factor(node_macro, sector, macro_horizon) ;
E.LO(node_macro, sector, macro_horizon) = h(node_macro, sector) * LOTOL(node_macro) * enestart(node_macro, sector, macro_horizon) / aeei_factor(node_macro, sector, macro_horizon) ;

* ------------------------------------------------------------------------------
* Base year values of variables are fixed to historical values
* ------------------------------------------------------------------------------

* division by aeei_factor is necesary in case MACRO starts after initialize_period (in case of slicing)
PRODENE.FX(node_macro, sector, macro_base_period) = demand_base(node_macro, sector) / aeei_factor(node_macro, sector, macro_base_period) ;

Y.FX(node_macro, macro_base_period) = y0(node_macro) ;
K.FX(node_macro, macro_base_period) = k0(node_macro) ;
C.FX(node_macro, macro_base_period) = c0(node_macro) ;
I.FX(node_macro, macro_base_period) = i0(node_macro) ;
EC.FX(node_macro, macro_base_period) = y0(node_macro) - i0(node_macro) - c0(node_macro) ;

$IFTHEN %MACRO_CONCURRENT% == "0"

Expand Down
Binary file added new_model_description.pdf
Binary file not shown.
Loading