Pyomo + Couenne: Infeasibility results in Exception?

381 views
Skip to first unread message

sascha...@gmail.com

unread,
Nov 20, 2015, 9:11:50 AM11/20/15
to Pyomo Forum
Hi,

i'm trying to use Pyomo + Couenne to solve MINLP-problems.

After implementing my constraints, ready to debug, the following behaviour surprised me:

Code:

self.opt = SolverFactory('couenne')
self.m = ConcreteModel()
...
...
print('Solve')
self.opt.solve(self.m)
print('Finished solving')
(Check result state here...)



But the program never reaches the second print, because the following exception is happening:


Solve
Traceback (most recent call last):
  File "X.py", line 601, in <module>
    result = opt.solve_model()
  File "X.py", line 494, in solve_model
    self.opt.solve(self.m)
  File "C:\Miniconda3_64\lib\site-packages\pyomo\opt\base\solvers.py", line 578, in solve
    result = self._postsolve()
  File "C:\Miniconda3_64\lib\site-packages\pyomo\solvers\plugins\solvers\ASL.py", line 202, in _postsolve
    return SystemCallSolver._postsolve(self)
  File "C:\Miniconda3_64\lib\site-packages\pyomo\opt\solver\shellcmd.py", line 161, in _postsolve
    results = self.process_output(self._rc)
  File "C:\Miniconda3_64\lib\site-packages\pyomo\opt\solver\shellcmd.py", line 239, in process_output
    suffixes=self._suffixes)
  File "C:\Miniconda3_64\lib\site-packages\pyomo\opt\plugins\sol.py", line 79, in __call__
    raise ValueError(msg)
ValueError: Error reading "C:\Users\X\AppData\Local\Temp\tmpdewalm5n.pyomo.sol": no Options line found.
SOL File Output:

 Couenne (C:\Users\X\AppData\Local\Temp\tmpdewalm5n.pyomo.nl May 18 2015): Infeasible

Options
3
0
1
0
238
0
86
0
objno 0 220

What is happening? Pyomo should not raise an exception just because the problem is infeasible, right? My code neaver reaches the part where these result-states may be checked!

My environment:
Pyomo (4.2.10784)
pyomo.extras (2.0)

Python 3.4.3 (64-bit) @ Win7


Thanks!
Sascha

Gabriel Hackebeil

unread,
Nov 20, 2015, 1:54:17 PM11/20/15
to Pyomo Forum
Would you mind sending me a copy a sol file the causes that error? Our SOL file parser might just need a little tweaking.

Gabe

--
You received this message because you are subscribed to the Google Groups "Pyomo Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyomo-forum...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gabriel Hackebeil

unread,
Nov 25, 2015, 12:34:04 PM11/25/15
to Pyomo Forum
Sascha,

Thanks for sending me the solver files. The SOL file that you sent had some subtle whitespace differences on the first line that caused our SOL file parser to fail. I’ve fixed the issue on Pyomo trunk. If you can’t install trunk then you can try manually adding line 52 and 53 from this file: https://software.sandia.gov/trac/pyomo/browser/pyomo/trunk/pyomo/opt/plugins/sol.py?rev=10903.

Gabe
Reply all
Reply to author
Forward
0 new messages