1 Preface

This cookbook is about model building using convex optimization. It is intended as a modeling guide for the MOSEK optimization package. However, the style is intentionally quite generic without specific MOSEK commands or API descriptions.

There are several excellent books available on this topic, for example the books by Ben-Tal and Nemirovski [BenTalN01] and Boyd and Vandenberghe [BV04], which have both been a great source of inspiration for this manual. The purpose of this manual is to collect the material which we consider most relevant to our users and to present it in a practical self-contained manner; however, we highly recommend the books as a supplement to this manual.

Some textbooks on building models using optimization (or mathematical programming) introduce various concepts through practical examples. In this manual we have chosen a different route, where we instead show the different sets and functions that can be modeled using convex optimization, which can subsequently be combined into realistic examples and applications. In other words, we present simple convex building blocks, which can then be combined into more elaborate convex models. We call this approach extremely disciplined modeling. With the advent of more expressive and sophisticated tools like conic optimization, we feel that this approach is better suited.


We begin with a comprehensive chapter on linear optimization, including modeling examples, duality theory and infeasibility certificates for linear problems. Linear problems are optimization problems of the form

\[\begin{split}\begin{array}{ll} \mbox{minimize} & c^Tx \\ \mbox{subject to} & Ax=b,\\ & x\geq 0. \end{array}\end{split}\]

Conic optimization is a generalization of linear optimization which handles problems of the form:

\[\begin{split}\begin{array}{ll} \mbox{minimize} & c^Tx \\ \mbox{subject to} & Ax=b,\\ & x\in K, \end{array}\end{split}\]

where \(K\) is a convex cone. Various families of convex cones allow formulating different types of nonlinear constraints. The following chapters present modeling with four types of convex cones:

It is “well-known” in the convex optimization community that this family of cones is sufficient to express almost all convex optimization problems appearing in practice.

Next we discuss issues arising in practical optimization, and we wholeheartedly recommend this short chapter to all readers before moving on to implementing mathematical models with real data.

Following that, we present a general duality and infeasibility theory for conic problems. Finally we diverge slightly from the topic of conic optimization and introduce the language of mixed-integer optimization and we discuss the relation between convex quadratic optimization and conic quadratic optimization.