有什么方法可以返回PYOMO中解决模型的主动约束?

发布于 2025-02-07 04:38:25 字数 34 浏览 1 评论 0原文

使用成功解决的具体模型。有什么方法可以检索主动约束吗?

Using a concrete model that successfully solves. Is there any way to retrieve the ACTIVE constraints?

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

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

发布评论

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

评论(1

狠疯拽 2025-02-14 04:38:25

“ Active”有点棘手,因为从技术上讲,这是求解器的内部状态(大多数求解器都不报告)。您可以通过该方法获得合理的主动约束近似值:

pyomo.util.infeasible.log_close_to_bounds()

...或查看该方法在做什么(仅是40行代码),并实现对您的用例的特定内容。

"Active" is a bit tricky, as that is technically an internal state of the solver (that most solvers don't report). You can get a reasonable approximation of active constraints with the method:

pyomo.util.infeasible.log_close_to_bounds()

...or look at what that method is doing (it's only 40 lines of code) and implement something specific to your use case.

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