Hi Jasper,
Thank you for raising all these great questions!
At the moment, we only import the most relevant variables and equations from the solution to the platform and database instance. But you can easily import additional parts of the solution.
You have to do two things:
- First, you have to tell the scenario in the ixmp instance that this variable or equation exists. In you case,
scenario.init_equ('CAPACITY_CONSTRAINT',
idx_sets=['node', 'technology', 'year', 'year', 'time'],
idx_names=['node_loc', 'technology', 'year_vtg', 'year_act', 'time'])
I followed the convention we use for all technology-related parameters and variables in the naming of the index here.
- Second, you have to tell the platform to read that additional variable from the solution. The `solve()` function does three things: export to gdx, call GAMS, read the solution. For a MESSAGE-scheme scenario, this only imports the default variables and equations. But you can just “re-read” the solution and tell ixmp to import the additional equation as well:
scenario.read_sol_from_gdx(<path>, <gdx_file_name>, equ_list=['CAPACITY_CONSTRAINT'])
- Then, you can retrieve that equation-solution just as any other parameter or variable using
scenario.equ('CAPACITY_CONSTRAINT')
I hope this is helpful for you!
Best of luck,
Daniel
PS: I just generated an issue on GitHub to add an easier method here, namely just calling
scenario.solve ('MESSAGE', equ_list=['CAPACITY_CONSTRAINT'])
--
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/3c6c277d-ce7c-4826-90be-e0c2fb34e969%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.