Commit 39e55cad authored by Johannes Pfeifer 's avatar Johannes Pfeifer Committed by Sébastien Villemot
Browse files

Corrected AIM error codes that got lost when moving to stochastic_solvers

parent bda0b1b2
......@@ -83,7 +83,7 @@ if (ia ~= 0)
[w,rts,lgroots,flag_trouble]=SPEigensystem(a,uprbnd,min(length(js),qrows-iq+1));
if flag_trouble==1;
disp('Problem in SPEIG');
aimcode=63;
aimcode=64;
return
end
q = SPCopy_w(q,w,js,iq,qrows);
......
......@@ -28,6 +28,8 @@ function [dr,aimcode,rts]=dynAIMsolver1(jacobia_,M_,dr)
% (c==5) e='Aim: q(:,right) is singular.';
% (c==61) e='Aim: too many exact shiftrights.';
% (c==62) e='Aim: too many numeric shiftrights.';
% (c==63) e='Aim: A is NAN or INF.';
% (c==64) e='Aim: Problem in SPEIG.';
% else e='Aimerr: return code not properly specified';
%
% SPECIAL REQUIREMENTS
......
......@@ -73,7 +73,7 @@ function [dr,info]=AIM_first_order_solver(jacobia,M,dr,qz_criterium)
[dr,aimcode]=dynAIMsolver1(jacobia,M,dr);
if aimcode ~=1
info(1) = aimcode;
info(1) = convertAimCodeToInfo(aimCode); %convert to be in the 100 range
info(2) = 1.0e+8;
return
end
......
......@@ -13,6 +13,8 @@ function [info] = convertAimCodeToInfo(aimCode)
% (aimCode==5) e='Aim: q(:,right) is singular.';
% (aimCode==61) e='Aim: too many exact shiftrights.';
% (aimCode==62) e='Aim: too many numeric shiftrights.';
% (aimCode==63) e='Aim: A is NAN or INF.';
% (aimCode==64) e='Aim: Problem in SPEIG.';
%
% OUTPUTS
% info [integer] Code to be used to print error in print_info.m
......@@ -53,6 +55,10 @@ switch aimCode
info = 161;
case 62
info = 162;
case 63;
info = 163;
case 64
info = 164;
otherwise
info = 1;
end
\ No newline at end of file
......@@ -95,19 +95,23 @@ if ~noprint
case 102
error('Aim: roots not correctly computed by real_schur');
case 103
error('Aim: too many big roots');
error('Aim: too many explosive roots: no stable equilibrium');
case 135
error('Aim: too many big roots, and q(:,right) is singular');
error('Aim: too many explosive roots, and q(:,right) is singular');
case 104
error('Aim: too few big roots');
error('Aim: too few explosive roots: indeterminacy');
case 145
error('Aim: too few big roots, and q(:,right) is singular');
error('Aim: too few explosive roots, and q(:,right) is singular');
case 105
error('Aim: q(:,right) is singular');
case 161
error('Aim: too many exact shiftrights');
case 162
error('Aim: too many numeric shiftrights');
case 163
error('Aim: A is NAN or INF.')
case 164
error('Aim: Problem in SPEIG.')
otherwise
error('This case shouldn''t happen. Contact the authors of Dynare')
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment