
8 Automatic code generation for real-time convex optimization
Nesterov and Nemirovsky refer to families of convex optimization problems, with
constant structure and parameterized by finite dimensional parameter vectors as well
structured problem (families) [63].
1.2.2 Solvers
Asolver or solution method for a problem family is an algorithm that, given the parameter
value a ∈ A, finds an optimal point x
(a) for the problem instance, or determines that
the problem instance is infeasible or unbounded.
Traditional solvers [1,64,65] can handle problem families with a range of dimensions
(e.g., QPs with the form (1.2), any values for m, n, and p, and any sparsity patterns in the
data matrices). With traditional solvers, the dimensions, sparsity patterns and all other
problem data a are specified only at solve time, that is, when the solver is invoked. This
is extremely useful, since a single solver can handle a very wide range of problems,
and exploit (for efficiency) a wide variety of sparsity patterns. The disadvantage is that
analysis and utilization of problem structure can only be carried out as each problem
instance is solved, which is then included in the per-instance solve time. This also limits
the reasonable scope of efficiency gains: there is no point in spending longer looking for
an efficient method than it would take to solve the problem with a simpler method.
This traditional approach is far from ideal for real-time embedded applications, in
which a very large number of problems, from the same continuously parameterized
family, will be solved, hopefully very quickly. For such problems, the dimensions and
sparsity patterns are known ahead of time, so much of the problem and efficiency analysis
can be done ahead of time (and in relative leisure).
It is possible to develop a custom solver for a specific, continuously parameterized
problem family. This is typically done by hand, in which case the development effort
can be substantial. On the other hand, the problem structure and other attributes of
the particular problem family can be exploited, so the resulting solver can be far more
efficient than a generic solver [6,66].
1.2.3 Specification languages
A specification language allows a user to describe a problem instance or problem family
to a computer, in a convenient, high-level algebraic form. All specification languages
have the ability to declare optimization variables; some also have the ability to declare
parameters. Expressions involving variables, parameters, constants, supported operators,
and functions from a library can be formed; these can be used to specify objectives and
constraints. When the specification language supports the declaration of parameters, it
can also be used to describe A, the set of valid parameters. (The domains of functions
used in the specification may also implicitly impose constraints on the parameters.)
Some specification languages impose few restrictions on the expressions that can
be formed, and the objective and constraints that can be specified. Others impose
strong restrictions to ensure that specified problems have some useful property such as