Skip to content

Proposal: Structured MIP progress logging using event callbacks #1147

@MySweetEden

Description

@MySweetEden

Motivation

For visualization, explainability, and fair comparison of MIP runs (including early termination by time or gap),
it is very useful to have a machine-readable progress log capturing:

  • incumbent (primal bound)
  • best bound (dual bound)
  • gap
  • time / nodes

While similar information is available in other solvers' MIP progress logs, in PySCIPOpt this currently requires custom event handler implementations.

Context

This proposal is inspired by and builds on the discussion in: #881

Recent PySCIPOpt versions already provide the necessary building blocks:

  • attachEventHandlerCallback
  • progress-related events such as GAPUPDATED and DUALBOUNDIMPROVED

This makes it possible to implement structured progress logging cleanly without modifying SCIP core behavior.

Proposal

I propose adding an official example or utility that implements structured MIP progress logging (CSV / TSV) on top of existing event callbacks.

Minimal example schema:

  • time_sec
  • nodes
  • incumbent
  • best_bound
  • gap
  • event

The implementation would be fully opt-in and purely event-based.

Next steps

I am currently traveling, but I plan to prepare a draft PR implementing a minimal progress logger based on this proposal next week.
Feedback on the proposed schema and triggering events would be very welcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions