Pyomo / pyomo

An object-oriented algebraic modeling language in Python for structured optimization problems.
https://www.pyomo.org
Other
2.01k stars 518 forks source link

keepfiles=True prints outputs directly without logs #2674

Closed bdrum closed 1 year ago

bdrum commented 1 year ago

Hi guys.

First of all, I'd like to thank you for the framework from my side it's brilliant.

I've faced with a problem that occurres when I use solve method with 'cplex' solver. It creates temporary files and in case keepfile=True generates output directly via print function: https://github.com/Pyomo/pyomo/blob/31192366f1009ca2cdfe14b4ec60386ad422675d/pyomo/solvers/plugins/solvers/CPLEX.py#L470 So, I can't supress it. I suppose that it should be via logger or one more special flag.

emma58 commented 1 year ago

This is a very good point, and a specific case of #296. (So closing it as a duplicate)