Hello,
My research on the internet brought me to the conclusion that it is not possible to completely turn off the print logs on bonmin. Instead, I overwrite the standard output in Python to turn off the print logs on the terminal right before and after solving the nlp problem (based on the answer in [1]):
def blockPrint():
sys.stdout = open(os.devnull, 'w')
def enablePrint():
sys.stdout = sys.__stdout__
...
blockPrint()
solution = opti.solve()
enablePrint()
If you don't want to turn off that way, there are some CasADi and bonmin parameters that can turn off some of these print outs to a certain level:
opts['print_time'] = 0
opts[args.solver]['print_level'] = 0 # up to 12 level verbosity
opts[args.solver]['sb'] = "yes" # no ipopt banner
opts[args.solver]['bb_log_level'] = 0
opts[args.solver]["nlp_log_level"] = 0
opts[args.solver]["nlp_log_at_root"] = 0
opts[args.solver]["oa_log_level"] = 0
opts[args.solver]["lp_log_level"] = 0
opts[args.solver]["fp_log_level"] = 0
opts[args.solver]["milp_log_level"] = 0
Best Regards
Aygün