You should be writing
option cplex_options 'workfiledir C:\Users\zayta\Desktop\AMpL_model\temp';
since the version given in your message gives an "unknown keyword" error in CPLEX. Then are you saying that, when you DO NOT give this option command, you get the "CPLEX was unable to write a temporary file in the directory" error? And also when you DO give this option command you still get the error?
If this is the situation, you should check whether these directories (folders) are writeable, by trying to create a new file in C:\Users\zayta\Desktop\AMpL_model and in C:\Users\zayta\Desktop\AMpL_model\temp. If they are not writeable, then the only solution is to find a different directory that you have permission to write in. You might try, at the beginning of your AMPL session, giving the command
option TEMP;
to see what the default temporary directory is on your system; it is likely to be something like C:\Users\zayta\AppData\Local\Temp. Then try assigning this also as the CPLEX workfiledir.
Bob Fourer
am...@googleroups.com
=======