-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP - do not merge - MACRO py test #152
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a first round of comments
message_ix/macro.py
Outdated
# running MACRO standalone | ||
if not new.has_set("node"): | ||
new.init_set("node") | ||
for node in dict['region_list']: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would think that all elements of region_list
must be in node
, so this can be removed.
However, it would be nice to have macro_regions
as an optional argument, defaulting to 'all regions except World
if None
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure how this "running MACRO standalone" thing is supposed to work so I am not sure what the impact of removing this would be. Should I still simply remove it?
I now introduced a kwarg macro_regions
and changed the code to:
for node in dict['region_list']: | |
for node in macro_regions: | |
new.add_set("node", node) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@behnam2015 says he never needed that to get started, so let’s remove this feature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danielhuppmann, you suggest we delete all regular "MESSAGE sets" (i.e.: node
, cat_node
, year
, cat_year
and commodity
) from the MACRO_SPECS['sets']
?
# set of MACRO base year | ||
if not new.has_set("type_year"): | ||
new.init_set("type_year") | ||
new.add_set("type_year", "baseyear_macro") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if we still need this for the GAMS code to work
MACRO.py läuft jetzt durch und ist feasible
['prfconst', ['node', 'sector', ], ], | ||
['grow', ['node', 'year', ], ], | ||
['aeei', ['node', 'sector', 'year', ], ], | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E123 closing bracket does not match indentation of opening bracket's line
['EC', ['node', 'year', ], ], | ||
['grow_calibrate', ['node', 'year', ], ], | ||
['aeei_calibrate', ['node', 'sector', 'year', ], ], | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E123 closing bracket does not match indentation of opening bracket's line
], | ||
'equs': [ | ||
['COST_ACCOUNTING_NODAL', ['node', 'year', ], ] | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E123 closing bracket does not match indentation of opening bracket's line
["cat_year", ["type_year", "year", ], ], | ||
["commodity", ], ['level', ], ["sector", ], | ||
["mapping_macro_sector", | ||
["sector", "commodity", "level", ], ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E128 continuation line under-indented for visual indent
["commodity", ], ['level', ], ["sector", ], | ||
["mapping_macro_sector", | ||
["sector", "commodity", "level", ], ], | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E126 continuation line over-indented for hanging indent
["mapping_macro_sector", | ||
["sector", "commodity", "level", ], ], | ||
], | ||
'pars': [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E128 continuation line under-indented for visual indent
i0 = k0 * (data['growth'].loc[data['firstmodelyear']] + data['depr']) | ||
|
||
|
||
# production function coefficients for capital, labor (aconst) and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E303 too many blank lines (2)
|
||
# production function coefficient of capital and labor | ||
for node in data['region_list']: | ||
new.add_par("lakl", aconst.loc[aconst.node==node], "-") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E225 missing whitespace around operator
Hi! I recently updated our CI. Could you please rebase this branch on iiasa/master to get the new changes in? Thanks! |
hi folks, I'm trying to do an open PR clean up. what's the status of this one? should it stay open? |
Closing in favor of #223 |
No description provided.