3

I wonder what the solver.Response.NumConflicts information means exactly. In the documentation(s) I found statements like

Returns the number of conflicts since the creation of the solver. (https://developers.google.com/optimization/reference/python/sat/python/cp_model#numconflicts)

That does not really satisfies my questioning. Does it tell something about the number of times a constraint has been hurt? Or is it some kind of indicator of how exact the solution is? Eventhough it is not zero for optimal solutions.

And a connected question: What could be the most conclusive info about the solution quality?

Thank you

1 Answers1

2

See: https://github.com/google/or-tools/issues/1398#issuecomment-508396143

Num conflicts returns the number of conflicts generated during search. Roughly, a conflict equals to a dead end in the search tree.

Stradivari
  • 2,626
  • 1
  • 9
  • 21
  • Cheers mate! However I managed not to find this post... And do you have an idea about my "connected question" (dunno whether it is bad practice to connect questions this way!?) – The Random Forum Guy Feb 21 '20 at 15:19
  • 2
    The best info you will get is the gap between the solution value and the best objective bound (aka the lower bound of the objective value when minimizing). Do you have something different in mind ? – Laurent Perron Feb 21 '20 at 19:22
  • Ok, I see. That makes sense to me, thank you. I still think about what intel about a system investigated you can get by the NumConflicts-value. Imagine having an electric system with suppliers and consumers as well as energy storages. If the task would be to use all of the periodicly produced energy (e.g. by wind turbines or similar) and to satisfy constant consumer needs. Would the NumConflicts tell something about the dimensioning quality of the system elements? (E.g. zero conflicts, because I the power levels provided match well, resulting in no dead branches) – The Random Forum Guy Feb 21 '20 at 20:02
  • 4
    No, it just tells you how hard it was to find a solution. It tells you about the quality of the model, not the quality of the solution. – Laurent Perron Feb 21 '20 at 20:25
  • So, related to the scenario described this somehow is the process in between dimensioning the real world components and the solving. Thank you so much for your quick response time at nearly every day and night time! When I'm a little more experienced I would love to further improve the documentation – The Random Forum Guy Feb 22 '20 at 09:28