Scilab 5.5.0
- Aide de Scilab
- Optimisation et Simulation
- Optimization base
- optimbase_cget
- optimbase_checkbounds
- optimbase_checkcostfun
- optimbase_checkx0
- optimbase_configure
- optimbase_destroy
- optimbase_function
- optimbase_get
- optimbase_hasbounds
- optimbase_hasconstraints
- optimbase_hasnlcons
- optimbase_histget
- optimbase_histset
- optimbase_incriter
- optimbase_isfeasible
- optimbase_isinbounds
- optimbase_isinnonlincons
- optimbase_log
- optimbase_new
- optimbase_outputcmd
- optimbase_outstruct
- overview
- optimbase_proj2bnds
- optimbase_set
- optimbase_stoplog
- optimbase_terminate
Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
optimbase_log
Prints the given message.
Calling Sequence
opt = optimbase_log(opt, msg)
Argument
- opt
The object of TOPTIM type (tlist).
- msg
A string. The message to print.
Description
The optimbase_log
function prints the given message in the console,
if verbose logging is enabled. If verbose logging is disabled, does nothing.
If the -logfile
option has been set, writes the message into the file
instead of writing to the console. If the console is too slow, writing into a file can
be a solution, since it is very fast.
Example
opt = optimbase_new (); opt = optimbase_configure(opt, "-verbose", 1); optimbase_log ( opt , "My message" ); opt = optimbase_destroy(opt); // Writes the message into the file opt = optimbase_new (); opt = optimbase_configure(opt, "-verbose", 1); opt = optimbase_configure(opt,"-logfile",fullfile(TMPDIR,"mylogfile.txt")); myFile = optimbase_cget(opt,"-logfile") optimbase_log ( opt , "My message" ); opt = optimbase_destroy(opt) fd = mopen( fullfile(TMPDIR,"mylogfile.txt") , "r" ); mgetl ( fd , 2 )
See Also
- optimbase_stoplog — Prints the given stopping message.
Report an issue | ||
<< optimbase_isinnonlincons | Optimization base | optimbase_new >> |