coin-or / Ipopt

COIN-OR Interior Point Optimizer IPOPT
https://coin-or.github.io/Ipopt
Other
1.36k stars 272 forks source link

Appending to the end of output_file while printing rather than overwirting it #720

Closed zhengzl18 closed 8 months ago

zhengzl18 commented 8 months ago

I wonder if there is a way to append to the end of output_file while printing rather than overwirt it. I'd like to print the outputs of several solvings to one file, but by simply setting output_file, the contents of this file will be overwitten every solving. I have searched for output-related options but found nothing.

svigerske commented 8 months ago

No, there is no option so far. You could create your own version of the FileJournal class that does that, but it should also be possible to add an option that says whether to append or truncate.

zhengzl18 commented 8 months ago

No, there is no option so far. You could create your own version of the FileJournal class that does that, but it should also be possible to add an option that says whether to append or truncate.

THX a lot!