numopt-js
    Preparing search index...

    Interface ConstrainedGaussNewtonOptions

    Options for constrained Gauss-Newton method.

    interface ConstrainedGaussNewtonOptions {
        constraintTolerance?: number;
        dcdp?: (parameters: Float64Array, states: Float64Array) => Matrix;
        dcdx?: (parameters: Float64Array, states: Float64Array) => Matrix;
        drdp?: (parameters: Float64Array, states: Float64Array) => Matrix;
        drdx?: (parameters: Float64Array, states: Float64Array) => Matrix;
        logLevel?: "DEBUG" | "INFO" | "WARN" | "ERROR";
        maxIterations?: number;
        onIteration?: (
            iteration: number,
            cost: number,
            parameters: Float64Array,
        ) => void;
        stepSizeP?: number;
        stepSizeX?: number;
        tolerance?: number;
        verbose?: boolean;
    }

    Hierarchy (View Summary)

    Index

    Properties

    constraintTolerance?: number

    Tolerance for checking constraint satisfaction c(p, x) = 0. If ||c(p, x)|| exceeds this value, a warning will be issued. Default: 1e-6

    dcdp?: (parameters: Float64Array, states: Float64Array) => Matrix

    Analytical partial derivative of constraint function with respect to parameters. If provided, this will be used instead of numerical differentiation. Returns a Matrix of size (constraintCount × parameterCount).

    dcdx?: (parameters: Float64Array, states: Float64Array) => Matrix

    Analytical partial derivative of constraint function with respect to states. If provided, this will be used instead of numerical differentiation. Returns a Matrix of size (constraintCount × stateCount). Supports both square (constraintCount == stateCount) and non-square matrices. For non-square matrices, the adjoint method uses normal equations with Cholesky decomposition.

    drdp?: (parameters: Float64Array, states: Float64Array) => Matrix

    Analytical partial derivative of residual function with respect to parameters. If provided, this will be used instead of numerical differentiation. Returns a Matrix of size (residualCount × parameterCount).

    drdx?: (parameters: Float64Array, states: Float64Array) => Matrix

    Analytical partial derivative of residual function with respect to states. If provided, this will be used instead of numerical differentiation. Returns a Matrix of size (residualCount × stateCount).

    logLevel?: "DEBUG" | "INFO" | "WARN" | "ERROR"

    Log level for detailed logging output. Controls which log messages are displayed:

    • DEBUG: Detailed progress information (cost, gradient norm, step size, etc.)
    • INFO: Convergence messages and important state changes
    • WARN: Warnings (singular matrix, max iterations reached, line search failure, etc.)
    • ERROR: Fatal errors (currently not used, reserved for future extensions)

    If verbose is true and logLevel is not specified, logLevel defaults to INFO. If both logLevel and verbose are specified, logLevel takes precedence. Default: undefined (no logging)

    maxIterations?: number

    Maximum number of iterations before stopping. Default: 1000

    onIteration?: (
        iteration: number,
        cost: number,
        parameters: Float64Array,
    ) => void

    Callback function called at each iteration for progress monitoring. Useful for debugging and monitoring convergence.

    stepSizeP?: number

    Step size for numerical differentiation with respect to parameters. Default: 1e-6

    stepSizeX?: number

    Step size for numerical differentiation with respect to states. Default: 1e-6

    tolerance?: number

    Tolerance for convergence check (gradient norm, step size, etc.). Default: 1e-6

    verbose?: boolean

    Enable verbose logging for debugging. When true, detailed information is logged to console. Default: false

    Use logLevel instead for more fine-grained control. If both logLevel and verbose are specified, logLevel takes precedence.