What is the fastest way to solve small linear programs inside a loop?
Hi,
I’m running linprog inside a large time loop to solve small (m,n <=3) linear programs but it is my code’s bottle neck. I found that using Simplex ("Large scale off) instead of interior point in the options makes it a little faster. Is there a faster way to do this? matrix "A" is always small and dense (m,n<=3). I tried TOMLAB’s MINOS and LPOPT and QPOPT but still linprog is faster. I don’t know maybe i’m not using TOMLAB correctly or that they’re just better for large problem sizes.
Is there an easy way to just code a faster LP solver for small problems. For my current problem linprog is taking ~.0012 sec for a single iteration to solve 2*2 problems. I have it inside a nested loop, below is a pseudo code:
for t =1:nt
for n = 1:N
linprog
end
end
So it would be much better to have it to be as fast as say ~0.0005 sec/iteration. I want to do this before attempting to make the inner loop parallel. The outer loop cannot be made parallel because of dependencies (time loop).
I would highly appreciate any help guys because my simulations need to be faster than real-time.
Thanks,
EyasHi,
I’m running linprog inside a large time loop to solve small (m,n <=3) linear programs but it is my code’s bottle neck. I found that using Simplex ("Large scale off) instead of interior point in the options makes it a little faster. Is there a faster way to do this? matrix "A" is always small and dense (m,n<=3). I tried TOMLAB’s MINOS and LPOPT and QPOPT but still linprog is faster. I don’t know maybe i’m not using TOMLAB correctly or that they’re just better for large problem sizes.
Is there an easy way to just code a faster LP solver for small problems. For my current problem linprog is taking ~.0012 sec for a single iteration to solve 2*2 problems. I have it inside a nested loop, below is a pseudo code:
for t =1:nt
for n = 1:N
linprog
end
end
So it would be much better to have it to be as fast as say ~0.0005 sec/iteration. I want to do this before attempting to make the inner loop parallel. The outer loop cannot be made parallel because of dependencies (time loop).
I would highly appreciate any help guys because my simulations need to be faster than real-time.
Thanks,
Eyas Hi,
I’m running linprog inside a large time loop to solve small (m,n <=3) linear programs but it is my code’s bottle neck. I found that using Simplex ("Large scale off) instead of interior point in the options makes it a little faster. Is there a faster way to do this? matrix "A" is always small and dense (m,n<=3). I tried TOMLAB’s MINOS and LPOPT and QPOPT but still linprog is faster. I don’t know maybe i’m not using TOMLAB correctly or that they’re just better for large problem sizes.
Is there an easy way to just code a faster LP solver for small problems. For my current problem linprog is taking ~.0012 sec for a single iteration to solve 2*2 problems. I have it inside a nested loop, below is a pseudo code:
for t =1:nt
for n = 1:N
linprog
end
end
So it would be much better to have it to be as fast as say ~0.0005 sec/iteration. I want to do this before attempting to make the inner loop parallel. The outer loop cannot be made parallel because of dependencies (time loop).
I would highly appreciate any help guys because my simulations need to be faster than real-time.
Thanks,
Eyas linprog, optimization, loops, speed, linear program, linear programming, nested loops, real time, simulation, tomlab, optimization toolbox, simplex, mathematics, parallel computing, mex MATLAB Answers — New Questions