Skip to content
New issue

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

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

Already on GitHub? # to your account

Introducing blackbox search configurator #1058

Merged
merged 4 commits into from
Aug 24, 2023
Merged

Introducing blackbox search configurator #1058

merged 4 commits into from
Aug 24, 2023

Conversation

cprudhom
Copy link
Member

This PR aims at introducing a class, namely BlackBoxConfigurator.
This should ease the way search is configured.

Here is an bunch of code:

BlackBoxConfigurator bb = BlackBoxConfigurator.init();
bb.setIntVarStrategy(Search::failureRateBasedSearch)
  .setMetaStrategy(Search::lastConflict)
  .setRestartPolicy(solver -> AbstractRestart.NO_RESTART);
bb.make(model);

Doing so, it makes possible to pre-defined some configurations and applies them in one-line call.

It can appear to be redundant with Search. However, Search does not manage restarts or nogod-recording.
Here, in one class you have everything (hopefully) you should think of when it comes to define a search strategy.

@cprudhom cprudhom added this to the 4.11.0 milestone Aug 23, 2023
@mergify mergify bot dismissed ArthurGodet’s stale review August 24, 2023 09:33

Pull request has been modified.

Copy link
Collaborator

@ArthurGodet ArthurGodet left a comment

Choose a reason for hiding this comment

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

This is a great idea, it should really simplify the process of declaring searches.

@mergify mergify bot merged commit 6cdd154 into master Aug 24, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants