When I write run file for my problem, I want to use log_file
command, so after I load data and model, I write following option command:
option solver cplex
;
option omit_zero_rows 0
;
option presolve 1
;
option show_stats 1
;
option csvdisplay_header 0
;
option log_file AMPL_log.txt
;
option cplex_options 'timelimit 900'
;
solve
;
However, when I run it on AMPL
, the terminal shows the information
"Error at _cmdno 6 executing "option" command can't open "AMPL_Log.txt" "
I don't know where I made a mistake in this code.
The error can't open <filename>
is often caused by not having permissions to write the file (or, on Windows, if the file is already opened by another application). By default AMPL creates the log file in the current working directory, but you can specify the full path to the location where you have write permissions, e.g. in your home directory:
option log_file '/path/to/log/file';