有没有办法使用CPLEX ILOG音乐会在C#中初始化二进制变量

发布于 2025-01-25 18:22:43 字数 428 浏览 0 评论 0原文

整个CPLEX ILOG音乐会API用户的新手在这里试图弄清楚如何实现 a>进入C#代码。

我试图实例化一个变量:

INumExpr[,] x = new INumExpr[vVehicles.Length,rCustomerNodes.Length] ;

INumExpr[,,] y = new INumExpr[vVehicles.Length, rCustomerNodes.Length, rCustomerNodes.Length];

作为初始化决策变量的一种方式,但我也想将Inumexpr作为布尔数组,而我不知道该怎么做?

请帮忙..谢谢:)

A newbie to the the whole CPLEX ILOG Concert API user here who is trying to figure out how to implement this into a C# code.

I have tried to instantiate a variable as this:

INumExpr[,] x = new INumExpr[vVehicles.Length,rCustomerNodes.Length] ;

INumExpr[,,] y = new INumExpr[vVehicles.Length, rCustomerNodes.Length, rCustomerNodes.Length];

As a way to initialise the decision variables as such, but I also want to make the INumExpr as a boolean array and I dont know how to do that?

Please help .. Thanks :)

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

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

发布评论

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

评论(1

天荒地未老 2025-02-01 18:22:43

inumvar [] open = cplex.boolvararray(nblocations);

在示例设施中

INumVar[] open = cplex.BoolVarArray(nbLocations);

In the example Facility.cs in CPLEX_Studio221\cplex\examples\src\cs

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