osqp icon indicating copy to clipboard operation
osqp copied to clipboard

Is it normal to slightly exceed the boundary value?

Open willi7758521 opened this issue 2 years ago • 4 comments

Although with the non-negtive constrain,the solution of osqp is still have some negtive values, the range of them is about -10^(-2) to 0; Is this phenomeno normal? Thanks

willi7758521 avatar Feb 05 '22 10:02 willi7758521

Yes. It will only satisfy constraints to within the termination criteria you set for the solver. This means that when the solver stops you may well have small constraint violations still.

goulart-paul avatar Mar 05 '22 07:03 goulart-paul

Would it not make sense to clip the returned coefficient estimates within the requested constraints?

tomwenseleers avatar Aug 23 '22 14:08 tomwenseleers

It would perhaps make sense to do that if the constraints were all simple upper/lower bounds, but it's not clear what should be done in the general case that a constraint is l \le Ax \le u. We don't make any special check for the former condition, so just return whatever we get.

goulart-paul avatar Aug 23 '22 14:08 goulart-paul

same question! how to aovid the situation?

wadasdw88s avatar Aug 30 '22 03:08 wadasdw88s