Currently my objective function gives me a solution in the magnitude of about 1e-6. I think that gives me some precision problem.
What's the best practice to handle this kind of problems? It seems like I can multiply the obj function by 1e6 for example, but not sure if that's the best way. What kind of parameters can I set?
Impossible to say for sure but let me use this to post some general guidelines about numerical problems when using CVXPY+Mosek.
1e+7
in one place and 1e-6
in another1e+7
or 1e-7
Here are some more modeling hints:
https://docs.mosek.com/modeling-cookbook/practical.html
and here are some more specific implementation hints including interesting Mosek parameters
https://docs.mosek.com/latest/pythonapi/debugging-numerical.html
Here you can see how to set Mosek parameters and write data to files from CVXPY
https://docs.mosek.com/latest/faq/faq.html#cvxpy
If you fail to get things to work as expected you can always save the task file of the problem and send it to Mosek support with an explanation.