funkelab / motile

Multi-Object Tracker using Integer Linear Equations
https://funkelab.github.io/motile/
MIT License
27 stars 5 forks source link

Add on_event callback to solve() method #87

Closed tlambert03 closed 7 months ago

tlambert03 commented 8 months ago

This pull request adds an optional on_event callback parameter to the solve() method in the code. The on_event callback function will be called when the solver emits an event and should accept an event data dictionary.

It can be used to monitor progress of the solution. At the moment, due to the different APIs in SCIP and Gurobi, the approach will slightly depend on the backend. But I can also help with how to interpret the data that the callback is receiving (hint, it will always be a dict following the ilpy.EventData declaration)

codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 93.62%. Comparing base (a6ce446) to head (7c6dc0a).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #87 +/- ## ======================================= Coverage 93.61% 93.62% ======================================= Files 32 32 Lines 799 800 +1 ======================================= + Hits 748 749 +1 Misses 51 51 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

tlambert03 commented 8 months ago

@cmalinmayor, this is ready for review