d-krupke / cpsat-primer

The CP-SAT Primer: Using and Understanding Google OR-Tools' CP-SAT Solver
https://d-krupke.github.io/cpsat-primer/
Creative Commons Attribution 4.0 International
292 stars 27 forks source link

subsolvers for BoolVar #6

Closed earlylinzi closed 10 months ago

earlylinzi commented 1 year ago

I use CpModel and my variables are all BoolVar(0-1) .

I want ask : Which subsolvers are unuseful that I can exclude them ?

Thank you ! And waiting your advise.

d-krupke commented 1 year ago

Hey, That very much depends on the constraints. It is primarily the constraints that shape the solution space and define which approach will deal with it the quickest. A simple approach is just to run the default configuration for a few instances and check, which subsolvers contributed to the progress. However, you probably won't be able to make huge gains by tuning the subsolver selection, probably just a few percent runtime improvements. The biggest gains are usually in using the right formulation, and sometimes in using warm starts, i.e., providing a reasonably good initial solution if the solver struggles with finding one itself.

earlylinzi commented 1 year ago

Ok, got it. Thank you for your advice.