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 frequency + fallback value selector #1057

Merged
merged 7 commits into from
Aug 23, 2023
Merged

Add frequency + fallback value selector #1057

merged 7 commits into from
Aug 23, 2023

Conversation

cprudhom
Copy link
Member

There's no doubt that BIVS is very useful. However, it is also time-consuming and it is not always appropriate to use it.
I propose, in this PR, to make it possible to indicate an alternative frequency and strategy.

@cprudhom cprudhom added this to the 4.11.0 milestone Aug 21, 2023
@jgFages
Copy link
Contributor

jgFages commented Aug 21, 2023

I agree that BIVS is costly. However, I would prefer the condition to be a generic function : IntVar -> Boolean. One implementation could be to be based on the number of backtracks, another could be based on the variable's name or domain. It could also be random...

@cprudhom
Copy link
Member Author

Ok, I can change to a more functional behavior even if sometimes when there's too much freedom you don't know what to choose :)

@@ -3,14 +3,14 @@ basics;Allergy.xml.lzma;1;_;1;0
basics;AllInterval-005.xml.lzma;1;_;13;9
basics;Auction-cnt-example_c18.xml.lzma;2;54;7;4
basics;Auction-sum-example_c18.xml.lzma;2;54;6;3
basics;Bacp-m1-06_c18.xml.lzma;3;10;38111;37700
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't we add the time ?
It should be compared with care but still it would be nice to have an idea if it is faster or slower

Copy link
Member Author

Choose a reason for hiding this comment

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

Honestly, I won't add this for the reason described here (https://buildjet.com/for-github-actions/blog/why-github-actions-is-so-slow#what-hardware-is-actually-github-actions-using).
In two words, you cannot select the hardware the VM is running on.
This explains why Minizinc tests often fail on GH even though they work on my computer.

It's something I've been wanting to check for a long time now, but I can't find the right way to do it.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree that GitHub test runtime is hard to trust, but this file is updated locally (i.e. on your computer), no ?
Even if it is not perfect (various contributors may have several machines), it may be better than nothing...

Copy link
Member Author

Choose a reason for hiding this comment

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

Such artifact already exists. For instance, https://github.com/chocoteam/choco-solver/actions/runs/5766875782 you can get the artifact which contains 2 files, one for xcsp and the other for mzn

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe the question should be: how to test performance regression?

jgFages
jgFages previously approved these changes Aug 22, 2023
@cprudhom
Copy link
Member Author

I propose to define the default application of BIVS each time, i.e. v -> true in order to keep the performance tests unchanged.

@mergify mergify bot dismissed jgFages’s stale review August 23, 2023 07:48

Pull request has been modified.

@cprudhom cprudhom closed this Aug 23, 2023
@cprudhom cprudhom reopened this Aug 23, 2023
@cprudhom cprudhom merged commit 250da97 into master Aug 23, 2023
16 of 17 checks passed
@cprudhom cprudhom deleted the dev_bivs branch August 23, 2023 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants