Skip to content

Efficiency of MOSEK interface #1513

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
aszekMosek opened this issue Jun 19, 2020 · 1 comment · Fixed by #1686
Closed

Efficiency of MOSEK interface #1513

aszekMosek opened this issue Jun 19, 2020 · 1 comment · Fixed by #1686

Comments

@aszekMosek
Copy link
Contributor

The MOSEK direct interface inputs variables and constraints into the MOSEK task object one by one. The generic method _add_block inherited from the abstract direct solver calls the methods _add_var and _add_constraint for each variable/constraint. It is not particularly efficient, and especially in MOSEK it would be much faster to input at least the whole linear data in one go.

Here at MOSEK we wanted to see if we could achieve something like that, for instance by redefining _add_block in the MOSEK interface. So I wanted to ask if this is not against some design principle (as far as I can see all the direct interfaces follow the one-by-one pattern), if you have some suggestions how one would go about it, or if there already are any plans of this kind.

@michaelbynum
Copy link
Contributor

@aszekMosek The purpose of the one-by-one pattern is for support of persistent interfaces. I think I made a poor design decision when I first wrote the direct/persistent interfaces. I should not have made them so tightly coupled. Our direct/persistent interface to CPLEX had similar issues until it was recently refactored in #1416 to cache constraints and hand them to the solver in chunks. If we ever want a persistent interface to MOSEK, then we will probably need the same sort of design. For a purely direct interface, there is no need for the one-by-one pattern at all.

I am not aware of any current plans. Furthermore, we would greatly appreciate this improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants