[AMPL 24694] Error in cplex options

Greetings, I am trying to run my model using the cplex optimizer, with the following options:

option solver cplex;
option cplex_options “mipdisplay=2, outlev=1, mipgap=0.001, timelimit=3600”;

When executing I get the following error:

Incorrect usage. Correct command syntax is:
cplex [-i] [-f | -c “” “” …]
Error at _cmdno 4 executing “solve” command

What is this error due to? I attach .mod, .dat and .run files

VRP2.dat (3.57 KB)

VRP.mod (1.76 KB)

vrp.run (294 Bytes)

When you specify “option solver cplex;” under Windows, AMPL looks for a program file named “cplex.exe” – first in the same folder as the AMPL program ampl.exe, and then in your system search path. When you see the message

Incorrect usage. Correct command syntax is:
cplex [-i] [-f | -c “” “” …]

it means that AMPL did not find our “CPLEX for AMPL” program but instead found the CPLEX Interactive Optimizer, which is a program also named cplex.exe that is part of IBM’s CPLEX distribution.

  • If you downloaded cplex.exe from us, then use the Windows search feature to look for other cplex.exe files and rename or delete them.
  • If you are trying to use the “CPLEX for AMPL” that is distributed by IBM, specify “option solver cplexamp;” instead of “option solver cplex;”.
    If you are using AMPL under Linux or macOS, the situation is the same except that the CPLEX program file is called “cplex” and the AMPL program file is called “ampl”.