简体   繁体   English

适用于MATLAB的线性编程求解器,类似于cplexlp或linprog

[英]Linear Programming Solver for MATLAB, similar to cplexlp or linprog

I'm using MATLAB 2010b 64bit and its cplex integration to solve an engineering problem. 我正在使用MATLAB 2010b 64位及其cplex集成来解决工程问题。 However, because of the memory leak of cplex, memory usage exceeds acceptable limits with cplex (100+GBs including virtual memory) hence I am not able to solve my problem. 但是,由于cplex的内存泄漏,cplex的内存使用量超出了可接受的限制(包括虚拟内存的100 + GB),因此我无法解决我的问题。 You can see a similar post here . 您可以在此处看到类似的帖子。

Then I tried to use MATLAB linprog from the optimization toolbox but the result was disappointing. 然后,我尝试从优化工具箱中使用MATLAB linprog ,但结果令人失望。 The running time of the algorithm for a small problem instance was increased from 80 cpu sec to 2600 cpu sec. 一个小问题实例的算法运行时间从80 cpu sec增加到2600 cpu sec。

Now, I need an LP solver integration to MATLAB which is similar to CPLEX or linprog . 现在,我需要将LP解算器集成到MATLAB中,类似于CPLEX或linprog By "similar" I mean the way it accepts data input in the form (F, A, B, Aeq, Beq, ...etc) . “相似”是指它接受格式(F, A, B, Aeq, Beq, ...etc)数据输入的方式。

I must be able to use it in loops. 我必须能够在循环中使用它。 Do you have any suggestions for that? 您对此有何建议?

I would be very surprised if there was a memory leak in cplex. 如果cplex中发生内存泄漏,我将感到非常惊讶。 If you have a large problem then the memory will grow with any sensible solver. 如果您遇到大问题,那么任何明智的求解器都会增加内存。 Is there perhaps a memory leak in the interface to cplex? cplex的接口中是否可能存在内存泄漏? How big is your problem? 您的问题有多大? Are you running multi threaded as each thread will take a copy of the problem and hence will eat a lot more memory. 您是否正在运行多线程,因为每个线程都会复制一个问题,因此会占用更多内存。

You should not be surprised to find that other solvers take a lot longer than cplex to solve your problem. 您会发现其他求解器比cplex花费更多的时间来解决您的问题,这并不奇怪。 Certainly the free solvers will be very much slower than cplex for any large problem. 当然,对于任何大问题,免费的求解器都将比cplex慢得多。

After some trials to fix MATLAB/CPLex API's memory usage problem (memory leak) and after referring to some studies I decided to switch to Gurobi solver. 经过一些修复MATLAB / CPLex API的内存使用问题(内存泄漏)的尝试,并参考了一些研究后,我决定切换到Gurobi求解器。 For pure LP problems, it seems to be slightly slower compared to CPlex but this can be due to the way I use Gurobi. 对于纯LP问题,它似乎比CPlex慢一些,但这可能是由于我使用Gurobi的方式。 Someone may find Gurobi faster compared to CPlex. 与CPlex相比,有人会发现Gurobi更快。 I suggested that on my previous posts under different questions. 我在以前的帖子中提出了不同的问题。 Here are some academic studies[Analysis of commercial and free and open source solvers for linear optimization problems][1] 这是一些学术研究[针对线性优化问题的商业和自由开源解决方案的分析] [1]

[1] : http://www.statistik.tuwien.ac.at/forschung/CS/CS-2012-1complete.pdf [1]: http//www.statistik.tuwien.ac.at/forschung/CS/CS-2012-1complete.pdf

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM