[SCIP] Is there any way that I can reproduce the numbers of iterations and branch-and-bound nodes when using MIP

Ambros Gleixner gleixner at zib.de
Wed Jul 28 12:31:49 CEST 2021


Hi Tsung Yuan Tseng,

SCIP is deterministic, so if you run the same piece of code on the same 
machine you should get the same output.

However, there is a common behavior of MIP solvers called performance 
variability.  If you create the variables or constraints in a different 
order, e.g., this may already suffice to change the solving behavior. 
Maybe your Python code is prone to such nondeterminism?

Generally, if you want to compare performance for different versions of 
your model, it is recommended to run the models several times with 
different random seeds, i.e., changing the parameters 
"randomization/permutationseed" and/or "randomization/randomseedshift" 
you already posted. (lpseed is automatically changed with randomseedshift.)

Best,
Ambros





Am 26.07.21 um 08:32 schrieb Tseng, Tsung Yuan:
> Dear SCIP team,
> 
> 
> I use python and SCIP backend to solve the MIP problem.
> 
> I try to modify my MIP model, such as adding additional constraints, 
> change the format of the constraints, and so on, to see if the 
> modification will help with the solving procedure.  For example, I look 
> at the number of interactions and branch-and-bound nodes to see whether 
> it is helpful. If both numbers decrease, I will say the model is better.
> 
> However, when I don't change the model, e.g., constraints, variables, 
> the iterations and nodes outputting by the solver are still different, 
> which is bad if I want to manipulate the formulation because I cannot 
> tell if these are affected by the modified model or the randomness in 
> the solver.
> 
> I also try
> 
> `
> model.SetSolverSpecificParametersAsString("randomization/lpseed=0")
> model.SetSolverSpecificParametersAsString("randomization/permutationseed=0")
> model.SetSolverSpecificParametersAsString("randomization/randomseedshift=0")
> `
> 
> but still get different numbers of iterations and nodes after running 
> the same piece of code.
> 
> In the nutshell, is there any feature that can make the solver reproduce 
> the number of iterations and nodes with the same code? (Of course in the 
> same setting)
> 
> Thank you very much.
> 
> 
> Best Regards,
> 
> Tsung Yuan Tseng
> 
> Master Student @ RWTH M.S. Robotic Systems Engineering
> 
> My personal website: https://middleyuan.github.io/ 
> <https://middleyuan.github.io/>
> 
> 
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> https://listserv.zib.de/mailman/listinfo/scip
> 


More information about the Scip mailing list