How to extend the code to more commodities and regions

100 views
Skip to first unread message

Stefano Verzeri

unread,
May 9, 2018, 12:50:58 PM5/9/18
to message_ix
Dear message_ix community,

I am trying to modify the message_ix code of Austria to make an assessment of East Africa possible future scenarios.
I am having lots of issues in doing it since I do not know how it works in the background in GAMS. 

If someone can kindly help me with these:
  • I would like to add more regions in the "node" set, but I don't know if the architecture of the code behind allows me to do that, especially because I don't know how to deal them in the following definitions of the dataframes in the parameters' sections.
  • Is it possible to define two parallel grids inside the code that are optimized differently with a different set of plants?
Thank you in advance to anyone who can give me a hint.
Looking forward to it.

Kind regards,
Stefano 

HUPPMANN Daniel

unread,
May 11, 2018, 1:52:39 AM5/11/18
to Stefano Verzeri, message_ix
Hi Stefano,

Thanks for your interest in using MESSAGEix, and apologies that it is not yet as well documented as we would like.

Re multiple nodes - of course this is possible. What you need to do is:
- add multiple elements to the set `node`
- add each entry to the spatial-hierarchy mapping using `scenario.add_set("map_spatial_hierarchy", ["country", country, "World“])` for each node=country
- then, you’ll need to define each technology to be present at each node

Re parallel grids: yes, the energy system can include multiple parallel grids, like an electricity grid and a pipeline network. You just need to make sure that when defining the input/output parameters for each technology, you specify that each technology is „connected“ to the right commodity/level combination. So all power plants would have an output going into „electricity/secondary“, whereas a local gas works plant would produce its output for a level such as „gas/final“.

On trade: to implement trade between nodes, you need to combine the two aspects above and define a technology that is located at either node-1 or node-2 (column `node_loc` in the parameter dataframes) and has different `node_dest` vs. `node_origin` entries in the input/output parameter dataframes. So the technology takes from one node and generates (usually the same commodity/level) at a different node. The input/output efficiency can include losses during long-distance transmission.

We have on our agenda for this summer to improve and extend the tutorials, and I’ll add a „two-country example“ to the to-do list. Or if you want to pull-request your work as a tutorial to the master MESSAGEix version, that would be even better!

Best of luck!
Daniel
> --
> You received this message because you are subscribed to the Google Groups "message_ix" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to message_ix+...@googlegroups.com.
> To post to this group, send email to messa...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/message_ix/6961de4f-f9e3-4232-8036-3d8e9d1e38b6%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Stefano Verzeri

unread,
May 16, 2018, 6:54:27 AM5/16/18
to message_ix
Dear Daniel,

Thank you very much for your reply and explanations. I managed to develop a model involving three regions and it works. I need to test it changing the data according to the countries I am investigating.

Kind regards,
Stefano
Reply all
Reply to author
Forward
0 new messages