简体   繁体   English

Microsoft Solver Foundation变量限制

[英]Microsoft Solver Foundation Variable limitation

Hi I am using Microsoft Solver Foundation to solve Linear Programming problem, but the variable has exceeded 1000, and it prompts following error: {"Model size limit has been exceeded for this version of the product. Please contact Microsoft Corporation for licensing options.\\r\\nLimits: NonzeroLimit = 100000, MipVariableLimit = 2000, MipRowLimit = 2000, MipNonzeroLimit = 10000, CspTermLimit = 25000, Expiration = none."} 您好我正在使用Microsoft Solver Foundation来解决线性编程问题,但该变量已超过1000,并且它会提示以下错误:{“此版本的产品已超出模型大小限制。请与Microsoft Corporation联系以获取许可选项。\\ r \\ nLimits:NonzeroLimit = 100000,MipVariableLimit = 2000,MipRowLimit = 2000,MipNonzeroLimit = 10000,CspTermLimit = 25000,Expiration = none。“}

Is there a better solver that is efficient and can accept more than 1000 variables that could work in Visual Studio IDE? 有没有更好的求解器是有效的,可以接受1000多个可以在Visual Studio IDE中使用的变量? Thanks. 谢谢。

Not sure what you mean exactly by: the solver "could work in Visual Studio IDE?" 不确定你的意思是:解算器“可以在Visual Studio IDE中工作吗?”

However, if you want a large-scale (open-source) LP solver with a functional C# interface, I would recommend lp_solve , downloads are here . 但是,如果你想要一个带有功能C#接口的大规模(开源)LP求解器,我会推荐lp_solve ,下载就在这里 The solver is written in C/C++, but there is a comprehensive and easy-to-use C# wrapper which uses P/Invoke to call the various lpsolve methods. 求解器是用C / C ++编写的,但是有一个全面且易于使用的C#包装器,它使用P / Invoke来调用各种lpsolve方法。

Hans Mittelmann's benchmarks provide comparison of several LP solvers. Hans Mittelmann的基准测试提供了几种LP求解器的比较。 If you are looking for high-performance free solvers than I recommend CLP or IPOPT . 如果您正在寻找高性能的免费解算器而不是我推荐的CLPIPOPT They both have interfaces in C++ so there should be no problems using them from Visual C++. 它们都具有C ++接口,因此从Visual C ++中使用它们应该没有问题。 Good commercial solvers are CPLEX and Gurobi . 良好的商业解决方案是CPLEXGurobi

As mentioned by Marc Gravell, you could buy the enterprise version of Microsoft Solver Foundation that is not limited, but note however that it is discontinued . 正如Marc Gravell所提到的,您可以购买不受限制的Microsoft Solver Foundation企业版,但请注意它已停止使用

The Solver Foundation appears to have been abandoned - I doubt if we will see any new versions of it. Solver Foundation似乎已被抛弃 - 我怀疑我们是否会看到它的任何新版本。 The variable limit is too small for many problems. 变量限制对于许多问题来说太小了。 I found Google OR Tools to be useful - they have put .NET wrappers around the GLPK and CBC solvers (among others), and have released it as source code. 我发现Google OR Tools很有用 - 他们将.NET包装器放在GLPK和CBC求解器(以及其他)之间,并将其作为源代码发布。 Search for "Google OR Tools". 搜索“Google OR Tools”。 These solvers are not as fast as commercial solvers (see benchmarks linked in vitaut post above) - but commercial solvers are usually priced in the £6-12k price range. 这些求解器并不像商业求解器那么快(参见上面关于vitaut帖子的基准) - 但商业求解器的价格通常在6-12,000英镑左右。

I don't know how many constraints you currently have, but (if you have less than 1000 constraints) you can take the dual and have 1000 constraints instead of variables then still use your current Microsoft Solver Foundation version. 我不知道您目前有多少约束,但是(如果您的约束少于1000个)您可以采用双重约束而不是变量,然后仍然使用您当前的Microsoft Solver Foundation版本。 Taking the dual shouldn't be too hard to automate. 采取双重不应该太难自动化。

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

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