在CPLEX中设置完整性公差,并强迫决策变量采用圆形值

发布于 2025-01-20 17:49:55 字数 260 浏览 0 评论 0原文

我目前正在尝试求解 CPLEX 中的一个线性程序,该程序具有三个决策变量,一个是二元的,另外两个是连续的。

我遇到的问题是,它没有给出“10”或“0”等连续变量的结果,而是将它们设置为“9.99999”和“0.000001”。

因此,通过谷歌搜索,我发现 CPLEX 中有一个名为“完整性容差”的参数可以帮助实现这一目标。问题是,我没有找到如何在 OPL 中实际设置此参数,而只能使用不同的 API。问题是我只使用 CPLEX 来求解我的模型。

有人可以指导我吗?

I am currently trying to solve a linear program in CPLEX that has three decision variables, one which is binary and the other two are continuous.

The problem I have is that instead of giving results for the continuous variables like '10' or '0' it sets them to '9.99999' and '0.000001'.

So with a bit of googling I found out that there is a parameter in CPLEX called Integrality tolerance that helps achieving this goal. The problem is, nowhere have I found how I can actually set this parameter in OPL, but instead only with using different APIs. The thing is I'm only using CPLEX to solve my model.

Can anyone guide me on this?

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

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

发布评论

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

评论(1

客…行舟 2025-01-27 17:49:55

您是否尝试过OPL

execute
{
   cplex.epint=0.0001;
}

在IDE中,您可以使用

”在此处输入图像说明”

have you tried in OPL

execute
{
   cplex.epint=0.0001;
}

?

And in the IDE you can use

enter image description here

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