Hi Gentlemen,
I notice that OSQP does not always return the same result eventhough the parameters are the same (see hereafter a test I ran on my PC):
data.zip
load(file = "C:/temp/data.RData")
tries <- data.frame()
for(i in 1:200)
{
quadraticProgram <- osqp::osqp(P = osqp.P, q = osqp.q, A = osqp.A, l = osqp.l, u = osqp.u, pars = osqp::osqpSettings(eps_abs = 0.000001, eps_rel = 0.000001, verbose = FALSE))
result_RstudioDesktop <- quadraticProgram$Solve()
tries <- rbind(tries, data.frame(try <- i, iter <- result_RstudioDesktop$info$iter, pri_res <- result_RstudioDesktop$info$pri_res, dua_res <- result_RstudioDesktop$info$dua_res))
}
most of the time the solver returns the same result after 950 iterations but few times it ended after 875 or 850 iterations with another result (not far from the other one).
Reading the documentation of the solver, I can't find what is the default starting point of the algorithm (x0, y0, and z0). I wonder if the difference comes from a different starting point or if it comes from machine precision at a key point of the algorithm (test for stopping conditions or checking for a change on step size parameters).
Can you confirm that OSQP should always return the same result when called with the same parameter (cold start)? Can you help me finding out why I observed this unwilled phenomenon?
Kind regards,
Philippe Carpentier
Hi Gentlemen,
I notice that OSQP does not always return the same result eventhough the parameters are the same (see hereafter a test I ran on my PC):
data.zip
load(file = "C:/temp/data.RData")
tries <- data.frame()
for(i in 1:200)
{
quadraticProgram <- osqp::osqp(P = osqp.P, q = osqp.q, A = osqp.A, l = osqp.l, u = osqp.u, pars = osqp::osqpSettings(eps_abs = 0.000001, eps_rel = 0.000001, verbose = FALSE))
result_RstudioDesktop <- quadraticProgram$Solve()
tries <- rbind(tries, data.frame(try <- i, iter <- result_RstudioDesktop$info$iter, pri_res <- result_RstudioDesktop$info$pri_res, dua_res <- result_RstudioDesktop$info$dua_res))
}
most of the time the solver returns the same result after 950 iterations but few times it ended after 875 or 850 iterations with another result (not far from the other one).
Reading the documentation of the solver, I can't find what is the default starting point of the algorithm (x0, y0, and z0). I wonder if the difference comes from a different starting point or if it comes from machine precision at a key point of the algorithm (test for stopping conditions or checking for a change on step size parameters).
Can you confirm that OSQP should always return the same result when called with the same parameter (cold start)? Can you help me finding out why I observed this unwilled phenomenon?
Kind regards,
Philippe Carpentier