Thursday, May 15, 2025

Books section on our website

 The MOSEK office received our copy of Dany Cajas book 'Advanced Portfolio Optimization' fresh off the press today!


First impressions are really positive :)


Looks like it should be a great resource for many MOSEK users.


On that note we recently added a Books side on our website.


Where we we link to the book. There you can also find our own 'MOSEK Modeling Cookbook' and 'MOSEK Portfolio Optimization Cookbook'.


We free to reach out to support@mosek.com if you have a suggestion on books we should add.




Thursday, May 8, 2025

New prices from September 2025

 The new prices will come into effect on September 1st, 2025. 

The price for the basic PTS and PTON floating licenses increases with 100 USD each. Our other prices follows accordingly. With NODE licenses costing 4 times the price of their floating license counterpart and the annual maintenance 25% of the base price of the part.

This equates to a price increase of 4.9% on average.

The new prices can be found at the top of our commercial pricing page on our website.

Monday, April 14, 2025

Easter 2025

Support and sales are closed during Easter from Thursday 17th until Monday 21st of April, both days inclusive.

Friday, March 14, 2025

Semidefinite o-pi-timality

Happy $\pi$ Day! If other methods fail, you can always compute $\pi$ with the MOSEK semidefinite optimizer. We leave the details as an interesting exercise for the curious readers. Some hints are hidden in our Modeling Cookbook .


Tuesday, March 4, 2025

Using MOSEK with CVX

Due to popular demand we present the full modern installation process of CVX+MOSEK. It works the same way on all platforms supported by MOSEK.

If you experience issues with CVX+MOSEK please reinstall from scratch following these instructions. If you already did that, and there are still issues then please contact us with your platform, MOSEK version, license type, and an explanation of which step failed including full log/error messages.

MOSEK support is unable to help with old, broken, manually altered and other CVX installations that didn't follow this process. In particular please don't use the older 2020 CVX version which comes with included, now quite outdated, MOSEK 9.1. 

Step 1. Installing CVX

  1. Download and unpack the open-source CVX 2.2 release from the first paragraph ("Effective April 23, 2024") of https://cvxr.com/cvx/download/ . Ignore the legacy download matix further down. An explicit download link for the latest release as of March 2025 is https://github.com/cvxr/CVX/releases/tag/2.2.2
  2. Navigate to the unpacked installation in MATLAB and run "cvx_setup", as explained in https://cvxr.com/cvx/doc/install.html
  3. The log output should indicate success and the free solvers like SeDuMi and SDPT3 should be detected.
Step 2. Installing MOSEK
  1. Download and install MOSEK for your platform following https://docs.mosek.com/latest/install/installation.html#general-setup Make sure to perform all the steps, for instance on OSX running a python installation script is needed, and on Windows for a manual installation (unpacking a ZIP file) manually setting the environment variable PATH is needed.
  2. Obtain a MOSEK license and install it according to the instructions in the email or https://docs.mosek.com/latest/licensing/quickstart.html#i-have-a-license-file For most users of personal academic and trial licenses the default location will be sufficient. If you have a different license type (for example floating) configure it according to the manual.
  3. (Optionally) run the "msktestlic" script in the bin folder of the MOSEK installation to test that license is set up correctly. This is not a MATLAB command, but a script to run in the terminal/command line.
  4. Using "addpath" in MATLAB add the MOSEK toolbox to the MATLAB path, as shown in https://docs.mosek.com/latest/toolbox/install-interface.html
  5. In MATLAB run the "mosekdiag" command to verify that MOSEK works in MATLAB as in https://docs.mosek.com/latest/toolbox/install-interface.html#testing-the-installation . In case of errors read the messages carefully and fix the errors. See https://docs.mosek.com/latest/toolbox/install-interface.html#troubleshooting for additional explanations for typical issues.
Step 3. Configuring MOSEK in CVX.

At this point you have verified that both CVX and MOSEK work in MATLAB and all that is left is to combine them together.

Making sure that MOSEK is still in your MATLAB path navigate to the CVX installation folder and run "cvx_setup". In the log you should see that MOSEK is detected and configured, in addition to the free solvers.

