iiasa / iiasa/message_ix

MACRO runs after MESSAGE scenario solves "optimal with unscaled inf."

Open
#337 11 comments 0 reactions 0 assignees View on GitHub
macro
Dominant language
Jupyter Notebook
Stars
150
Forks
178
Avg merge
17h 32m
Merged PRs (30d)
2

Description

After CPLEX finishes optimization of a scenario, with a status "optimal with unscaled infeasibilities", which with MESSAGE standalone would return an error (?), MACRO will still run and possibly even "converge". This will return an error after macro completes "successfully".

```
--- MESSAGE-MACRO_run.gms(5072) 631 Mb
--- GDX File c:\repo\message_ix\message_ix\model\output\MsgOutput_ENGAGE_SSP2_v4_EN_NPi2020_1200_step1.gdx
--- MESSAGE-MACRO_run.gms(5080) 631 Mb
+++ End of MESSAGEix-MACRO run - have a nice day! +++
*** Status: Normal completion
--- Job MESSAGE-MACRO_run.gms Stop 04/18/20 09:47:15 elapsed 0:20:53.408
2020-04-18 09:47:15,442 DEBUG at.ac.iiasa.ixmp.database.DbDAO:2041 - loading elements for set 'map_temporal_hierarchy' from database...
2020-04-18 09:47:15,446 DEBUG at.ac.iiasa.ixmp.database.DbDAO:2041 - loading elements for parameter 'duration_time' from database...
2020-04-18 09:47:15,486 DEBUG at.ac.iiasa.ixmp.objects.TimeSeries:109 - Cleaning cache...
2020-04-18 09:47:15,486 DEBUG at.ac.iiasa.ixmp.objects.TimeSeries:109 - Cleaning cache...
--- Warning: The GAMS version [24.9.1] differs from the API version [24.8.3].
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\Scripts\mix-data-script.py", line 11, in
load_entry_point('message-data', 'console_scripts', 'mix-data')()
File "C:\ProgramData\Anaconda3\lib\site-packages\click\core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\click\core.py", line 717, in main
rv = self.invoke(ctx)
File "C:\ProgramData\Anaconda3\lib\site-packages\click\core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\ProgramData\Anaconda3\lib\site-packages\click\core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\ProgramData\Anaconda3\lib\site-packages\click\core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\ProgramData\Anaconda3\lib\site-packages\click\core.py", line 555, in invoke
return callback(*args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\click\decorators.py", line 27, in new_func
return f(get_current_context().obj, *args, **kwargs)
File "c:\repo\message_data_clean_test_rep\message_data\projects\engage\__init__.py", line 73, in run
main(context)
File "c:\repo\message_data_clean_test_rep\message_data\projects\engage\runscript_main.py", line 120, in main
low_dem_scen='npi_low_dem_scen')
File "c:\repo\message_data_clean_test_rep\message_data\projects\engage\scenario_runner.py", line 342, in run
self.solve(rep_scen_name, copy_demands=True)
File "c:\repo\message_data_clean_test_rep\message_data\projects\engage\scenario_runner.py", line 247, in solve
var_list=['I', 'C', 'GDP'])
File "c:\repo\message_ix\message_ix\core.py", line 437, in solve
super().solve(model=model, solve_options=solve_options, **kwargs)
File "c:\repo\ixmp\ixmp\core.py", line 1490, in solve
model.run(self)
File "c:\repo\message_ix\message_ix\models.py", line 100, in run
result = super().run(scenario)
File "c:\repo\ixmp\ixmp\model\gams.py", line 154, in run
var_list=as_str_list(self.var_list) or [],
File "c:\repo\ixmp\ixmp\backend\jdbc.py", line 353, in read_file
self.jindex[ts].readSolutionFromGDX(*args)
jpype._jclass.IxException: at.ac.iiasa.ixmp.exceptions.IxException: This Scenario is not checked out - no changes to discard!
2020-04-18 09:47:15,634 INFO at.ac.iiasa.ixmp.Platform:157 - closed the connection to database 'jdbc:oracle:thin:@gp3.iiasa.ac.at:1521:GP3'
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported CPLEX/MESSAGE-MACRO run and trace scenario_runner.py through message_ix/core.py, message_ix/models.py, and ixmp/model/gams.py. Inspect how the solver result is propagated after an “optimal with unscaled infeasibilities” status. Done means the invalid status is handled before MACRO continues and the resulting error is verified by a regression check.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.