Skip to content

Conversation

@HunkBenny
Copy link
Contributor

Hi Mo!

I needed to access children of a node in a pet-project of mine, thought I would add the functionality.
Tests should be included as well!

Maybe unrelated, feel free to not answer;
I tried creating a custom branching-rule that should work together with the already existing ones in SCIP. All the branching decisions that my rule makes throughout the tree, should be passed on to all of the node's descendants. For this, I keep a BTreeMap that is indexed by the node index and contains all the decisions made for a node (similar to the Ryan-Foster branching from the examples).

However, if SCIP uses its own branching rules, then the indexes of the Map were not updated. Therefore I added an event handler that is called after branching. This way I can simply update the Map manually. Do you think that this is the best way of tackling this issue? Or should I use the SCIP_BranchruleData that is written about in the documentation?

@HunkBenny
Copy link
Contributor Author

HunkBenny commented Nov 24, 2025

Yikes, something goes wrong in col.rs@test_col.

This only happens for linux-conda-test, I believe that this happens because conda uses the newest SCIP (10.0), whilst linux-bundled-test uses v9.2.4.

As you guys are probably pretty busy with the new release of SCIP, I will try and check later this week if I can compile locally against SCIP 10.0!

@mmghannam
Copy link
Member

Yikes, something goes wrong in col.rs@test_col.

This only happens for linux-conda-test, I believe that this happens because conda uses the newest SCIP (10.0), whilst linux-bundled-test uses v9.2.4.

As you guys are probably pretty busy with the new release of SCIP, I will try and check later this week if I can compile locally against SCIP 10.0!

Feel free to change the pipeline for now to use SCIP 9.2.4.

Thank you for your contribution! It looks good to me on a first glance, I'll take another look sometime in the next days.

@mmghannam
Copy link
Member

Maybe unrelated, feel free to not answer; I tried creating a custom branching-rule that should work together with the already existing ones in SCIP. All the branching decisions that my rule makes throughout the tree, should be passed on to all of the node's descendants. For this, I keep a BTreeMap that is indexed by the node index and contains all the decisions made for a node (similar to the Ryan-Foster branching from the examples).

However, if SCIP uses its own branching rules, then the indexes of the Map were not updated. Therefore I added an event handler that is called after branching. This way I can simply update the Map manually. Do you think that this is the best way of tackling this issue? Or should I use the SCIP_BranchruleData that is written about in the documentation?

I can't think of an easier solution than what you did. As far as I know, the SCIP_BranchruleData is a placeholder type that each plugin overrides with its own type, and this is what russcip uses to give ownership of the type that implements the BranchRule trait.

@HunkBenny
Copy link
Contributor Author

I can't think of an easier solution than what you did. As far as I know, the SCIP_BranchruleData is a placeholder type that each plugin overrides with its own type, and this is what russcip uses to give ownership of the type that implements the BranchRule trait.

Alright! Good to know, thanks!

@codecov
Copy link

codecov bot commented Nov 29, 2025

Codecov Report

❌ Patch coverage is 92.30769% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.49%. Comparing base (10c29b4) to head (844223e).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
src/node.rs 92.31% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #268      +/-   ##
==========================================
+ Coverage   76.37%   76.49%   +0.12%     
==========================================
  Files          29       29              
  Lines        3830     3871      +41     
==========================================
+ Hits         2925     2961      +36     
- Misses        905      910       +5     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mmghannam mmghannam merged commit 174e248 into scipopt:main Nov 30, 2025
8 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