numopt-js
    Preparing search index...

    Function constrainedGaussNewton

    • Performs constrained Gauss-Newton optimization for nonlinear least squares problems.

      Algorithm:

      1. Start with initial parameters p0 and states x0 (satisfying c(p0, x0) = 0)
      2. Compute effective Jacobian J_eff = r_p - r_x C_x^+ C_p
      3. Solve normal equations: (J_eff^T J_eff) δ = -J_eff^T r
      4. Update parameters: p_new = p_old + δ
      5. Update states: x_new = x_old + dx where (∂c/∂x) dx = -∂c/∂p · δ (linear approximation)
      6. Repeat until convergence

      The effective Jacobian captures all constraint effects, allowing the algorithm to use the same structure as unconstrained Gauss-Newton.

      Parameters

      • initialParameters: Float64Array

        Initial parameter vector p0

      • initialStates: Float64Array

        Initial state vector x0 (should satisfy c(p0, x0) = 0)

      • residualFunction: ConstrainedResidualFn

        Residual function r(p, x)

      • constraintFunction: ConstraintFn

        Constraint function c(p, x) = 0

      • options: ConstrainedGaussNewtonOptions = {}

        Optimization options

      Returns ConstrainedGaussNewtonResult

      Optimization result with final parameters, states, and constraint norm