IBM Support

A note on reproducibility of CPLEX runs

Question & Answer


Question

Can CPLEX give different solutions when running with the same data in the same computing environment? How likely is it that the same scenario will yield different answers if run under two different environments?

Answer

If you are using the same data, parameters (including limits) and computing environment, CPLEX should give the same solutions. However, there are two exceptions. The first involves the non default opportunistic parallel MIP, which is nondeterministic. CPLEX's default parallel MIP algorithm is deterministic, so you will only encounter this if you explicitly set CPLEX's parallel optimization mode parameter to opportunistic. The second involves setting a finite time limit. Since the operating system time measurements are non deterministic, two consecutive runs may run for slightly different amounts of time, which can suffice to yield different results.

The same scenario on different platforms can give different answers. The platform consists of the hardware (specifically the chip instruction set), operating system and compiler, so a change in any of those could change the results. Results can change when the model has alternate optimal solutions to the problem. Slight differences in the floating point computations for different types of computers can change the path taken by CPLEX's algorithms, leading to alternate optimal solutions. Note that the objective value for an optimal problem will remain the same. Only the values of the decision variables can change.

Even if you are running CPLEX on the same platform, any slight change to the way the model was created can lead to alternate optimal basic solutions because of changes to the pivot sequence of the simplex method. This can be induced by changes in scaling, the order of rows or columns, the types of routines used to build the model, and differences in zeroing out of small coefficients. However, one solution is not better than the other. They both satisfy the criteria for an optimal solution given your tolerances.

If differences are a concern, you can reduce the likelihood they will occur by setting CPLEX's feasibility and optimality tolerances to their minimum values (1e-9) and setting CPLEX's Markowitz tolerance to its maximum value of 0.999.

[{"Product":{"code":"SSSA5P","label":"IBM ILOG CPLEX Optimization Studio"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Linear Programming","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.2;9.1.3;9.1.2;9.1;9.0;8.1;8.0;7.5;7.1;7.0;6.6;12.4;12.3;12.2;12.1;12.0;11.2.1;11.2;11.1.1;11.1;11.0.1;11.0;10.3;10.2.1;10.2;10.1.1;10.1;10.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}},{"Product":{"code":"SSSA5P","label":"IBM ILOG CPLEX Optimization Studio"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"},{"code":"PF017","label":"Mac OS"}],"Version":"12.4;12.3;12.2.0.1;12.2","Edition":"All Editions","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Historical Number

cplex/FAQ/61

Document Information

Modified date:
16 June 2018

UID

swg21399979