Initializing help system before first use

tee: multiple output destinations

The tee driver duplicates output into up to 6 files simultaneously. It is particularly useful for creating output log files while still being able to watch progress output on screen. If we wish to maintain screen display and at the same time log the output in the file burglarsol.txt for the example burglar2ff.mos from Section Alternative text data file formats we may use the following Mosel code:

 fopen("tee:burglarsol.txt&", F_OUTPUT+F_APPEND)
 writeln("Solution:\n Objective: ", getobjval)
 forall(i in ITEMS)  writeln(" take(", i, "): ", getsol(take(i)))
 fclose(F_OUTPUT)

The tee driver also works with the library functions, such as to duplicate all the output generated by a model (output to a file and on screen, Mosel C libraries):

XPRMsetdefstream(mod, XPRM_F_WRITE, "tee:burglarlog.txt&");

Analogously with other library interfaces, such as the Mosel Java library:

mod.setDefaultStream(XPRM.F_OUTPUT, "tee:burglarlog.txt&");

© 2001-2019 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.