How to constrain the overall renewable share for all nodes? #875
-
Dear support team and everyone, I met a question which is slimilar to #845 I need to add a constraint on the overall renewable share of all nodes. I use the set Specifically, I assigned two spatial levels in my model, as you can see in the following code:
where Refering to https://github.com/iiasa/message_ix/blob/main/tutorial/westeros/westeros_share_constraint.ipynb, I could add constraints on a single node, take Chongqing for example, the code is as follows:
With these setting, I can observe that the renewable share in To constrain the overall renewable share in China, I substituted every Thank you very much for your reading and answering! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Hi @MiaoCheng0517, thanks for this question :) |
Beta Was this translation helpful? Give feedback.
-
@MiaoCheng0517, it is hard for us to know what precisely is happening and provide advice without knowing the exact contents/structure of the model you have built. However, it is possible to make some guesses. My guess here is you are (reasonably) expecting a feature that the GAMS implementation of MESSAGE does not have. In particular, you put constraints on technologies that output to (that is: have
These technologies are in two groups called This activates the equation called Then, you change to n="China". Separately, you have used Two key points here:
In other words, because of (1), your model does not output anything to (n=China), and so the constraints have no effect. Let's please confirm this is a correct understanding of your situation. After that, we can talk about how to achieve what you intend. |
Beta Was this translation helpful? Give feedback.
Thanks for jumping in here, @khaeru. I have to say, though: I was also just studying the docs and this exact GAMS code and would not have arrived at your conclusions. In my view, this equation is not well documented, in particular, I don't see any documentation of the required
map_shares_commodity_total
andmap_shares_commodity_share
. So I, for one, don't understand why you can specifynode_share
andnode
and what these mean in this context. From our docs, "The implementation is generic and flexible, so that any combination of commodities, levels, technologies and nodes can be put in relation to any other combination" makes it sound like our code can handle the desired use case here. My i…