I have a QP that I solve with MOSEK and CVX. The solutions are quite bad, and I get the sense that either Mosek is not trying hard, or CVX is not transmitting information properly to Mosek, or something of that sort.
What are my options to make MOSEK run as hard as it can to solve the QP with the CVX interface? This is all in Matlab.
Related
Is there any maximum limit for decision variables in scipy linear programming module (minimization) in python? If so, Can it be extended the number of decision variables to 10000? If scipy is limited to number of decision variables, Is there any other software which can be installed in python so that I can proceed with?
The original scipy Simplex LP solver was only for very small problems. The newer scipy Interior Point solver can handle larger problems more reliably. Also make sure to pass on A_eq and/or A_ub as sparse matrices. If you don't do this you may run out of memory.
Having said this, I would be more comfortable with LP solvers that have seen more large, sparse problems than scipy. Most LP solvers have a Python interface.
Finally, larger problems are often (but not always) more complex and it may help to use a modeling tool. This will allow you to express the problem in a more natural way than using matrices. For Python there is PuLP and Pyomo (among others). Some commercial solvers also provide excellent modeling tools.
I am developing a small kinetic Monte Carlo code to study atomic evolutions in a material and need to solve several linear and non-linear equations with a high accuracy. My main issue is in finding complex roots of a non-linear equation.
Which C++ library is perfect for solving a non-linear set of equations with complex roots? I am already using Eigen and Ceres in my codes, but it seems that they only can find "real" roots and not "complex" ones.
All recommendations and ideas are appreciated in advance.
Update-1:
For example, Eigen provides a nonlinear optimization module,
https://eigen.tuxfamily.org/dox/unsupported/group__NonLinearOptimization__Module.html
which uses (1)Levenberg Marquardt algorithm and (2)Powell hybrid "dogleg" method to find roots and extremums of a nonlinear set of equations. As far as I know, these methods can't find complex roots if any.
I have been trying to write a MILP in Matlab. I am using gurobi solver interfaced with Matlab.
It seems solver has found a heuristic optimal solution but does not stop the iterations and keep looking for it. I am posting the screenshot of the process.
Can anyone tell me, how to write a stopping criteria of gurobi in Matlab? I've tried to look through the documentation of gurobi, but it didn't help me much.
Even though Gurobi may have found the optimal solution very quickly, it does not know yet it is optimal. Only after the gap % has become zero we are sure there are no better integer solutions. You can set a gap tolerance (parameter mipgap), but for proven optimal solutions you need to leave it at (close to) zero.
I am using CPLEX for MATLAB toolbox wherein I formulate my MILP as a huge matrix and use the function cplexmilp to call the solver. Since the model I am solving is really huge, I intend to set the option of using multiple processors to speed up the solving of the MILP. I went through the manual but I could not find any specific solution for my case. I'd be grateful if anyone could help me find a solution to this issue.
CPLEX Toolbox Function
Thanks Everyone
I'm using MATLAB 2010b 64bit and its cplex integration to solve an engineering problem. 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. You can see a similar post here.
Then I tried to use MATLAB linprog from the optimization toolbox but the result was disappointing. The running time of the algorithm for a small problem instance was increased from 80 cpu sec to 2600 cpu sec.
Now, I need an LP solver integration to MATLAB which is similar to CPLEX or linprog. By "similar" I mean the way it accepts data input in the form (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. 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? 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. Certainly the free solvers will be very much slower than cplex for any large problem.
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. For pure LP problems, it seems to be slightly slower compared to CPlex but this can be due to the way I use Gurobi. Someone may find Gurobi faster compared to CPlex. 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] : http://www.statistik.tuwien.ac.at/forschung/CS/CS-2012-1complete.pdf