Skip to content

Support all ObjSCIP features - #44

Open
hedtke wants to merge 38 commits into
mainfrom
ivhedtke-messagehdlr
Open

hedtke wants to merge 38 commits into
mainfrom
ivhedtke-messagehdlr

Conversation

@hedtke

@hedtke hedtke commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #29

Plugins derived from SCIP's ObjSCIP base classes can now be used without touching the raw SCIP*.

API

  • Model::include<Plugin>(args...) constructs and includes a plugin derived from ObjBranchrule, ObjConshdlr, ObjCutsel, ObjDisp, ObjEventhdlr, ObjHeur, ObjIISfinder, ObjNodesel, ObjPresol, ObjPricer, ObjProp, ObjReader, ObjRelax, or ObjSepa. The plugin is constructed by SCIP++ because the base classes need the SCIP* in their constructors. SCIP takes ownership, the method returns a non-owning pointer or nullptr if including failed. Pricers are activated after including them.
  • Model::includeBenders<Benders>(nSubproblems, args...) includes and activates a Benders' decomposition together with SCIP's default Benders' cuts.
  • Model::includeBenderscut<Cut>(benders, args...) includes a custom Benders' cut.
  • Model::setMessagehdlr(std::unique_ptr<ObjMessagehdlr>) installs a message handler.
  • A new Model constructor takes std::unique_ptr<ObjProbData>, a new Model::addVar overload takes std::unique_ptr<ObjVardata>.

ObjTable is not supported because SCIP does not export it from its shared library, see scipopt/scip#222.

Notes

  • The kind of a plugin is selected by overload resolution on its base class. A plugin deriving from several base classes is rejected at compile time.
  • ObjConshdlr plugins must be included with needscons = FALSE, as SCIP++ cannot create constraints of a custom handler. The readme documents this and the other per-class caveats.
  • Every supported base class has a test with a minimal plugin, plus tests for the failure path where SCIP rejects a plugin and SCIP++ deletes it.
  • The coverage upload moved to codecov-action v7, with test results uploaded as a separate report type.

🤖 Generated with Claude Code

Closes #29

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.63%. Comparing base (44d6a47) to head (57437af).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #44      +/-   ##
==========================================
+ Coverage   97.75%   99.63%   +1.87%     
==========================================
  Files          10       11       +1     
  Lines         223      274      +51     
  Branches       64       87      +23     
==========================================
+ Hits          218      273      +55     
+ Misses          4        0       -4     
  Partials        1        1              
Files with missing lines Coverage Δ
include/scippp/model.hpp 100.00% <100.00%> (+3.70%) ⬆️
source/model.cpp 98.92% <100.00%> (+0.96%) ⬆️
source/model_objscip.cpp 100.00% <100.00%> (ø)

... and 4 files with indirect coverage changes

hedtke and others added 25 commits September 24, 2026 12:53
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@hedtke hedtke changed the title Add Model::setMessagehdlr to install custom message handlers Support all ObjSCIP features Sep 24, 2026
hedtke and others added 2 commits September 24, 2026 15:41
…re branches

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@hedtke hedtke assigned TiloW and unassigned TiloW Sep 24, 2026
@hedtke
hedtke requested a review from TiloW September 24, 2026 13:46
hedtke and others added 10 commits October 5, 2026 10:14
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

Support custom message handlers

2 participants