2
votes

I am solving MINLP problems with pyomo ver. 5.5.6. The solver that I am currently using is couenne 0.5.6. It is the downloaded executable for macOS.

I read that it is possible to change some options (e.g. constraint feasibility tolerance etc). However, I dont know how to access these options for Couenne.

I already tried to access the options inside the python script in the form of

solver=SolverFactory('couenne')
solver.options['feas_tolerance'] = value
results=solver.solve(instance)

This however does not work, because the keyword 'feas_tolerance' is not known. However, everywhere I look it is defined as that one.

If I however specify a keyword of the Ipopt solver that couenne uses it works. So something like the following is no problem:

solver=SolverFactory('couenne')
solver.options['tol'] = value
results=solver.solve(instance)

I also read, that is possible to save a couenne.opt file somewhere. Regarding this approach I read different answers on wher to save the file. I tried to save it in the path where the executable of couenne is and also in the path of my scripts that I am trying to run. Nothing worked in this case.

My question now is:

Is is possible to access the options of couenne directly from a python script ? And if not, where do I have to save the couenne.opt file ? Also what I wandered if this problem occurs because I am using the downloaded executable-file, which I am doing because I had some major trouble with installing the binary files.

1
You are unable to place couenne.opt in the correct location because Pyomo creates a temporary folder as the working directory when invoking couenne. I don't recall the correct command to retrieve this directory. - Qi Chen
Thank you for your comment. So basically I have to find out where where this directory is created and how to access this directly / place something in this location. Or did I understand that wrong ? - PhilippK

1 Answers

1
votes

I finally found out what my problem was:

The couenne.optfile has to be saved in the directory in which the python script is in which you are working. Also my problem was that I saved the file by mistake as Couenne.opt. Case sensitivity is important in this case.