Optimal basic solution from CVX

I’m solving a linear program using CVX with the MOSEK solver. I wonder, is it possible that CVX returns me an optimal basic solution?

Thanks a lot!

1 Like

I very much doubt that is possible. Since I have never seen @mcg talking about this option.
I would use Mosek directly if that is my goal.

Thanks Erling! I have just transferred to MOSEK directly.

@Erling Is it possible to accomplish by setting Mosek parameters using CVX’s cvx_solver_settings ? That allows specification of any combination of Mosek parameter values.

What is a basic solution to cvx model?

Also as far I understand cvx makes a tons of transformation before feeding the model into the optimizer. That means you have to do something to the optimizer solution to get the model solution.
I am 99.99999% sure Michael has not given any thought about doing this specially for basic solution.

If you care about a basic solution cvx is unlikely to be the best tool for the job.

If you force the use of simplex


then CVX correctly fetches the (only available) basic solution. So it is certainly aware of and capable of doing that. However what and how is picked when interior point with crossover is used is probably a question for @mcg.

Plus, there are the transformation issues @Erling mentioned

Plus plus, there is the issue some linear constructions like absolute value get modeled with cones by cvx.

Yes, there is the matter of what transformations CVX applies before sending to CVX. But CVX should report whatever solution was reported by Mosek, as transformed back by CvX to a solution to the model as input by the user in CVX.

Is a basic solution, relative to the LP problem as received by Mosek, guaranteed when crossover is applied to interior point solution and the problem is reported by Mosek as solved?

“Whatever solution is reported by MOSEK” is not uniquely defined for an LP:

The interior point is by default with crossover so it returns both interior point and basic solutions. In the presence of numerical issues all 4 combinations of “status solved”/“status unknown” for those two solutions are possible.

One could cook up a problem where the interior-point solution will be non-basic and check which solution cvx returns but because of the preprocessing by CVX I would prefer to leave this as an exercise ;).

1 Like

To clarify my previous comment. If you want something that is a vertex solution cvx will not give you that in general due to preprocessing issues.

However, the setting @Michal_Adamaszek mention will give you a solution that is more basic like.