I have a MIP model written in Xpress-Mosel. I set
to get the MIP log from the solver. How can I save this log to a file at runtime, while also seeing the output on the command prompt?
You can use the "tee:" I/O driver (see Mosel Language Reference Manual, section '2.14 File names and input/output drivers') to duplicate the output to up to 6 simultaneous output locations, for example output on screen + to a file 'mylog.txt':
fopen("tee:mylog.txt&", F_OUTPUT) ! overwrites mylog.txt, use F_OUTPUT+F_APPEND to write into an existing file
fclose(F_OUTPUT) ! revert to previous (default) setting
Retrieving data ...