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 special handling for pseudo-boolean constraints #162

Closed
wants to merge 1 commit into from

Conversation

AllenZzw
Copy link
Collaborator

@AllenZzw AllenZzw commented Mar 20, 2025

Add special handling for two pseudo-boolean constraints:

  • $b_i + b_j \leq 1 === (\neg b_i) \vee (\neg b_j)$
  • $\sum_i b_i \geq 1 === \vee_i b_i$

Copy link

codecov bot commented Mar 20, 2025

Codecov Report

Attention: Patch coverage is 52.38095% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/huub/src/constraints/int_linear.rs 52.38% 9 Missing and 1 partial ⚠️
Files with missing lines Coverage Δ
crates/huub/src/constraints/int_linear.rs 86.19% <52.38%> (-1.12%) ⬇️
🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

codspeed-hq bot commented Mar 20, 2025

CodSpeed Performance Report

Merging #162 will degrade performances by 8.24%

Comparing AllenZzw:feat/special_linear (038212e) with develop (906daee)

Summary

❌ 1 regressions
✅ 13 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
satisfaction[amaze3_2012_03_19] 705.9 ms 769.4 ms -8.24%

@Dekker1
Copy link
Contributor

Dekker1 commented Mar 20, 2025

I think the idea of special handling is a good idea, but I'm not sure about this implementation. Didn't we talk about using the BoolLinAggregator from pindakaas?

I'll see if I can whip up an implementation so you can try and see if it also solves your case.

The main thing would be that it further simplifies the constraints and also allows use to further distinguish the different linear variants if we want to do something with it in the future.

@AllenZzw
Copy link
Collaborator Author

Yes, we should definitely try BoolLinAggregator. Just added two most common and useful cases here. We can try to switch to BoolLinAggregator once we have the interface.

@AllenZzw
Copy link
Collaborator Author

Close as this is handled in #163

@AllenZzw AllenZzw closed this Mar 20, 2025
@AllenZzw AllenZzw deleted the feat/special_linear branch March 20, 2025 23:49
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