如何静默 cvxopt 求解器 [Python]? [英] How to silent cvxopt solver [Python]?
本文介绍了如何静默 cvxopt 求解器 [Python]?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
每当我在终端中运行 Python cvsopt 求解器时,它都会打印:
Whenever I run Python cvsopt solver in terminal, it will print:
pcost dcost gap pres dres
0: -8.0742e+00 -7.3715e+00 3e+03 5e+01 4e-15
1: -6.6241e-01 -7.2834e+00 7e+01 1e+00 3e-15
......
Optimal solution found.
我可以忽略这条消息吗?谢谢!
Can I silent this message? Thank you!
推荐答案
只需在调用求解器之前添加以下行:
Just add the following line before calling the solvers:
solvers.options['show_progress'] = False
这篇关于如何静默 cvxopt 求解器 [Python]?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文