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

Tseng, Tsung Yuan tsung.yuan.tseng at rwth-aachen.de
Fri Jul 30 13:28:31 CEST 2021


Dear Ambros Gleixner,

Thank you for your reply. It is very helpful.
Although there is no randomness for setting up the constraints and variables in my program, I will still take a closer look.

I use or-tool and use scip backend. To your best knowledge, is there any possibility that or-tool causes this non-determinism?

Thank you very much.


Best Regards,

Tsung Yuan Tseng

Master Student @ RWTH M.S. Robotic Systems Engineering

My personal website: https://middleyuan.github.io/

________________________________
From: Scip <scip-bounces at zib.de> on behalf of Ambros Gleixner <gleixner at zib.de>
Sent: Wednesday, July 28, 2021 12:31:49 PM
To: scip at zib.de
Subject: Re: [SCIP] Is there any way that I can reproduce the numbers of iterations and branch-and-bound nodes when using MIP

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
>
_______________________________________________
Scip mailing list
Scip at zib.de
https://listserv.zib.de/mailman/listinfo/scip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20210730/2a0850cf/attachment.html>


More information about the Scip mailing list