'turning off the presolve for Cplex in Pyomo

I am trying to solve a MIP in pyomo with the Cplex solver (Interactive Optimizer 20.1.0.0). I want to turn off the presolve in pyomo, and I found out that I have to use:

opt = SolverFactory("cplex")
opt.options['preprocessing presolve'] = 0

, but I get the error:

CPLEX> New value could not be interpreted.
New value for presolve indicator ['y' or 'n']: New value could not be interpreted.

If I use:

opt = SolverFactory("cplex")
opt.options['preprocessing presolve', 'n']

I won't get any error, but I don't know that it worked or not. Since "Presolve time = 0.03 sec. (34.16 ticks)" in the output remains almost the same when I don't use the (opt.options['preprocessing presolve', 'n'])



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source