Wednesday, June 24, 2026

MOSEK - LP Energy Benchmarks

Energy optimization is gaining real momentum due to growing environmental consciousness and increasing pressure on energy infrastructure. Several factors contribute, including rising electricity demand from electric vehicles (EVs), expanding data center capacity, and the growing integration of renewable energy sources, which together are increasing system complexity, energy consumption, and strain on power grids. 

Mathematical optimization plays a key role in solving the underlying business problems.

Recent computational studies (https://openenergybenchmark.org/ and https://arxiv.org/abs/2605.04605) mainly compare open-source solvers, and a single or a virtual best-of commercial solvers. In parallel, we are learning from customers and evaluators that MOSEK’s robust interior point solver gives impressive results out of the box on linear energy optimization problems -  even though MOSEK is tuned for other types of problems, in particular finance, forestry, and supply chain. Therefore, we decided to run our own computational study to provide insights into the performance of MOSEK version 11.2, without delving into the intricacies of public benchmarking. 


Key results

  • Default MOSEK is, on average (using shifted geometric mean), about 2.5-4 times faster than the selected default open-source solver.
  • Running MOSEK’s interior-point method in a multi-threaded setting yields speed-ups ranging from 15% (2 threads) to 37% (8 threads) compared to single-threaded performance. 
  • When solving large energy models, memory may be of concern. Reducing from 8 threads to 2 (or 1) threads helps reduce peak memory consumption by 20-40%. 
  • If you are mostly interested in the solution value and don’t require a basic solution, turning basis identification (a.k.a. crossover) off yields, on average, 10% runtime improvement. 


Methodology and computational setup


Methodology: 

  • We use LP instances from https://openenergybenchmark.org/ available on the GitHub page of Open Energy Transition (“OET”).
  • We focus on the 70 medium (M)- sized instances and omit large (L) instances due to the high runtime of open-source solvers. Reporting on too many unsolved large instances is not meaningful. We also decided to limit our runs to 1 hour, which is reasonable for the M instances.
  • We compare MOSEK against itself to provide insights into its workings and to demonstrate the computational trade-offs involved when running with different settings. 
  • We further compare MOSEK version 11.2 with the open-source solver HiGHS in version 1.14. This is to provide readers with an anchor for the publicly available benchmarks
  • For performance comparison, we use the shifted geometric mean (GMST):
  • , where s=10, to follow the standard mean as used by Mittelmann (https://plato.asu.edu/ftp/shgeom.html) and OET (https://openenergybenchmark.org/methodology#ranking-solvers ), and calculate the ratios between the shifted geometric means in column
    GMRST.
  • A solver “wins” (#WINs) when it is not more than 5% slower than the fastest.

Computational set-up: 

  • Machine set-up: We use a single machine of type Supermicro AS-1115HS-TNR-EU – AMD EPYC 9135, 16 cores, 3.65 GHz, 377 GB DDR5-6400 ECC RDIMM memory
  • We use MOSEK default options. No tuning of parameters. 
  • We use a time limit of 1h per instance.
  • We limit each run to 8 threads; any variations for specific experiments are noted below.
  • We executed the solves sequentially, so purely system processes may interfere, which we expect not to accumulate to more than 1% in measurement.


MOSEK versus open-source

For comparison with the results on openenergybenchmarks.com, we include runtime results for HiGHS, an open-source solver. MOSEK is run with the interior-point method, while we tested two runs for HiGHS: the dual simplex method (“DSIM”) and the new multi-threaded, factorization-based interior-point solver HiPO (“HIPO”).

From the table and graphics below, we can see that for small instances, HiGHS performs reasonably well, whereas with increasing complexity, using a commercial solver such as MOSEK quickly makes a significant difference. Observe that 18 instances could not be solved by HiGHS within the time limit, such that the shifted geometric mean is only calculated over 52 of 70 instances. With respect to the shifted geometric mean, HiGHS with HiPO is about 2.5 times (about 4 times with dual simplex) slower than MOSEK. The performance profiles reveal the distance between HiGHS and MOSEK, and further show that HiGHS’ HIPO is usually stronger than HiGHS’ dual simplex on this set of instances. We kept both HiGHS runs mainly because for about 20% of instances, their dual simplex was faster than using HiPO.



Looking at all 68 instances that HiGHS with HiPO could solve within the time limit, the ratio GMRST is about 2.9.


Note that on our fast machine, several runtimes fall into the 5-20-second bucket, and the selected 10-second shift affects the overall ratio. E.g., when setting the shift to s=1 in the shifted geometric mean or similarly when using a less powerful machine (which we initially did), the ratio GMRST between HiGHS and MOSEK increases. When you read about any performance ratios in public benchmarks , it is important to review the instance sets and the calculation logic.


Limited overhead to retrieve basic solutions with MOSEK!


When running primal or dual simplex, you get a basic solution, whereas with an interior-point solver, you need to perform basis identification (a.k.a. crossover) to obtain one. The first question to ask yourself is, do you need a basic solution?

You need it, for example, to perform some types of sensitivity analysis (changes in right-hand side or cost coefficients before basis changes,...), to solve mixed-integer optimization problems, or to obtain a sparse solution. If you are mainly interested in the objective value and need to save time, this step is best skipped, as it is often a computational bottleneck when solving large LPs. Here, we ran an experiment to investigate the impact of the basis identification step on the overall runtime.

Our tests reveal that, on average, only 10% of the time is spent on basis identification, demonstrating its limited impact on overall solving time for MOSEK. In our experience, several solvers tend to spend a lot of time on basis identification (a.k.a. crossover), whereas MOSEK already tends to provide numerically favorable solutions, so retrieving a basic solution does not take long; see the paper by E.D. Andersen “On exploiting problem structure in a basis identification procedure for linear programming” in INFORMS Journal on Computing (https://pubsonline.informs.org/doi/10.1287/mnsc.42.12.1719 ) for more details.

Yet, there are a few outliers in which, for one instance, basis identification took more than 90% of the total runtime. Also, there is one instance where the interior-point method, which ran without basis identification, did not converge and was excluded. So, while it is negligible on average, there are outliers where it may make sense to turn it off.

Threads




Some users have powerful machines and want to run large models one after another, while others may want to solve many problems in parallel. We compare MOSEK running on 1 (“_T1”), 2, 4, and 8 (“_T8”) threads.

The overall runtime improvement on 8 threads is about 37% compared to a single thread. Observe that one instance could not be solved with too few threads; hence, shifted geometric means are calculated over 69 of 70 instances.

In an instance-to-instance comparison, there are a few for which the single-threaded run has been faster (in the graphic, see the blue dots below the red diagonal). Parallelization incurs overhead, and the solution's accuracy may vary, so basis identification may take longer. Using 2 threads may not be worth the overhead, whereas using 4 or 8 threads consistently pays off. For a few other instances, especially from the PyPSA electricity set, using two or more threads was even crucial to solve these in under 30 minutes - look at the maximum runtime 2032 seconds for single-threaded MOSEK versus at most 505 seconds for the multi-threaded ones. 

Memory comparison

Based on the results above and after consultation with energy modeling experts, we created a separate benchmark set containing the realistic PyPSA electricity models from the OET benchmark set to measure memory consumption. Memory measurements in a multi-threaded setup are non-deterministic and should only be used as indicative. From the data, we see that switching from 1 thread (M_DEB1) to 2 threads (M_DEB2) increases the memory by less than 10%, whereas switching to 8 threads (M_DEB) increases it by up to 40%.
Hence, if you are solving large instances and your machine has limited memory, it may be worth running with fewer threads.


Summary


This study provides an indication of MOSEK's strengths for linear optimization problems, in this case from energy applications, and identifies which user controls are worth investigating. We hope this study provides a few anchors to look into and to investigate for your own assessment!

Clearly, results are tied to the instances and computational setup chosen. We always recommend that you check the performance for your own set of instances, and in the environment you are running them - don’t use stronger or much weaker machines for the evaluation; test on machines comparable to your production environment.

Fair benchmarking is challenging - any benchmark requires trade-offs between, for example, representativeness, computational effort, and the practical constraints of available time and resources. We therefore chose to focus on medium-sized instances from the OET benchmark set. These instances are sufficiently challenging to produce meaningful runtime comparisons, yet small enough that open-source solvers can solve a substantial fraction of the test set without excessive timeouts within the imposed time limit. While no benchmark can perfectly capture all real-world scenarios, we believe this selection provides a balanced and informative basis for comparison. 


We encourage you to evaluate MOSEK on the instances that matter to you, with your chosen time limits, be it 10 minutes or 24 hours, and on the machines available to you!


Acknowledgement

We are grateful to the Open Energy Transition for making the Open Energy Benchmark publicly available! You can simply run your own benchmarks on your hardware using their scripts (https://github.com/open-energy-transition/solver-benchmark).








Wednesday, March 25, 2026

Closed during Easter 2026

Support and sales are closed for Easter 2026

from Thursday, April 2nd until Monday, April 6th, inclusive.

Contacting us on April 1st is possible, but only with really good pranks, please 🙂.

Best wishes from the MOSEK team.

Tuesday, February 24, 2026

Guest Speaker Sophie Huiberts: Analyzing the Simplex Method by the Book

On March 17, we are delighted to welcome our guest speaker, Sophie Huiberts, at Mosek office in Copenhagen. Sophie will talk about Simplex method and the gap between theoretical worst case complexity and its observed practical run time. 

If you are curious to learn more, join us at Symbion Park at this publicly open and free event! 

Date and time: 17/3 at 15:00.

Location: Room  M4A ,  Symbion Science Park. (https://www.symbion.dk)
Fruebjergvej 3, 2100 Copenhagen, Denmark

Speaker: Sophie Huiberts, (https://sophie.huiberts.me/)

Title: Analyzing the Simplex Method by the Book
Abstract: The simplex method is an algorithm for linear programming, and this algorithm is much faster than theory is able to explain. In this talk I will describe a new theoretical framework we introduced to address this question. Under this framework, we prove new strong running time guarantees, using mathematical assumptions taken from software user manuals. I will discuss which features of real-world software and LP's we have managed to theoretically capture for this purpose, and what will come next.

Sophie is a CNRS researcher hosted at LIMOS, Clermont Auvergne University in Clermont-Ferrand. And we are happy to welcome her in our office. 


Feel free to join and have a chat with Sophie and the Mosek team !



Wednesday, December 10, 2025

Closed during Christmas

The MOSEK office, sales and support are not available

December 24-28th and 31st, January 1st.

The MOSEK team

Tuesday, September 9, 2025

Hello Autumn!

 While there is still some summer temperatures here in Copenhagen, a certain crispness in the signals that autumn is here!

For MOSEK the arrival of autumn means the arrival of of new persons eligible to use MOSEK for free.

This is because MOSEK, through our academic initiative, grants free licenses for research or educational purposes.  By following the link you can see if you are eligible and request an academic license.

The academic license gives access to the full functionality of MOSEK.

Whether you are a new student or a seasoned academic why not use this opportunity to use MOSEK!

Thursday, July 24, 2025

MOSEK on AWS marketplace

 MOSEK is now available on AWS marketplace as an AMI (Amazon Machine Image). What that means is that you can initiate an instance with MOSEK installed. 

Well actually, you have to install MOSEK on the machine, but there is a script on the AMI that can do that for you!

What is actually pre-installed on the AMI is a MOSEK license. That means you can run MOSEK without having to worry about license files and MAC- addresses. 

Currently we starting off with a limited number of supported instances, but we look to expand on that offering in the near future. 

Since we are still in an experimental mode we are happy to receive any feedback you might have. It can be about which instances you would like us to support or comments on the documentation and user experience, either way we would like to hear from your!

As always you can reach us at support@mosek.com.  

Tuesday, June 17, 2025

Introducing MosekCOModel for Rust

A few years a ago we introduced an official rust API for MOSEK. The API extended our optimizer API to the rust language. The optimizer API is designed to be a thin interface to the native C optimizer API.

 However, MOSEK has in addition to the optimizer API also the fusion API. The fusion API is specifically designed to build conic optimization models in a simple and expressive manner. With its focus on model building the fusion API acts as a compliment to the optimizer API. That compliment has now been extended to Rust.

However, due to some language specific attributes of Rust in combination of how the fusion API is constructed there is not a straight forward way to extend the fusion API to Rust. Hence, we like to introduce mosekcomodel!   

The Rust crate mosekcomodel is a Rust package for formulating and solving convex conic optimization models.  While it looks somewhat like the MOSEK fusion API (for Python, Java, .NET and C++), it is a
fully Rust native package exploiting Rust's type system zero-cost abstractions to make it simpler and faster to write correct models.

The crate provides a model-oriented interface for defining conic models and a
library of functionality for formulating affine expressions.

The model
The models that mosekcomodel can formulate has the form 
$min/max$ $c^Tx + c_f$
$subject$ $to:$ $A x + b \in K_1  \times ... \times K_m $
                        $x \in C_1 \times ... \times C_k$

Where $Ax+b$ is an affine expression in the variable $x$ and $K_i$ and $C_i$ are conic sets. Additionally, mosekcomodel supports integer variables and disjunctive constraints  

Currently mosekcomodel supports all cone types that MOSEK supports:
  • Linear bounds: Equalities and inequalities,
  • Second order conic constraints: Quadric cone and rotated quadratic cone,
  • Semidefinite cone and scaled vectorized semidefinite cone,
  • primal and dual power cones
  • Primal and dual geometric mean cones, and 
  • Primal and dual exponential cones.
The API
The three basic concepts in the API are the model, the variable and the constraint.

The model object defines the API for setting up the model and communicating it to an underlying solver. Through this object constraints and variables are created. A variable can be regarded as an n-dimensional array of scalar variables, the dimensionality is part of the type, while the actual dimensions are only defined at runtime. By extension, expressions created from variables are also n-dimensional arrays of scaler affine expressions. When a constraint is created from an expression and a domain, the shape of the expression and the domain must match, and the constraint inherits this dimensionality and shape.

The outline of a simple model could look like this:


Unfortunately, while Rust does allow operator overloading, the definitions for the operators for plus, minus, multiplication and indexing, that would be useful are too restrictive for this use. So for now we are stuck with functions like .add() and .mull()

Constraint expressions are purely linear, and the crate provides functions to create and manipulate expressions: Reshaping, transposing, stacking, slicing and multiplying by matrices, vectors and constants and so on.

Expression evaluation is lazy, meaning that an expression is only evaluated once it is used in a constraint.

Example: Portfolio optimization
The following is a working example of a basic conic quadratic Markowitz portfolio model implemented with mosekcomodel.



Conclusions
While the mosekcomodel is under active development, it is already a very useful tool for formulating optimization models in Rust. What it needs most right now is people using it and giving us feedback!