## Tuesday, February 21, 2017

### Sponsorship: MIP 2017 - Montréal, 19-22 June

MOSEK is once again one of the sponsors of the Mixed Integer Programming Workshop, which will take place June 19-22, 2017 at HEC Montréal (Québec, Canada).

The program includes talks from distinguished specialists from the academic and industrial world. Until March 1st you can still submit a poster abstract and apply for travel support for students and postdocs.

More details on the official workshop website.

MOSEK Team

## Tuesday, January 3, 2017

### Semidefinite optimization in power flow problems

We are pleased to announce a MOSEK workshop on Semidefinite optimization in power flow problems taking place on Tuesday, February 28th, 2017 at the Symbion research park.

Optimal power flow is one of the major problems in optimization of electric power systems, asking for the minimization of operating costs in terms of a specified objective function in the presence of non-linear power flow equations. Three experts, Spyros Chatzivasileiadis (DTU), Cédric Josz (CNRS) and Martin Skovgaard Andersen (DTU) will discuss recent advanced based on convex relaxations and in particular on semidefinite programming.

The workshop is free and open to everyone. There will be coffee, refreshments and time for discussions. Please register through this form to help us with planning.

Schedule:
14:00 - 14:05   Welcome
14:05 - 14:50   Spyros Chatzivasileiadis
15:00 - 15:45   Cédric Josz
16:00 - 16:45   Martin Skovgaard Andersen
17:30+ optional dinner (Nørrebro Bryghus)

Abstracts:
• Spyros Chatzivasileiadis, DTU
SDP Problems for Power System Stability and Optimization
In recent years, semidefinite programming is met with increasing interest within the power systems community. Its most notable application to-date is on the convex formulation of the AC optimal power flow problem. At the same time, semidefinite programs can be used to derive Lyapunov functions that guarantee power system stability.

In this talk we will report on recent work both on power system stability and optimization. First, we will present a novel robust stability toolbox for power grids that can address uncertainties in equilibrium points and fault-on dynamics. In that, we bring in the quadratic Lyapunov functions approach to transient stability assessment.

Second, we will propose formulations for the integration of chance constraints for several uncertain variables in the optimal power flow problem. We demonstrate our method with numerical examples, and we investigate the conditions to achieve zero duality gap.
• Cédric Josz, LAAS CNRS
Application of Polynomial Optimization to Electricity Transmission Networks
Multivariate polynomial optimization where variables and data are complex numbers is a non-deterministic polynomial-time hard problem that arises in various applications such as electric power systems, imaging science, signal processing, and quantum mechanics. We transpose to complex numbers the Lasserre hierarchy which aims to solve real polynomial optimization problems to global optimality. This brings complex semidefinite programming into the picture and calls for an interior-point algorithm in complex numbers. The Nesterov-Todd direction will be discussed and supplemented by numerical results on the European high-voltage electricity transmission network.

• Numerical Aspects of Semidefinite Relaxations of Optimal Power Flow Problems
Power flow optimization plays an important role in power system operation and planning. It is used to find a cost-optimal operating point of a power system that consists of a set of power buses that are interconnected through a network of transmission lines. We discuss recent progress based on convex relaxation techniques for optimal power flow problems and investigate some numerical aspects through an empirical study.
Essentials:

## Thursday, December 1, 2016

### Modeling non-convex absolute value constraints with MILP

We are being asked if one can use MOSEK to express a constraint of the form $$\label{eq:sumabs}\sum_i|x_i|=c$$ for some $x\in\mathbb{R}^n$ and $c\in\mathbb{R}$. This condition is non-convex; for instance for $n=1$ it is equivalent to $x=\pm c$. Such constraints appear in long-short portfolio optimization problems (see stackoverflow, paper).

The idea is to introduce a binary vector indicating the positions of positive/negative entries in $x$. Concretely, we want to split $x$ into the positive and negative part $x=s-t$ with $s,t\geq 0$.

