【发布时间】:2015-05-28 02:07:34
【问题描述】:
我在 CPLEX 中有一个巨大的线性模型,它是用 Microsoft Visual C++ 编写的。
打了cplex.solve()之后,很长一段时间都没有进展。 5 分钟内不会显示任何内容。然后,将显示线程数,并且预求解时间小于 1 秒。所有的行和列都被消除,求解时间小于 1 秒。
我的日志文件如下:
Warning: Output names have been modified to conform to LP format.
Parallel mode: deterministic, using up to 8 threads for concurrent optimization.
Tried aggregator 1 time.
LP Presolve eliminated 283559 rows and 283572 columns.
All rows and columns eliminated.
Presolve time = 0.48 sec. (516.10 ticks)
或者当我在列生成中添加另一列时的其他一个是
Warning: Output names have been modified to conform to LP format.
Parallel mode: deterministic, using up to 8 threads for concurrent optimization.
Iteration log . . .
Iteration: 1 Scaled dual infeas = 224.981132
Iteration: 13 Dual objective = 25519782.182497
Iteration: 3159 Dual objective = 30679377.244649
Barrier solved model.
为什么要花这么长时间才能开始? 那是什么警告?
可以肯定的是,我将模型导出并导入到另一个项目中,解决了,整个过程不到2秒。因此,在这 4 分钟内,它不会进行聚合或预求解。
此外,我使用 CODEXL 检查了性能,发现 dll 中有两个经常使用但我不知道的函数:CPXLkillpnorms、CPXEgeneric_unlock、cplex1261.dll!+0x2627a2
你有什么想法吗?
提前致谢, 迈赫迪
【问题讨论】:
标签: visual-c++ cplex