Hello,
I am working on a planing generation project which includes rather complex contraints. I implemented two versions of the same engine using CBC and CP-SAT with similar capabilities. The CBC version works well so is working the CP-SAT version except for one type of constraint that make the problem infeasible. This constraint is a "people affinity" contraint which provide objectives of occurrence where people work together.
In general when I read solver logs I can identify the constraint that makes the solver unable to solve but in this case I see no relevant information.
I there any way to get more detail on the reason why the solver state that the model is infeasible during pre-solving? Can I influence the infeasibility criteria?
Here is the log I get when I enable the problematic constraint:
Starting CP-SAT solver v9.7.2996
Parameters: log_search_progress: true enumerate_all_solutions: true log_to_stdout: true
Setting number of workers to 1
Initial optimization model '': (model_fingerprint: 0xa7ffd9e5010759a6)
#Variables: 12'189 (#bools: 4'494 in objective)
- 11'894 Booleans in [0,1]
- 32 in
[-2147483648,
2147483647]
- 32 in [0,6]
- 214 in [0,21]
- 17 in [0,32]
#kBoolAnd: 2'278 (#enforced: 2'278) (#literals: 8'296)
#kBoolOr: 2'278 (#enforced: 2'278) (#literals: 6'018)
#kLinear0: 64 (#enforced: 64)
#kLinear1: 13'135 (#enforced: 10'604)
#kLinear2: 1'147 (#enforced: 64)
#kLinearN: 5'413 (#enforced: 2'584) (#terms: 85'325)
Starting presolve at 0.04s
INFEASIBLE: ''
Presolve summary:
- 0 affine relations were detected.
Problem closed by presolve.
CpSolverResponse summary:
status: INFEASIBLE
objective: NA
best_bound: NA
integers: 0
booleans: 0
conflicts: 0
branches: 0
propagations: 0
integer_propagations: 0
restarts: 0
lp_iterations: 0
walltime: 0.0772253
usertime: 0.0772256
deterministic_time: 0
gap_integral: 0
Another separate question I have is related to model I print using model.ExportToFile.
I am able to track constraint in the model file and there is something I found strange when i set a boolVar and its opposite for instance with this statement (I am using .NET):
model.AddBoolAnd(segmentsVars).OnlyEnforceIf(worksToday);
model.AddBoolOr(segmentsVarsI).OnlyEnforceIf(worksToday.Not());
The result I see in the model is the following:
constraints {
enforcement_literal: [6986]
bool_and {
literals: [6984, 6985]
}
}
constraints {
enforcement_literal: [-6987]
bool_or {
literals: [-6985, -6986]
}
}
I would have expected something like this for the second constraint:
constraints {
enforcement_literal: [-6986]
bool_or {
literals: [-6984, -6985]
}
}
Am I wrong?
Thanks for support
Maximilien