set_state_space.m: remove unused options_ input argument

kalman-mex
Johannes Pfeifer 2023-10-08 22:08:57 +02:00 committed by Sébastien Villemot
parent 328f6f3229
commit cbf57b1af6
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
16 changed files with 24 additions and 25 deletions

View File

@ -249,7 +249,7 @@ CheckPath('graphs',options_mom_.dirname);
options_mom_.mom.compute_derivs = false; % flag to compute derivs in objective function (might change for GMM with either analytic_standard_errors or analytic_jacobian (dependent on optimizer))
options_mom_.mom.vector_output = false; % specifies whether the objective function returns a vector
% decision rule
oo_.dr = set_state_space(oo_.dr,M_,options_mom_); % get state-space representation
oo_.dr = set_state_space(oo_.dr,M_); % get state-space representation
oo_.mom.obs_var = []; % create index of observed variables in DR order
for i = 1:options_mom_.obs_nbr
oo_.mom.obs_var = [oo_.mom.obs_var; find(strcmp(options_mom_.varobs{i}, M_.endo_names(oo_.dr.order_var)))];

View File

@ -105,7 +105,7 @@ if isfield(options_.osr,'maxit') || isfield(options_.osr,'tolf')
end
end
oo_.dr = set_state_space(oo_.dr,M_,options_);
oo_.dr = set_state_space(oo_.dr,M_);
par_0 = M_.params(i_params);
inv_order_var = oo_.dr.inv_order_var;

View File

@ -40,7 +40,7 @@ if isempty(options_.qz_criterium)
options_.qz_criterium = 1+1e-6;
end
oo_.dr=set_state_space(oo_.dr,M_,options_);
oo_.dr=set_state_space(oo_.dr,M_);
[dr,info] = resol(1,M_,options_,oo_.dr ,oo_.steady_state, oo_.exo_steady_state, oo_.exo_det_steady_state);

View File

@ -135,7 +135,7 @@ if ismember('moments', varargin) % Prior simulations (2nd order moments).
check_model(Model);
% Compute state space representation of the model.
oo__ = oo_;
oo__.dr = set_state_space(oo__.dr, Model, options_);
oo__.dr = set_state_space(oo__.dr, Model);
% Solve model
[T,R,~,info,oo__.dr, Model.params] = dynare_resolve(Model , options_ , oo__.dr, oo__.steady_state, oo__.exo_steady_state, oo__.exo_det_steady_state,'restrict');
if ~info(1)

View File

@ -116,7 +116,7 @@ end
%write back solution to dr
dr.ys =ys;
dr=set_state_space(dr,M_,options_);
dr=set_state_space(dr,M_);
T=H(dr.order_var,dr.order_var);
dr.ghu=G(dr.order_var,:);
if M_.maximum_endo_lag

View File

@ -268,7 +268,7 @@ else% Yes!
end
% Get informations about the variables of the model.
dr = set_state_space(oo_.dr,M_,options_);
dr = set_state_space(oo_.dr,M_);
oo_.dr = dr;
nstatic = M_.nstatic; % Number of static variables.
npred = M_.nspred; % Number of predetermined variables.

View File

@ -77,7 +77,7 @@ DynareOptions.stack_solve_algo = ep.stack_solve_algo;
dr = struct();
if ep.init
DynareOptions.order = 1;
DynareResults.dr=set_state_space(dr,DynareModel,DynareOptions);
DynareResults.dr=set_state_space(dr,DynareModel);
[DynareResults.dr,Info,DynareModel.params] = resol(0,DynareModel,DynareOptions,DynareResults.dr,DynareResults.steady_state, DynareResults.exo_steady_state, DynareResults.exo_det_steady_state);
end
@ -103,7 +103,7 @@ end
% hybrid correction
pfm.hybrid_order = ep.stochastic.hybrid_order;
if pfm.hybrid_order
DynareResults.dr = set_state_space(DynareResults.dr, DynareModel, DynareOptions);
DynareResults.dr = set_state_space(DynareResults.dr, DynareModel);
options = DynareOptions;
options.order = pfm.hybrid_order;
[pfm.dr, DynareModel.params] = resol(0, DynareModel, options, DynareResults.dr, DynareResults.steady_state, DynareResults.exo_steady_state, DynareResults.exo_det_steady_state);

View File

@ -20,7 +20,7 @@ function optimize_prior(DynareOptions, ModelInfo, DynareResults, BayesInfo, Esti
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
% Initialize to the prior mean
DynareResults.dr = set_state_space(DynareResults.dr,ModelInfo,DynareOptions);
DynareResults.dr = set_state_space(DynareResults.dr,ModelInfo);
xparam1 = BayesInfo.p1;
% Pertubation of the initial condition.

View File

@ -157,7 +157,7 @@ if options_.debug
save([M_.dname filesep 'Output' filesep M_.fname '_debug.mat'],'jacobia_')
end
dr=set_state_space(dr,M_,options_);
dr=set_state_space(dr,M_);
kstate = dr.kstate;
nstatic = M_.nstatic;
nfwrd = M_.nfwrd;

View File

@ -45,7 +45,7 @@ end
if ~isfield(oo_,'dr') || ~isfield(oo_.dr,'ghx')
fprintf('computing the first order solution of the model as initial guess...');
dr = struct();
oo_.dr=set_state_space(dr,M_,options_);
oo_.dr=set_state_space(dr,M_);
options_.order = 1;
[oo_.dr,Info,M_.params] = resol(0,M_,options_,oo_.dr ,oo_.steady_state, oo_.exo_steady_state, oo_.exo_det_steady_state);
fprintf('done\n');

View File

@ -83,7 +83,7 @@ sampled_prior_covariance = zeros(NumberOfParameters,NumberOfParameters);
file_line_number = 0;
file_indx_number = 0;
oo_.dr=set_state_space(oo_.dr,M_,options_);
oo_.dr=set_state_space(oo_.dr,M_);
hh_fig = dyn_waitbar(0,'Please wait. Prior sampler...');
set(hh_fig,'Name','Prior sampler.');

View File

@ -1,8 +1,9 @@
function dr=set_state_space(dr,DynareModel,DynareOptions)
function dr=set_state_space(dr,M_)
% dr=set_state_space(dr,M_)
% Write the state space representation of the reduced form solution.
%@info:
%! @deftypefn {Function File} {[@var{dr} =} set_state_space (@var{dr},@var{DynareModel},@var{DynareOptions})
%! @deftypefn {Function File} {[@var{dr} =} set_state_space (@var{dr},@var{M_})
%! @anchor{set_state_space}
%! @sp 1
%! Write the state space representation of the reduced form solution.
@ -12,10 +13,8 @@ function dr=set_state_space(dr,DynareModel,DynareOptions)
%! @table @ @var
%! @item dr
%! Matlab's structure describing decision and transition rules.
%! @item DynareModel
%! @item M_
%! Matlab's structure describing the model (initialized by dynare, see @ref{M_})
%! @item DynareOptions
%! Matlab's structure describing the current options (initialized by dynare, see @ref{options_}).
%! @end table
%! @sp 2
%! @strong{Outputs}
@ -51,10 +50,10 @@ function dr=set_state_space(dr,DynareModel,DynareOptions)
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
max_lead = DynareModel.maximum_endo_lead;
max_lag = DynareModel.maximum_endo_lag;
endo_nbr = DynareModel.endo_nbr;
lead_lag_incidence = DynareModel.lead_lag_incidence;
max_lead = M_.maximum_endo_lead;
max_lag = M_.maximum_endo_lag;
endo_nbr = M_.endo_nbr;
lead_lag_incidence = M_.lead_lag_incidence;
klen = max_lag + max_lead + 1;
fwrd_var = find(lead_lag_incidence(max_lag+2:end,:))';

View File

@ -58,7 +58,7 @@ if M_.exo_nbr > 0
oo_.exo_simul= ones(max(options_.periods,1) + M_.maximum_lag + M_.maximum_lead,1) * oo_.exo_steady_state';
end
oo_.dr=set_state_space(oo_.dr,M_,options_);
oo_.dr=set_state_space(oo_.dr,M_);
if options_.logged_steady_state %if steady state was previously logged, undo this

View File

@ -103,7 +103,7 @@ end
check_model(M_);
oo_.dr=set_state_space(oo_.dr,M_,options_);
oo_.dr=set_state_space(oo_.dr,M_);
if PI_PCL_solver
[oo_.dr, info] = PCL_resol(oo_.steady_state,0);

View File

@ -87,7 +87,7 @@ end
if options_.k_order_solver
orig_order = options_.order;
options_.order = local_order;
dr = set_state_space(dr,M_,options_);
dr = set_state_space(dr,M_);
[dr,info] = k_order_pert(dr,M_,options_);
options_.order = orig_order;
return

@ -1 +1 @@
Subproject commit 084372a314a5f3081dc055ba83dd879947809576
Subproject commit 16b063f666df679173e3da7f30ec1bff55755ddb