Re: How do I get the solution to satisfy the constraints more precisely?

79 views
Skip to first unread message

Paul Goulart

unread,
Sep 18, 2018, 2:51:06 PM9/18/18
to travis...@gmail.com, OSQP
I can’t reproduce this error. I tried the demo through the matlab interface and find the following:

- using default settings, I get the exactly the same ’x’ value as below. This is expected since the default tolerances for termination are 1e-3, which is about the accuracy you are getting.

- using much tighter tolerances (1e-8 as below), I get a solution with sum(x) within 1e-14 of 1.

- with polishing enabled (in either of the above two cases) the solution I get is exact.

I suspect that you are not configuring the settings in the correct way, but it is hard to say without seeing an example. Could you please post the code you used (with modified settings) that produces the error?

Please also let us know which version and OS you are using.



> On 18 Sep 2018, at 08:55, travis...@gmail.com wrote:
>
> Using the C/C++ demo, without modification, I get a solution of
> x = {0.3013757039; 0.6983956864}
>
> The sum of the elements of x is 0.9997713903
>
> However, the first constraint in the demo says that the sum should be exactly 1.
>
> How do I configure the solver to more tightly satisfy the constraints?
>
> I have tried the following, with no success:
> settings->eps_prim_inf = 1E-8;
> settings->eps_dual_inf = 1E-8;
> settings->eps_abs = 1E-8;
> settings->eps_rel = 1E-8;
> settings->polish = 1;
>
> --
> You received this message because you are subscribed to the Google Groups "OSQP" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to osqp+uns...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/osqp/b5549208-8535-4ad3-a450-89a404df46a2%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

travisgleith .

unread,
Sep 19, 2018, 12:01:21 AM9/19/18
to Paul Goulart, OSQP
Thanks for replying. I deleted the post after I realised that I wasn’t apply the settings properly, as you correctly guessed.
--
Sent from an iPhone
Reply all
Reply to author
Forward
0 new messages