Pass user-defined parameter to MACRO #611
-
|
Dear developer, I am wondering if it is possible to pass a user-specific parameter (e.g., maxloop=500 or similar constant parameters) into macro explicitly from the Jupyter notebook, instead of making changes from GAMS? Thanks very much, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hi Emily—thanks for the question! Yes, this is supported. Please have a look at the following:
I hope that helps! Please mark the answer ✅ if it covered your initial question, and either add a reply or start a new thread if you have others. |
Beta Was this translation helpful? Give feedback.
Hi Emily—thanks for the question!
Yes, this is supported. Please have a look at the following:
Scenario.init_scalar()or perhaps.init_par()—these methods allow to define a new 0-d or 1+-dimensional parameter, like your "maxloop", so that data can then be stored with.change_scalar()or.add_par(), respectively.scenario.solve()is called, all data (sets and parameters) are written to GDX file. This will include your newly-defined one.message_ix/message_ix/model/MACRO/macro_data_load.gms
Lines 12…