# Constraint aggregation¶

In this section the use of constraint aggregation is demonstrated. We will focus on the following problem:

where:

This can be reformulated into a non-linear optimization problem with non linear constraints:

In this situation this problem can be solved using any non linear optimization solver supporting non linear inequality constraints. The solution of this problem is \((x^*,y^*) \equiv (0,0)\quad \forall N\in \mathbf{N}\) .

Some optimization solvers, such as MMA, can become expensive when the number of constraints \(N\) is large. Moreover, since constraint gradients are often needed, reducing the number of constraints to fewer constraints can be efficient to compute the gradient by adjoint approach. Constraint aggregation aims to reduce the number of constraints in an optimization problem. It does this by replacing the original constraints with operators that transform vectors into scalars.

Where \(G_{agg}(g_j(x,y), p)\) indicates an aggregation operator and \(p\) its parameters (if applicable). In the next section some aggregation approaches are reviewed.

## The maximum¶

The simplest approach to aggregate the constraint functions is to take their maximum.

using this formulation keeps the same solution of the original problem but has the major inconvinient of not being differentiable. This is not always a problem in practice. However, it is possible that the performance of gradient-based solvers may be degraded.

## The KS function¶

The Kreisselmeier–Steinhauser (KS) function [KS83] is a continuous and differentiable function that tends to the maximum operator when the aggregation parameter tends to infinity.

It can be shown that:

This means that using KS function aggregation the solution of the optimization problem is an approximation of the original problem. Since the KS function is always greater than the maximum, this approach always leads to feasible solutions. By increasing the value of p, the KS function will be closer to the maximum and the optimization will increase the number of iterations to converge.

## The Induced Exponential¶

The Induced Exponential function [KH15] is also a continuous and differentiable function that tends to the maximum operator when the aggregation parameter tends to infinity.

It can be shown that:

This means that using IKS function aggregation, the solution to the optimization problem is an approximation of the original problem. Since the IKS function is always smaller than the maximum, this approach always leads to infeasible solutions. By increasing the value of p, the IKS function will be closer to the maximum and the optimization will increase the number of iterations to converge.

Examples for constraint aggregation