How to continue the Simulated annealing when Dynare stops?

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

How to continue the Simulated annealing when Dynare stops?

Postby yvette-hyq » 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.
yvette-hyq
 
Posts: 9
Joined: Fri Sep 10, 2010 9:51 am

Re: How to continue the Simulated annealing when Dynare stop

Postby yvette-hyq » Fri Mar 09, 2012 12:21 pm

Continue my post....
Or is there a code in Dynare to check the rank condition before it runs fully, so I can write a code to skip the set of parameters that cannot justify the rank condition and carry on the next iteration?

please..if anyone knows how to do...Really appreciate..
yvette-hyq
 
Posts: 9
Joined: Fri Sep 10, 2010 9:51 am

Re: How to continue the Simulated annealing when Dynare stop

Postby jpfeifer » Fri Mar 09, 2012 5:36 pm

If you run Dynare in a loop, embed the Dynare call in a Matlab "try-catch"-statement.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: How to continue the Simulated annealing when Dynare stop

Postby yvette-hyq » Mon Mar 12, 2012 1:55 pm

Thank you soooooooooo much...It works.
yvette-hyq
 
Posts: 9
Joined: Fri Sep 10, 2010 9:51 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 4 guests

cron