使用DOCPLEX时是否可以查看约束?

发布于 2025-01-18 06:56:33 字数 153 浏览 1 评论 0原文

我有一个二次模型,我使用docplex编写,并在求解时说它是不可行的。当我检查是否有任何冲突时,它返回0,所以我认为没有任何冲突,但我不知道是什么原因造成了这个问题。我希望能够像在术语(CTRL+G)中一样查看约束。另外,还有其他方法可以使用Python和适当的文档解决二次程序以使其更容易?

I have a quadratic model which I wrote using docplex and when solving it says it is infeasible. When I checked to see if there are any conflicts it returned 0 so I assume there are none but I have no idea what is causing this problem. I want to be able to view the constraints like you can do in LINGO (CTRL+G). Also, is there any other way of solving a quadratic program using python with proper documentation to make it easier?

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

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

发布评论

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

评论(1

墨落画卷 2025-01-25 06:56:33

你也检查过放松吗?
您是否尝试过解决相同的模型但没有目标,然后您会发现目标存在一些问题?

如果模型与您在 分享的模型相同,为什么不我的 CPLEX API 解决了问题吗?您是否尝试过查看放松情况?

使用 CPLEX,您还可以尝试将 OPL 用于二次模型,这可能会导致更容易调试。当你的模型不可行时,冲突和松弛就会直接出现。

have you also checked the relaxations ?
Have you tried to solve the same model but without the objective and then you will see that you have some issues with the objective ?

If the model is the same as the one you shared at Why doesn't my CPLEX API solve the problem? have you tried to have a look at the relaxations ?

With CPLEX you may also try to use OPL for quadratic models which may be easier for debugging. There conflicts and relaxations will directly appear when your model is not feasible.

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