The value ind=1 of optim is not supported by all algorithms.
Reported by Michael BAUDIN
Originally assigned to Michael BAUDIN
The help page states :
"The ind input argument is a message sent from the solver to the cost function so that the cost function knows what to compute.
* If ind=2, costf must provide f.
* If ind=3, costf must provide g.
* If ind=4, costf must provide f and g.
* If ind=1, costf can print messages.
When the imp option is set to a negative integer value, say m for example, the cost function is called back every -m iterations, with the ind=1 parameter. This can be used to print messages, fill a log file or creating an interactive plot. See below for sample uses of this feature."
The truth is that:
* Only optim/UNC/"qn" calls back the cost function with ind = 1. The other solves never call back f with ind = 1.
* If ind=1 and we do not compute f or g, then optim/UNC/"qn" fails.
* The imp=-m feature is only supported by optim/UNC/"qn". The imp=-m is ignored by most algorithms, but can make optim/UNC/"gc" go into an infinite loop. http://bugzilla.scilab.org/show_bug.cgi?id=9698
Hence, these features must be clarified the following way.
* f and g must be computed whatever the value of ind
* Only positive values of imp are available.