highs-js API reference
    Preparing search index...

    Interface InterruptCallbackEvent

    Solver checkpoint at which JavaScript may request early termination.

    Calling interrupt() asks HiGHS to stop and normally produces model status highs.constants.modelStatus.interrupted. Decide from data already available in the handler, such as elapsed time or MIP gap. A separate postMessage() cannot update the decision while synchronous run() is blocking that Worker.

    interface InterruptCallbackEvent {
        data: CallbackData;
        message: string;
        type: 1 | 2 | 6;
        interrupt(): void;
    }

    Hierarchy (View Summary)

    Index

    Detached snapshot of fields available for this callback channel.

    message: string

    Native log/progress text. Do not assume it is non-empty or machine-parseable.

    type: 1 | 2 | 6

    Callback channel that triggered the event.

    • Requests interruption of the currently executing native solve. Valid only before the handler returns.

      Returns void