Monday, February 19, 2024

New third party interfaces to MOSEK

Recently we added PyPSA and linopy as third party interfaces to MOSEK.

PyPSA stands for Python for Power System Analysis. It is pronounced "pipes-ah. It is a toolbox for simulating and optimizing modern power systems. 

PyPSA utilizes linopy to connect to solvers, such as MOSEK. But linopy can also be used on its own. It is designed to be a link between data analysis frameworks, such as pandas and xarray, and optimization solvers, like MOSEK.  

A full list of available third party interfaces to MOSEK can be seen here. If you feel like the list is not complete, whether it is an existing interface that is missing or an interface that you wished existed, let us know! This is easiest done by contacting  

Monday, February 12, 2024

NEOS server and Mosek

MOSEK offers free licenses to academics as part of our academic initiative. This also extends to academic use of MOSEK through the NEOS server

The NEOS server is a great initiative and service hosted by Wisconsin Institute for Discovery at the University of Wisconsin in Madison. The NEOS server is a free internet-based service for solving numerical optimization problems. We at MOSEK are proud to one of the 60 supported solvers. 

Wednesday, January 24, 2024

New prices from June 2024

The new prices will come into effect on June 1st, 2024. 

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 5.1% on average.

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

Thursday, January 18, 2024

Seminar at LiU

 On Monday (January 22) MOSEK CEO and chief scientist Erling Dalgaard Andersen will be giving a talk at Linköping University. The talk will, maybe unsurprisingly, be about conic optimization.

The seminar will take place at 13.15 in Hopningspunkten (B-huset) on the campus of LiU. It is open for everybody who are interested :)

Monday, January 15, 2024

Happy New Year!

We here at MOSEK have had a good start to the new year and we hope the same is true for all of you!

For those who have had a less than optimal start to the year we would like to share some resources that might bring you on to the fast path to optimum.

We know many users of MOSEK use it for portfolio optimization, in light of that we gladly recommend the recently published paper Markowitz Portfolio Construction at Seventy

Further there is now an unofficial package for CVX with native Apple Silicon support. This package due to the work of Dr. Wenyuan (Mike) Wang and MOSEKs own Michal Adamaszek with permission from Michael C. Grant.

We hope these resources can be of use and that you will have a great 2024! 

Monday, December 18, 2023

Christmas lights

In this year's Christmas blogpost, we explain how to properly hang the Christmas lights on the Christmas tree 🎄.

Let us fix some notation. The 🎄 in dimension $D\geq 2$ is (surprise!) a reflected and rescaled quadratic cone:

$$(x_1,\ldots,x_D) \in \unicode{x1F384} \subseteq\mathbb{R}^D\quad  \iff\quad W(1-x_D/T)\geq \|x_{1:D-1}\|_2,\ x_D\geq 0$$

where $T$ is the coordinate of the top and $W$ is a width rescaling parameter. The tree comes decorated with $P$ ornaments located at $c_1,\ldots,c_P\in\unicode{x1F384}$. Here is an example in dimension $D=2$.

The Christmas lights chain consists of $N$ bulbs evenly spaced in distance $L$ along the wire. Their  locations $x_1,\ldots,x_N\in \unicode{x1F384}$ are to be determined.  If, like us, you have been collecting and repairing your lights for almost 25 years then it is possible that each of the lightbulbs shines with different power $I_1,\ldots,I_N$.

The main requirement we have is that each of the ornaments is nicely illuminated, more precisely we wish to maximize the total amount of light received by the worst-illuminated ornament. Let $\mathrm{il}_j(d)$ be the amount of light that a point in distance $d$ from the light source receives from the $j$-th lightbulb. Obviously $\mathrm{il}_j(d)$ is a decreasing function of the distance $d$ to the bulb. That leads us to the optimization problem:

$$\begin{array}{llrr}\mathrm{maximize} & \mathrm{il}_{MIN}  & &\\ \mathrm{s.t.} & \mathrm{il}_{MIN}\leq \sum_{j=1}^N \mathrm{il}_j(d_{ij}) & i=1,\ldots,P & (2.1) \\ & d_{ij}\geq \|x_j-c_i\|_2 & i=1,\ldots,P,\ j=1,\ldots,N &(2.2) \\ & \|x_j-x_{j+1}\|_2\leq L & j=1,\ldots,N-1 & (2.3) \\ & x_j \in \unicode{x1F384} & j=1,\ldots,N &(2.4) \\ & x_1 = (W,0,\ldots) & &(2.5)\end{array}$$

In principle we should let the brightness of the $j$-th bulb decay as $\mathrm{il}_j(d)=I_j/d^{D-1}$, but that does not lead to a convex constraint in (2.1). Instead, let us use a piecewise-linear approximation $\widetilde{\mathrm{il}_j}(d)=\mathrm{max}(I_i-d,0)$. This function is not concave either, so it cannot be used directly in (2.1) in a continuous fashion, but when written as

$$(d\in[0,I_j]\ \mathrm{and}\ \widetilde{\mathrm{il}_j}(d) = I_j-d)\ \mathrm{or}\ (d\geq I_j\ \mathrm{and}\ \widetilde{\mathrm{il}_j}(d) = 0)$$

it becomes evidently definable via a disjunctive constraint. Here is a rough comparison between $\mathrm{il}_j(d)$ and $\widetilde{\mathrm{il}_j}(d)$:

Let us quickly recap problem (2): constraint (2.1) (with $\widetilde{\mathrm{il}_j}$ in place of $\mathrm{il}_j$) computes the approximate amount of light received by each ornament as a function of the distance $d_{ij}$ from the $i$-th ornament to the $j$-th bulb; that distance is computed in (2.2). Two consecutive lightbulbs cannot be spaced by more than the wire length between them, as in (2.3), while (2.5) ensures that the chain starts at the fixed bottom point of the tree, where the electric socket is. The complete MOSEK Fusion model can be found on GitHub; it is a mixed-integer (due to the disjunctive constraints) second-order cone optimization problem.

We end with some examples. The ornaments have been given intensity according to the amount of light received. The disk sizes correspond to the brightness of lightbulbs.

It remains to wish all readers a very well-lit 🎄 and Happy New year 2024!

The MOSEK team

Tuesday, November 28, 2023

MOSEK in Abu Dhabi

Next week MOSEK will be in Abu Dhabi attending the dual conference Converging paths in commodity and financial market analysis. In consist of the established conferences Research in Options and Euro Working Group for Commodity and Financial Modelling

If you are going to the conference or if you are based in Abu Dhabi and would like to discuss MOSEK, don’t hesitate to reach out to

See you in Abu Dhabi!