If we know an upper bound $M$ on $s_i$ and $t_i$, then the following system:
\begin{align*} 0\leq s_i&\leq My_i,\\ 0\leq t_i&\leq M(1-y_i),\\ & y_i\in \{0,1\} \end{align*} has the property that at most one of $s_i,t_i$ is non-zero. Indeed:
\begin{align*} s_i>0 \implies y_i=1 \implies t_i=0,\\ t_i>0 \implies y_i=0 \implies s_i=0. \end{align*} Given that we are looking at $\sum_i|x_i|=c$ we can choose $M=c$ as an upper bound for all $|x_i|$. Then an equivalent version of the condition $\eqref{eq:sumabs}$ as a mixed-integer linear program is:
\begin{align*} x&=s-t,\\ 0\leq s&\leq cy,\\ 0\leq t&\leq c(1-y),\\ 0\leq y&\leq 1,\\ c&=\sum_is_i+\sum_it_i,\\ & x,s,t\in\mathbb{R}^n,\ y\in\mathbb{Z}^n.\\ \end{align*}

## Monday, October 10, 2016

### New phone number

We have gotten a new phone number. It is

• +45 7174 9373
Also the fax number has been closed.

## Monday, June 6, 2016

### Improving Python API performance

Recently a MOSEK user pointed out out that sometimes the MOSEK Python API can be quite slow when it comes to input large amount of data. In particular the problem is related to the way MOSEK handles 32 and 64 bit integers.

If you use Numpy with a 64-bit Python, integer arrays will usually end up being arrays of numpy.int64 since the native Python integer is an int64.

Most MOSEK functions require arrays of numpy.int32, e.g. for variable or constraint indexing. In this case it can often significantly speed up the function call to explicitly convert the types.

To this extent is worth using numpy.array class to convert arrays of indexes to the right size: the numpy implementation is highly efficient and saves a lot of time!

### Tests

To show the performance gain in Python 2.7 we implement a simple tests involving
• n=1000000 variables,
• linear objective function terms and
• quadratic objective function terms.
using Python timeit module. Each tests is repeated num=100 times and we removed from the timing unecessart contributions such as module import and task/environment declaration.

Note we show source code without timeit instrumentation to keep it simple.

The complete testing code is available at the end of the post.

#### Objective function linear coefficents.

Say we want to input the coefficients for n variables in the objective function. We can do it using Python arrays or  numpy arrays instead. The code to time the running time is

We obtain the following results

• direct input: 1.113329s
• using numpy : 0.017299s

#### Objective function quadratic coefficients.

Say we want to input the coefficients of the linear part of the objective function. The benchmark code is

It provides the following results

• direct input: 2.239344s
• using numpy : 0.028208s

### Conclusion

The MOSEK Python API converts by default 64bit integers to 32 bit ones, and this operation could introduce significant overhead. Using numpy array to convert integer arrays to 32 bit is a simple simple workaround that allows to speed up the input process significantly.

The improvement is quite remarkable. However, it must be noticed that not all users will experience such an improvement. Nevertheless it is a good idea to check your code and see whether you can gain some performance.

Remember that this issue is solved in the new MOSEK 8 release.

## Friday, May 27, 2016

### MOSEK 8 beta now available!

We are happy to announce that MOSEK version 8 beta is now available for download from our web site:

Main highlights:

• The conic optimizer ha been improved in many respect: pre-solving, accuracy, speed.
• The semidefinite optimizer in particular has been greatly improved in terms of accuracy and stability.
• The Fusion API is now available for Python 3 and C++.
• An automatic dualizer for conic quadratic problem is now available.
• A simple optimization server to solve problems remotely is now included.
• Linux 32bit is no more supported.

We have also updated may other part of the solver and polished its interface. The documentation has been also revised.

Want to try this new release? Download the package and get an updated license:

• Trial and academic licenses can be used with version 8 beta as well.
• Commercial users that are entitled for upgrade can contact us to obtain a new license file.

We are very much confident this new release will be a further improvement for our product.

Help us improving even more: let us know your feedback!

Do you want to know more about the new release? Contact us!

The MOSEK Team.

## Monday, April 25, 2016

### Sponsorship: 2016 MIP Workshop in Coral Gables, Florida (US)

We are happy to announce that MOSEK is among the sponsors of the 2016 Mixed Integer Programming Workshop that will be held May 23rd - 26th in Coral Gables, Florida (US).

The program includes talks from many distinguished specialists in the field of mixed-integer programming both from the academic and industrial world. No doubt the level of the presentations will be outstanding.

This year MOSEK not only support the workshop as sponsor, but we are part of the Program Committee.

We look forward for such an exciting event!

The MOSEK team