Skip to content

Commit

Permalink
do not time out on initial run
Browse files Browse the repository at this point in the history
  • Loading branch information
tholden committed Sep 2, 2016
1 parent d167903 commit af21628
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Core/EstimationObjective.m
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
catch
Mean = [];
end
if isempty( Mean ) || toc( StartTime ) > dynareOBC.EstimationTimeOutLikelihoodEvaluation
if isempty( Mean ) || ( ~InitialRun && toc( StartTime ) > dynareOBC.EstimationTimeOutLikelihoodEvaluation )
return;
end

Expand Down Expand Up @@ -132,7 +132,7 @@
TwoNLogLikelihood = 0;
for t = 1:T
[ Mean, RootCovariance, TwoNLogObservationLikelihood ] = KalmanStep( dynareOBC.EstimationData( t, : ), OldMean, OldRootCovariance, RootQ, MEVar, MParams, OoDrYs, dynareOBC, RequiredForMeasurementSelect, LagIndices, MeasurementLHSSelect, MeasurementRHSSelect, FutureValues, NanShock, AugStateVariables, SelectStateFromStateAndControls );
if isempty( Mean ) || toc( StartTime ) > dynareOBC.EstimationTimeOutLikelihoodEvaluation
if isempty( Mean ) || ( ~InitialRun && toc( StartTime ) > dynareOBC.EstimationTimeOutLikelihoodEvaluation )
TwoNLogLikelihood = Inf;
return;
end
Expand Down

0 comments on commit af21628

Please sign in to comment.