Class SQPASEVariation1

  • All Implemented Interfaces:
    SQPASEVariation
    Direct Known Subclasses:
    SQPASEVariation2

    public class SQPASEVariation1
    extends Object
    implements SQPASEVariation
    This implementation is a modified version of the algorithm in the reference to solve a general constrained minimization problem using Sequential Quadratic Programming.
    • Field Detail

      • p

        protected int p
      • r

        protected final double r
      • lower

        protected final double lower
      • discretization

        protected final int discretization
      • foundPositiveDefiniteHessian

        protected boolean foundPositiveDefiniteHessian
      • epsilon

        protected final double epsilon
    • Constructor Detail

      • SQPASEVariation1

        public SQPASEVariation1​(double r,
                                double lower,
                                int discretization)
        Construct a variation.
        Parameters:
        r - Han's exact penalty function coefficient, the bigger the better, e.g., eq. 15.20
        lower - the lower bound of alpha; the smaller the better but cannot be zero
        discretization - the number of points between [lower, 1] to search for alpha; the bigger the better
      • SQPASEVariation1

        public SQPASEVariation1()
        Construct a variation.
    • Method Detail

      • set

        public void set​(RealScalarFunction f,
                        EqualityConstraints equal)
        Associate this variation to a particular general constrained minimization problem with only equality constraints.
        Parameters:
        f - the objective function to be minimized
        equal - the equality constraints
      • getInitialHessian

        public Matrix getInitialHessian​(Vector x0,
                                        Vector v0)
        Description copied from interface: SQPASEVariation
        Get the initial Hessian matrix.
        Specified by:
        getInitialHessian in interface SQPASEVariation
        Parameters:
        x0 - the initial minimizer
        v0 - the initial Lagrange multipliers for inequality constraints (mu)
        Returns:
        the initial Hessian matrix, e.g., identity
      • W

        protected Matrix W​(Vector x,
                           Vector u)
        Compute W.
        Parameters:
        x - the current minimizer
        u - the Lagrange multipliers for inequality constraints (mu)
        Returns:
        W
        See Also:
        "15.4b"
      • updateHessian

        public Matrix updateHessian​(Vector x1,
                                    Vector v1,
                                    Vector d,
                                    Vector g0,
                                    Matrix A0,
                                    Matrix W0)
        Description copied from interface: SQPASEVariation
        Update the Hessian matrix using the latest iterates.
        Specified by:
        updateHessian in interface SQPASEVariation
        Parameters:
        x1 - the next minimizer
        v1 - the next Lagrange multipliers for inequality constraints (mu)
        d - the minimizer increment
        g0 - the gradient
        A0 - the set of active equality constraints
        W0 - the current Hessian matrix
        Returns:
        the next Hessian matrix
      • alpha

        public double alpha​(Vector x,
                            Vector d,
                            Vector v)
        Description copied from interface: SQPASEVariation
        Get the percentage increment along the minimizer increment direction.
        Specified by:
        alpha in interface SQPASEVariation
        Parameters:
        x - the current minimizer
        d - the minimizer increment
        v - the Lagrange multipliers for inequality constraints (mu)
        Returns:
        the percentage increment