Variable values


I just started to use OSQP, I ran some examples and tests, I got the optimal point of my objective fuction but I need the value of the variables at that point. How do I get those values?


The values of both primal and dual variables can be found in the structure returned by the solve method. In these examples that structure is called res or results. Which programming language do you use?

Thank you!

I’m using C.

Then your minimizer should be in work->solution->x. See here for more details.

That’s what I was looking for!

Thank you very much for you answer and the additional details! :slight_smile: