Are you seeing a message like this?
Incorrect usage. Correct command syntax is:
cplex [-i] [-f <commandfile> | -c "<command1>" "<command2>" ...]
When you specify "option solver cplex;" under Windows, AMPL looks for a program named "cplex.exe" -- first in the same folder as the AMPL program ampl.exe, and then in your system search path. When you get the above message, 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.
You can fix this problem as follows:
- 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 see some other error message or continue to have problems, you can get more help by posting the entire transcript of your AMPL session, including all of the lines you typed and all of the messages that were displayed. You can copy the session and paste it into your email, or provide a screenshot.