哪种CBC选项放宽了完整性要求(使用PYOMO)

发布于 2025-01-20 19:28:53 字数 116 浏览 0 评论 0原文

我正在使用PYOMO使用CBC求解器,在求解特定模型时,我无法在指定的时间限制内获得整数解决方案。

是否可以将可以放松的完整性要求传递给CBC?我注意到CBC有很多选择,但是我不确定我们应该使用哪种选择。

I am using the CBC solver with Pyomo and I have been not been able to get an integer solution within the specified time limit when solving a particular model.

Is there an option to pass to CBC that can relax the integrality requirements? I notice that CBC has a huge number of options, but I am not sure which is the one that we should use for this.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

亚希 2025-01-27 19:28:53

对于整数可行性,您可以使用选项integerTolerance在cbc接口的pyomo中放松这种可行性。 CBC 中的默认容差为 1E-7:

model = pyo.ConcreteModel()
#...Your whole model
solver = pyo.SolverFactory('cbc')
solver.solve(model, tee=True, options={'integerTolerance':1E-3})

在打印的信息中,您应该看到一些消息,例如:

...integerTolerance was changed from 1e-07 to 0.001

For integer feasibility you can relax such feasibility in pyomo in the cbc interface using the option integerTolerance. Default tolerance is 1E-7 in CBC:

model = pyo.ConcreteModel()
#...Your whole model
solver = pyo.SolverFactory('cbc')
solver.solve(model, tee=True, options={'integerTolerance':1E-3})

In the printed info you should se some message like:

...integerTolerance was changed from 1e-07 to 0.001
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文