Warning. NEVER use ''cvx_precision", and especially "cvx_precision best" with MOSEK. It won't do any good and in the worst case will lead to nonsense results. If you really need to change solver termination tolerances do it by setting explicit MOSEK parameters, but first read "Should MOSEK parameters be tweaked?" on our blog.


Thursday, February 27, 2025

New compute cluster for our MIP team

Solving a mixed integer programming (MIP) problem can be extremely time-consuming using the so-called brand and bound algorithm. Therefore, a MIP solver like MOSEK incorporates a lot of algorithmic improvements to reduce the solution time. Sometimes those improvements are called tricks. 

Now to evaluate whether some trick benefits the MIP solver, then the MIP solver with and without the trick included is used to solve a benchmark set of test problems and if the benchmark results indicate the trick helps, then it is included in the solver.

Clearly, if all the test problems are solved on one specific computer, then the timing results are comparable. However, to make robust conclusions then a lot of carefully selected test problems must be employed. This has the unfortunate consequence that evaluating a new trick is very time-consuming.  The benchmark problems can of course be solved in parallel, but solving multiple problems in parallel on one computer will not produce reliable timing results that can be compared. The only way of getting comparable timing results quickly is to solve many problems in parallel on a cluster of identical computers.

That is why we at MOSEK recently invested 55K+ USD in a compute cluster made up of identical computers for the MIP development team. The cluster consists of 4 boxes each containing 8 computational nodes i.e. it provides 32 identical computers.

Hopefully, you won't have to wait too long to see the benefits in Mosek arising from faster testing of potential new improvements in the MIP solver! 

In the meantime, you can enjoy this photo of our cluster working away :) 



Thursday, February 20, 2025

Should Mosek optimizer parameters be tweaked?

Let us begin by answering the question in the title which is no. This post presents arguments behind that answer.

In a recent substack post, Ben Recht mentioned that Mosek and optimization software in general have many algorithmic parameters that can be tweaked. Clearly, it may be overwhelming for the average user of optimization software to figure out what the parameters do and how to change them.

Note that the types of parameters that are referred to are those that affect the algorithms of the optimizers and not the parameters that affect things like the amount of log output. 

However, in the case of Mosek a good rule of thumb is to only tweak the parameters if there is a very good reason to do so. The main reasons for this are:

  • The default values of the parameters are chosen after extensive testing. Hence, it is hard to improve the average optimizer performance by tweaking the parameters.
  • If it is easy to devise a rule that automatically improves the performance of Mosek by adjusting a parameter, then such a rule would be built into Mosek.
  • Mosek is only tested extensively for the default parameter settings and hence weird things can happen for non-default parameter settings. For instance, the stopping criteria employed by the interior-point optimizer normally would lead to the most accurate solution possible. Therefore,  tightening the stopping criteria in most cases increases the number of iterations(=work) and results in no or minimal benefit.
Given the above arguments an obvious question is then, why are so many parameters made available to the users of Mosek? The two most common reasons are:
  • For instance, the mixed-integer optimizer can take a lot of time to solve a problem to optimality and therefore it might be relevant to relax the stopping criteria to obtain a less accurate but decent solution in a reasonable amount of time.
  • Mosek implements many heuristics that make beneficial algorithmic choices. An example is, decide whether to solve the problem on primal or the dual form in the case of interior-point optimizer. This heuristic is not perfect and in some cases, it is worthwhile to override it.
  • Occasionally Mosek has a bug or simply performs poorly on specific problems. In such cases, a tweak in the parameter settings may provide a good workaround.
To summarize, based on 25 years of experience, parameter tweaking rarely solves performance or robustness issues. Indeed it is rarely the quick fix a user might hope for. The correct fix is in most cases to improve the model formulation by avoiding bad scaling, big Ms etc. 

As an exception to the general rule mentioned in the conclusion, let us finish by listing the parameters
that are the most common to tweak:    
  • Relaxing the stopping criteria of the mixed integer optimizer i.e. relax the relative gap tolerance.
  • Turn the linear dependency checker off in the presolve because the computational cost of the procedure is not worth the benefit. This is often the case when the constraint matrix is generated from a finite element model.
  • Force an optimizer to employ a specific number of threads e.g. setting the number of threads to one in the case when multiple problems are solved in parallel.