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!

Wednesday, June 4, 2025

Geometric Programming Toolbox

As highlighted in a recent linkedIn post by Elmor Peterson Geometric Programming (GP) is an old subfield within optimization with applications in integrated circuit design, aircraft design and control theory amongst others.

Although GP models them self are not convex they can always be converted into a convex model.


To facilitate GP modeling we have made a GP toolbox that makes these transformations for you. To learn more about GP and play around with the toolbox check out the Marimo notebook.


Credit for the notebook goes to our student worker Izgi Tulunay.


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 .