How to continue the Simulated annealing when Dynare stops?
Posted: Thu Mar 08, 2012 11:55 pm
Hi...
I am doing estimation using Simulated Annealing. In every iteration, model would be simulated using Dynare with different set of parameters. But once it encounters a set of parameters which cannot satisfy the rank condition, Dynare stops and the whole simulation is stopped.
Is there a way I can skip this run, and continue the annealing program for next iteration?
I did try to put a 'if' after Dynare file. For example:
Dynare file_name
load file_name_results
if ~isfield(oo_.dr,'ghx')
objective = 10000000000000000;
else
......(carry on my program)
end
But it doesn't work. Can anyone please let me know how can I solve this problem.
Thanks a lot.
I am doing estimation using Simulated Annealing. In every iteration, model would be simulated using Dynare with different set of parameters. But once it encounters a set of parameters which cannot satisfy the rank condition, Dynare stops and the whole simulation is stopped.
Is there a way I can skip this run, and continue the annealing program for next iteration?
I did try to put a 'if' after Dynare file. For example:
Dynare file_name
load file_name_results
if ~isfield(oo_.dr,'ghx')
objective = 10000000000000000;
else
......(carry on my program)
end
But it doesn't work. Can anyone please let me know how can I solve this problem.
Thanks a lot.