We're using Google OR-Tools for a complex product modelling problem. The solver is to provide default product configurations that satisfy all the constraints. This is equivalent to finding a single feasible solution of the problem. The problem is described by a basic product model (hundreds of constraints) plus user selections of values that are added as additional constraints.
Up until now, we've been using the older ConstraintSolver (working with c#) but we are investigating migrating to the highly touted CP-SAT Solver.
In the older ConstraintSolver, we use a custom DecisionBuilder for the following reasons:
1) We require that certain more important variables be decided first, so their domains are not restricted by unimportant variable's decisions.
2) The prefered value to be selected for some features depends on values of other features that may have been decided or become bound before the decision is made. A simple strategy like "select minimum value" won't work here.
3) Our custom DecisionBuilder also does some internal logging to be able to answer the question "why was that value chosen for feature X?". It keeps track of what values were still available at the time of the decision, and which variables had already been decided or become bound that restrict the domain. This assists the product modelers and end users.
In the new CP-SAT I see a method CpModel.AddDecisionStrategy(System.Collections.Generic.IEnumerable<Google.OrTools.Sat.IntVar>, Google.OrTools.Sat.DecisionStrategyProto.Types.VariableSelectionStrategy, Google.OrTools.Sat.DecisionStrategyProto.Types.DomainReductionStrategy)
with which the decision strategy can apparently be controlled.
The DecisionStrategyProto class has enum's VariableSelectionStrategy (e.g. DecisionStrategyProto.Types.VariableSelectionStrategy.ChooseFirst) and DomainReductionStrategy (e.g. DecisionStrategyProto.Types.DomainReductionStrategy.SelectMinValue) which look like they could be used to fulfill our first requirement.
I've been unable to find any examples of an extended or overloaded custom version of the decision strategy classes to be able to implement the second and third requirement.
Is there any way to make an equivalent of the custom DecisionBuilder for the CP-SAT solver? Are there any examples?