I'm encoding a scheduling problem with the Z3 solver using the z3py API. It works pretty well apart from the fact that the runtimes of the solver differs in time (sometimes by factor 10/100) in each run. What I often do if the solver takes too long, I just kill the query and restart it.
It seems to me that the solver (for each run) takes a somehow different path to find a solution, which results in different run times.
So my question is, whether I can force a solver to take the same(similar) path every time for the same set of constraints (problem)?
After doing some research I stumbled upon the concept of setting a random seed manually. Would that help me? Is there any more info how to do that with the python api?
best
Jenny