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?
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.
|Commerce||IBM ILOG CPLEX Optimization Studio||General||AIX, HP-UX, Linux, Solaris, Windows, Mac OS||12.4, 12.3, 188.8.131.52, 12.2||All Editions|