I have an old optimization from 2 years ago that uses CPLEX 12.9 and ODH_CPLEX 4.0. I want to change the solver to CPLEX 20.1 (which is available in AIMMS 4.81). However, the list of AllSolvers does not include the new CPLEX. (nor ODH-CPLEX), so I cannot change the default to the new version. Is there somewhere else in the model that need to be updated for the list of solvers to update?
Best answer by mohansx
On AIMMS Cloud, the most recent versions of the solvers you chose as part of your subscription will be loaded automatically. Your subscription has ODH-CPLEX as an add-on.
We recommend that you have the same solver configuration on your Cloud account and the development machines to avoid hiccups like these.
You will need to export the solvers.slv file to override the default latest version of solver (for example, if you want to use CPLEX 12.10 instead of the latest CPLEX 20.1). See Change the Default Solvers Used — AIMMS How-To
As a workaround, you could try these statements. (remove the solvers.slv file from your project). These statements should be added after the ‘delegateToServer’ block and before the ‘solve’ statement.
sp_solver := FormatString("%e", last(indexSolvers|FindString(indexsolvers, “CPLEX"))); CurrentSolver('MIP') := StringToElement(AllSolvers, sp_solver);
sp_solver is a string parameter. The first line will find the last element in the set AllSolvers which contains “CPLEX”. If ODH-CPLEX is in the configuration, then this will return the latest version of ODH, which is ODH-CPLEX 5.3. If ODH is not present, then it will return the latest version of CPLEX, which is CPLEX 20.1.
If you want to search for CPLEX 20.1 only, then add a negation to the search like below.
sp_solver := FormatString("%e", last(indexsolvers|findstring(indexsolvers, "CPLEX") and not findstring(indexsolvers, "ODH")));