|
Nasser Abbasi wrote:
> "Yao Li" <yaoamber@gmail.com> wrote in message
> news:h8undl$f3k$1@fred.mathworks.com...
>> Dear all,
>>
>> I am running an intensive computational work for a nonlinear system
>> optimization. I use lsqnonlin. Now it has been running for more than a
>> couple of days. Is there any way I can know how much time left? Since it
>> has already been running for a long time, I don't want to break it if it
>> is almost towards the end.
>>
>> Previously, I only use tic toc to get the rough time elapsed for each
>> round. But this time the program is continuing running....
>>
>> Any thoughts would be appreciated!
>>
>> All my best,
>> Amber
>
> Clearly this is something you have to program in yourself. Matlab has no way
> to know this? How could it?
>
> For example, if you have a convergence criteria, you can use that to display
> the progress towards this limit, etc...
>
> It sounds may be your program is stuck in some loop may be? :) use your OS
> tools to see if matlab is still consuming more ram, or stuck at the same CPU
> limit. This could give some clues.
>
> For long running programs, it is very important to add logic to the code to
> save its state every once in a while, and to add logic yourself to monitor
> its progress. The definition of progress depends on the nature of your
> program.
>
> good luck
>
> --Nasser
>
>
In addition, you can call one of the built-in plot functions to monitor
the progress of your optimization. It is too late for this particular
run, but next time you might want to try:
options = optimset('PlotFcns',{@optimplotresnorm,@optimplotfirstorderopt})
or use some of the other available plots. For more info, see
http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/lsqnonlin.html#f265106
Alan Weiss
MATLAB mathematical toolbox documentation
|