2
$\begingroup$

I'm unable to achieve true determinism in CPLEX (I'm using the DOCplex python API). Even if the best integer optimal solution is found without going to timeout (so it is expected to be unique), two identical separate runs leads to different results.

I'm setting the model parameters in this way:

cplex_model.parameters.randomseed = 42
cplex_model.parameters.threads = 1

Also I'm fixing every random seed that could be involved:

os.environ['PYTHONHASHSEED'] = str(seed)
np.random.seed(seed)
random.seed(seed)
$\endgroup$
2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.