highs-js API reference
    Preparing search index...

    Interface CallbackData

    Detached callback payload. Fields are optional because one interface serves all channels; read only the fields documented for the active event.type.

    Channel field guide:

    • logging: log_type; use event.message for the text
    • simplex/IPM interrupt: the corresponding iteration count
    • MIP channels 3-7 and 9: runtime and available objective/bound metrics
    • mipSolution and mipImprovingSolution: mip_solution
    • mipCutPool: cut_pool

    MIP node and LP-iteration counts are native int64 values represented as bigint. Convert them before JSON.stringify; structured cloning and postMessage() support them directly in modern runtimes.

    interface CallbackData {
        cut_pool?: {
            indices: Int32Array;
            lower: Float64Array;
            numCols: number;
            numCuts: number;
            starts: Int32Array;
            upper: Float64Array;
            values: Float64Array;
        };
        ipm_iteration_count?: number;
        log_type?: number;
        mip_dual_bound?: number;
        mip_gap?: number;
        mip_node_count?: bigint;
        mip_primal_bound?: number;
        mip_solution?: Float64Array<ArrayBufferLike>;
        mip_total_lp_iterations?: bigint;
        objective_function_value?: number;
        running_time?: number;
        simplex_iteration_count?: number;
        readonly [key: string]: unknown;
    }

    Hierarchy

    • Readonly<Record<string, unknown>>
      • CallbackData

    Indexable

    • readonly [key: string]: unknown
    Index
    cut_pool?: {
        indices: Int32Array;
        lower: Float64Array;
        numCols: number;
        numCuts: number;
        starts: Int32Array;
        upper: Float64Array;
        values: Float64Array;
    }

    Present only for callback type 7.

    Type Declaration

    • Readonlyindices: Int32Array

      Zero-based column indices for cut coefficients.

    • Readonlylower: Float64Array

      Cut lower bounds, length numCuts.

    • ReadonlynumCols: number

      Number of model columns addressed by cut indices.

    • ReadonlynumCuts: number

      Number of cuts; starts.length === numCuts + 1.

    • Readonlystarts: Int32Array

      CSR starts delimiting each cut.

    • Readonlyupper: Float64Array

      Cut upper bounds, length numCuts.

    • Readonlyvalues: Float64Array

      Cut coefficients parallel to indices.

    ipm_iteration_count?: number

    Present only for callback type 2.

    log_type?: number

    Present only for callback type 0.

    mip_dual_bound?: number

    Best proven objective bound. It is a lower bound for minimization and upper bound for maximization.

    mip_gap?: number

    Relative distance between incumbent and proven bound; use it for progress displays or stopping policies.

    mip_node_count?: bigint

    Explored MIP node count; represented as bigint to preserve HighsInt.

    mip_primal_bound?: number

    Best feasible incumbent objective. It is an upper bound for minimization and lower bound for maximization.

    mip_solution?: Float64Array<ArrayBufferLike>

    Complete detached column vector, present only for MIP solution channels 3 and 4.

    mip_total_lp_iterations?: bigint

    Total MIP LP iterations, preserving native integer precision.

    objective_function_value?: number

    Objective of the solution associated with this event when the channel supplies one.

    running_time?: number

    Solver runtime in seconds, available on MIP callback channels.

    simplex_iteration_count?: number

    Present only for callback type 1.