Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add on_event callback to solve() method #87

Merged
merged 6 commits into from
Apr 8, 2024

Conversation

tlambert03
Copy link
Member

@tlambert03 tlambert03 commented Mar 29, 2024

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)

Copy link

codecov bot commented Mar 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tlambert03
Copy link
Member Author

@cmalinmayor, this is ready for review

Copy link
Contributor

@cmalinmayor cmalinmayor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks great, and I tested with the plugin and it worked perfectly 😃 thanks!!

@tlambert03 tlambert03 merged commit 5415cd4 into funkelab:main Apr 8, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants