Cplex.jl change parameters and display info

This is the setting I use for solving problems with barrier, no presolve, no crossover.
Hope it can be useful.

CPXENV = CPLEX.Env()  # create CPLEX environment

# Set parameters
CPLEX.set_param!(CPXENV, "CPXPARAM_ScreenOutput", 1)  # Enable output
CPLEX.set_param!(CPXENV, "CPXPARAM_TimeLimit", 3600)  # Time limit
CPLEX.set_param!(CPXENV, "CPXPARAM_Threads", 1)  # Single thread
CPLEX.set_param!(CPXENV, "CPXPARAM_SolutionType", 2)  # No crossover
CPLEX.set_param!(CPXENV, "CPXPARAM_LPMethod", 4)  # Use barrier
CPLEX.set_param!(CPXENV, "CPXPARAM_Preprocessing_Presolve", 0)  # No presolve

...

CPLEX should display non-default parameters values at the beginning of the optimization.
For the above case, you should see something like this in the log:

...
CPXPARAM_Preprocessing_Presolve                  0
CPXPARAM_LPMethod                                4
CPXPARAM_Threads                                 1
CPXPARAM_SolutionType                            2
CPXPARAM_TimeLimit                               3600
...

FWIW, I’ve observed that CPLEX still performs a “reduced presolve”, even with the CPXPARAM_Preprocessing_Presolve set to 0.

As odow points out, the answer to all these questions will be in CPLEX’s documentation, there’s nothing additional that’s done in the Julia wrapper.

2 Likes