EuclideanOptimizable

class EuclideanOptimizable

A subclass of Optimizable for the optimization on Euclidean spaces, that is for solving optimization problems of the form

\[\begin{aligned} \min_{x\in \mathbb{R}^n} & \quad J(x) \\ s.t. & \left\{\begin{aligned} g_i(x) & =0 \text{ for all }0 \leqslant i \leqslant p-1,\\ h_j(x) & \leqslant 0 \text{ for all }0\leqslant j \leqslant q-1,\end{aligned}\right. \end{aligned}\]

where \(n\) is the dimension of the design space, \(p\) and \(q\) are the number of equality and inequality constraints.

On this case, the design variable is assumed to be a numpy array of length \(n\).

Implementing a class that inherits this subclass should comply with the following structure:

python
from nullspace_optimizer import EuclideanOptimizable

class MyEuclideanOptimizable(EuclideanOptimizable):
    # Initialization
    def x0(self):
        pass

    # Objective function
    def J(self, x):
        pass

    # Equality constraints
    def G(self, x):
        pass

    # Inequality constraints
    def H(self, x):
        pass

    # Derivative of the objective function
    def dJ(self, x):
        pass

    # Jacobian matrix of G
    def dG(self, x):
        pass

    # Jacobian matrix of H
    def dH(self, x):
        pass

    # Post processing every time a   
    # point on the optimization path is accepted
    def accept(self, params, results):
        pass

It is not necessary to define the methods inner_product and retract which are repsectively set automatically to the identity matrix and to retract(x,dx)=x + dx.