Replies: 5 comments
-
@tianyu-z There is a python version of gcam that we work with called pygcam- https://github.com/JGCRI/pygcam. It was created to do things like MCMC analysis using GCAM. Perhaps you could take a look there since there may be code already available for porting GCAM equations to python. Also adding pygcam creator @rjplevin here. |
Beta Was this translation helpful? Give feedback.
-
Thanks, Kanishka. Correction though. Pygcam is not a version of GCAM. It’s a tool for working with GCAM. It would not be helpful with implementing any equations.On May 21, 2023, at 7:25 PM, Kanishka Narayan ***@***.***> wrote:
@tianyu-z There is a python version of gcam that we work with called pygcam- https://github.com/JGCRI/pygcam. It was created to do things like MCMC analysis using GCAM. Perhaps you could take a look there since there may be code already available for porting GCAM equations to python. Also adding pygcam creator @rjplevin here.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
(Moving to discussions as this is not really an issue) Without knowing the details of what you are interested in doing it is hard to give specific advice. Are you looking to parameterize many instances of GCAM to be individual agents? Or are you looking to replace components within GCAM and swap out the macro-economic representation with a more detailed agent based model? To directly answer your question, you can find an "equations" section in the "supply" and "demand" sections of the main documentation: And of course all of the code is open source. There isn't a fully complete design document that stitches together all of these bits of information. Somewhat similar to @kanishkan91 suggestion. You may want to take a look at https://github.com/JGCRI/gcamwrapper. This allows you to create and control instances of GCAM from Python (or R) including retrieving arbitrary data, changing arbitrary parameters, and controlling when to run GCAM's time steps (where repeatedly updating a parameter and re-running is the major benefit here). This could be useful if you want to control many instance of GCAM and have them interact in some way. It can also be useful for "soft coupling" models. If instead you are looking to replace components within GCAM, some development will be needed on your end. Although, even here re-writing all of GCAM may not be necessary. It is fairly easy to call C++ code from Python code from and vice-versa, this might be a more fruitful approach. |
Beta Was this translation helpful? Give feedback.
-
Just a general comment, re-creating a full version of GCAM in Python would probably be many, many person-years of work. Its not a simple model - the equations are often not complex, but the complexity comes from the many sectors (and modules) and how they interact. It would be an interesting project, but the tools mentioned above may allow you to achieve your goals without re-creating the entire model, and do so in a manner that would allow you to easily use newer versions of GCAM as they are released. That being said, re-creating the behavior of a specific sector of GCAM is more tractable, but re-creating the entire model would be a very large task. |
Beta Was this translation helpful? Give feedback.
-
I understand this will be a lot of work. However, I think that's something have to do because to let AI intervene and make decisions, we will have to modify the fundamental logics of GCAM a bit (e.g. what kind of actions should be taken by MARL agents). Thus, the python implementation will not only be a translation from C++ to python, but also translate GCAM a pure IAM to a half-IAM-half-MARL standard gym environment. It would be great if there are materials about the dynamics of different modules, please feel free to share it. Thank you very much! |
Beta Was this translation helpful? Give feedback.
-
I would like to implement a full python version of GCAM so that it is more friendly to MARL (multiagent reinforcement learning) community. Where can I find some technical documents of the equations and dynamics of different module in v6.0? Thank you!
Beta Was this translation helpful? Give feedback.
All reactions