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?
Check is there is a ``solvers.slv`` file in your project’s root folder. (This file is needed to be able to use non default solvers when deployed onto AIMMS Cloud).
You can either
- Delete the solvers.slv file, open your project, set the defaults, and export the solvers.slv again OR
- Open the project, and add the new solver versions you want in the Solver configuration window by clicking “Add”
Thank you so much. It worked and I was able to add the CPLEX 20.1. However, since I have ODH-CPLEX 5.4 on the PRO, but not on the Developer license, it does not let me add it. Are all solvers already included on the cloud installation of the AIMMS?
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")));
Thanks, Mohan. This actually not only solves my current problem, it makes maintaining the models for future releases of CPLEX and ODH-CPLEX easier.
Reply
Sign up
Already have an account? Login
Please use your business or academic e-mail address to register
Login to the community
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.