Replies: 1 comment 5 replies
-
|
message-ix show-versions: click: 8.1.7 iam_units: installed GAMS: 45.1.0 python: 3.10.9 (main, Dec 15 2022, 10:44:50) [Clang 14.0.0 (clang-1400.0.29.202)] |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
westeros_baseline example
run jupyter cell step by step
until
run scenario.solve()
Exception Traceback (most recent call last)
File MsgScenario.java:1317, in at.ac.iiasa.ixmp.objects.MsgScenario.toGDX()
Exception: Java Exception
The above exception was the direct cause of the following exception:
at.ac.iiasa.ixmp.exceptions.IxException Traceback (most recent call last)
Cell In[37], line 1
----> 1 scenario.solve()
File ~/anaconda3/lib/python3.11/site-packages/message_ix/core.py:676, in Scenario.solve(self, model, solve_options, **kwargs)
656 def solve(self, model="MESSAGE", solve_options={}, **kwargs):
657 """Solve MESSAGE or MESSAGE-MACRO for the Scenario.
658
659 By default, :meth:
ixmp.Scenario.solveis called with 'MESSAGE' as the(...)
674 :class:
.GAMSModel.675 """
--> 676 super().solve(model=model, solve_options=solve_options, **kwargs)
File ~/anaconda3/lib/python3.11/site-packages/ixmp/core/scenario.py:836, in Scenario.solve(self, model, callback, cb_kwargs, **model_options)
834 # Iterate until convergence
835 while True:
--> 836 model_obj.run(self)
838 # Store an iteration number to help the callback
839 if not hasattr(self, "iteration"):
File ~/anaconda3/lib/python3.11/site-packages/message_ix/models.py:371, in GAMSModel.run(self, scenario)
368 lines2 = ("{} = {}".format(*kv) for kv in self.cplex_opts.items())
369 optfile2.write_text("\n".join(lines2))
--> 371 result = super().run(scenario)
373 # In previous versions, the
cplex.optfile(s) were removed at this point374 # in the workflow. This has been removed due to issues when running
375 # scenarios asynchronously.
377 return result
File ~/anaconda3/lib/python3.11/site-packages/ixmp/model/gams.py:276, in GAMSModel.run(self, scenario)
272 s_arg = dict(filters=dict(scenario=scenario))
274 try:
275 # Write model data to file
--> 276 scenario.platform._backend.write_file(
277 self.in_file, ItemType.SET | ItemType.PAR, **s_arg
278 )
279 except NotImplementedError: # pragma: no cover
280 # No coverage because there currently is no such Backend that doesn't
281 # support GDX
282
283 # Remove the temporary directory, which should be empty
284 self.remove_temp_dir()
File ~/anaconda3/lib/python3.11/site-packages/ixmp/backend/jdbc.py:580, in JDBCBackend.write_file(self, path, item_type, **kwargs)
577 raise ValueError("write to GDX requires a Scenario object")
579 # include_var_equ=False -> do not include variables/equations in GDX
--> 580 self.jindex[ts].toGDX(str(path.parent), path.name, False)
581 elif path.suffix == ".csv" and item_type is ItemType.TS:
582 models = set(filters.pop("model"))
at.ac.iiasa.ixmp.exceptions.IxException: at.ac.iiasa.ixmp.exceptions.IxException: This Scenario must be checked in before performing this operation!
Beta Was this translation helpful? Give feedback.
All reactions