numopt-js
    Preparing search index...

    Interface AdjointBfgsOptions

    Options for reduced-space BFGS. Line search matches unconstrained BFGS (Strong Wolfe).

    interface AdjointBfgsOptions {
        constraintTolerance?: number;
        dcdp?: (parameters: Float64Array, states: Float64Array) => Matrix;
        dcdx?: (parameters: Float64Array, states: Float64Array) => Matrix;
        dfdp?: (parameters: Float64Array, states: Float64Array) => Float64Array;
        dfdx?: (parameters: Float64Array, states: Float64Array) => Float64Array;
        lineSearchOptions?: StrongWolfeLineSearchOptions;
        logLevel?: "DEBUG" | "INFO" | "WARN" | "ERROR";
        maxIterations?: number;
        onIteration?: (
            iteration: number,
            cost: number,
            parameters: Float64Array,
        ) => void;
        regularization?: number;
        stepSize?: number;
        stepSizeP?: number;
        stepSizeX?: number;
        tolerance?: number;
        useLineSearch?: boolean;
        verbose?: boolean;
    }

    Hierarchy (View Summary)

    Index
    constraintTolerance?: number

    Tolerance for ||c(p, x)|| = 0. Default: 1e-6

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

    Analytical ∂c/∂p. Size constraintCount × parameterCount.

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

    Analytical ∂c/∂x. Must be square (constraintCount === stateCount). Ill-conditioned Jacobians can be sensitive; raise regularization if needed.

    dfdp?: (parameters: Float64Array, states: Float64Array) => Float64Array

    Analytical ∂f/∂p. Used instead of finite differences when provided.

    dfdx?: (parameters: Float64Array, states: Float64Array) => Float64Array

    Analytical ∂f/∂x. Used instead of finite differences when provided.

    lineSearchOptions?: StrongWolfeLineSearchOptions

    Options passed to Strong Wolfe line search.

    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.

    regularization?: number

    Base Tikhonov regularization for solves involving ∂c/∂x. Default: 0 (an automatic floor may still apply when the Jacobian is singular)

    stepSize?: number

    Fixed step size used only when useLineSearch is false. Default: 1.0

    stepSizeP?: number

    Finite-difference step for derivatives with respect to parameters. Default: 1e-6

    stepSizeX?: number

    Finite-difference step for derivatives with respect to states. Default: 1e-6

    tolerance?: number

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

    Levenberg-Marquardt and constrained Levenberg-Marquardt prefer tolGradient / tolStep / tolResidual. If those are omitted, this value is used as a common fallback.

    useLineSearch?: boolean

    Whether to use Strong Wolfe line search. Default: true

    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.