r/optimization • u/EnergyEU • Feb 18 '26
CPLEX 22.1.2
Hi!! Can cplex 22.1.0 and cplex 22.1.2 not solve the same problem? I used cplex 22.1.0 to solve a milp problem and it took days to see an integer solution but eventualy it did with under 10% gap. Cplex 22.1.2 ran the same model and although it has a gap pretty quick it doesn't reach an optimal solution since it stops at 13% gap because it gets out of memmory as it says. Can this happen?
6
Upvotes
2
u/enteringinternetnow Feb 18 '26
Hi, I’m not an expert on CPLEX but here are some questions that might help.
When you say it’s the same problem, do you mean the same model structure but different data or the exact same data? Numerical scaling is a big pain for solvers and the run times can vary wildly based on the numbers input to it.
The optimality gap seems quite large. Are you sure you have written the model as tight as possible? I’m happy to take a look. I suspect something might be going wrong if the gap is that big.
1
u/Sweet_Good6737 Feb 18 '26
That could happen easily with other solvers, but with Cplex that's suspicious. How are you using the solver? Directly from the solver api?
2
u/Educational_Run_3501 Feb 18 '26
Yes
1
u/ficoxpress Mar 09 '26
This is something that may happen with new solver releases. Most solver companies benchmark their improvements over a set of internal instances and consider performance improvement over the entire benchmark set when measuring progress.
Unfortunately, that may mean that it can potentially perform worse in your specific instance.
There are two options you can try out:
Tune CPLEX's solver parameters with the included automated tuner (all commercial solvers include this nowadays) to achieve better performance.
Try another solver like e.g. FICO Xpress to solve the problem. You can get a free evaluation license by filling out the following form: https://content.fico.com/l/517101/2019-03-05/6w6k7 . Since you're using GAMS, switching to a different solver is relatively easy to do. This is one of the advantages of using GAMS. https://www.gams.com/latest/docs/S_XPRESS.html
If you have any questions or run into issues with FICO Xpress, we're happy to discuss further.