diff --git a/matlab/simulated_moments_estimation.m b/matlab/simulated_moments_estimation.m index fd4c4c55a..e6bc6baa2 100644 --- a/matlab/simulated_moments_estimation.m +++ b/matlab/simulated_moments_estimation.m @@ -66,7 +66,9 @@ if nargin>3 end if ~master_is_running_a_job error('Master has to run one job!'); - end + end + estimated_parameters_optimization_path = [NaN;xparam]; + save('optimization_path.mat','estimated_parameters_optimization_path'); disp(' ') disp('Master talks to its slaves...') disp(' ') diff --git a/matlab/smm_objective.m b/matlab/smm_objective.m index 2191afae9..72d768c7c 100644 --- a/matlab/smm_objective.m +++ b/matlab/smm_objective.m @@ -127,7 +127,7 @@ else% parallel mode. eval(['job' int2str(job_master(1)) ';']) tElapsedMasterJob = etime(clock, tStartMasterJob); else - tElapsedMasterJob = 30*100; + % tElapsedMasterJob = 30*100; end tStart = clock; missing_jobs = 1; @@ -155,5 +155,11 @@ else% parallel mode. end r = transpose(simulated_moments-sample_moments)*weighting_matrix*(simulated_moments-sample_moments); +priorObjectiveValue = r; -priorObjectiveValue = r; \ No newline at end of file +if exist('optimization_path.mat') + load('optimization_path.mat'); + new_state = [ r; xparams]; + estimated_parameters_optimization_path = [ estimated_parameters_optimization_path , new_state ]; + save('optimization_path.mat','estimated_parameters_optimization_path'); +end \ No newline at end of file