The following string expression evaluates to a fixed filename followed by the current date:
ampl: print "foo" & substr(date(),1,8) & ".txt";
foo20160710.txt
You can use this expression in an option statement, as long as you put parentheses around it so that AMPL can recognize that it is an expression:
ampl: option log_file ("foo" & substr(date(),1,8) & ".txt");
ampl: option log_file;
option log_file foo20160710.txt;
Bob Fourer
am...@googlegroups.com
=======