0

We were formulating a optimization problem and using Mosek solver.

But which would be better modelling framework for Mosek, among the following:

  1. Cvxpy: Earlier we used Cvxpy, but it lacks a few features (e.g. solution initialization) which are present in Mosek's Optimizer API.
  2. Mosek Optimizer API: Cvxpy seems to do heavy transformation to problem, before giving it to Mosek. This would be lost, if we directly use Mosek Optimizer API. Is that transformation really helpful (a game changer) to mosek?

In one line, Is there a clear winner b/w the two choices or we need to find a balance point?

pqrz
  • 133
  • 5
  • Mosek Fusion API https://docs.mosek.com/9.2/pythonfusion/index.html – Michal Adamaszek May 26 '21 at 18:32
  • Do you mean Mosek's Fusion API is the best amongst the three? – pqrz May 27 '21 at 04:11
  • 2
    They all have advantages. Fusion is close to the Mosek API, so you can for instance pass initial solutions, it can also do linear algebra on variables and operate on linear expressions like in cvxpy. It does not have ready conic atoms like cvxpy, some transformation to conic form is left for the user. But you can write Ax+b \in Cone. – Michal Adamaszek May 27 '21 at 08:26

1 Answers1

1

No clear winner, it depends on your problem. If computational time is crucial and giving initial solution is a game changer: use mosek directly. However, it will require your to carefully formulate your problem and give up on the transformations and reformulations cvxpy supply by default. cvxpy also supply some additional features (derivatives etc) that could be useful.

No right or wrong answer, both are great to have in your toolbox. It's like to ask "what's better, C or Python?" it depends on your needs only.

Roim
  • 2,986
  • 2
  • 10
  • 25