문제

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."}

Is there a better solver that is efficient and can accept more than 1000 variables that could work in Visual Studio IDE? Thanks.

도움이 되었습니까?

해결책

Not sure what you mean exactly by: the solver "could work in 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. 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.

다른 팁

Hans Mittelmann's benchmarks provide comparison of several LP solvers. If you are looking for high-performance free solvers than I recommend CLP or IPOPT. They both have interfaces in C++ so there should be no problems using them from Visual C++. Good commercial solvers are CPLEX and Gurobi.

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.

The Solver Foundation appears to have been abandoned - I doubt if we will see any new versions of it. 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. Search for "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.

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. Taking the dual shouldn't be too hard to automate.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top