sim1: when there are NaNs/Infs, raise a warning rather than an error.

Otherwise the homotopy procedure can fail prematurely.

Thanks to Tom Holden for the suggestion.
time-shift
Sébastien Villemot 2014-05-12 12:14:28 +02:00
parent 26f2b301b0
commit 979101fa55
1 changed files with 1 additions and 1 deletions

View File

@ -171,7 +171,7 @@ if stop
skipline();
fprintf('\nSimulation terminated after %d iterations.\n',iter);
fprintf('Total time of simulation: %16.13f\n',etime(clock,h1));
error('Simulation terminated with NaN or Inf in the residuals or endogenous variables. There is most likely something wrong with your model.');
fprintf('WARNING: Simulation terminated with NaN or Inf in the residuals or endogenous variables. There is most likely something wrong with your model.\n');
else
skipline();
fprintf('\nSimulation concluded successfully after %d iterations.\n',iter);