Hi!
I'm using CP-SAT to enumerate all feasible solutions, however in my problem there are variables that I "care about" and others are just "helper variables". A toy example: x,y,z with the constraint x=y, but I only want to enumerate all possible assignments to {x,y}.
So far, I found two ways to do that:
1. Run Solve(cp_model) in a loop, adding an Or constraint after every solution to fix at least one literal different to the current solution.
2. Run with the NewFeasibleSolutionObserver and iterate over all full assignments, computing a hash key for each one based on my key variables and thus merging the equivalent assignments manually.
Both of these seem quite inefficient, for different reasons. Is there another way I'm missing? I'd like to basically tell the solver to enumerate all assignments to a subset of variables.
Thank you!
Ola