Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dynare
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johannes Pfeifer
dynare
Commits
d4b1857d
Verified
Commit
d4b1857d
authored
6 months ago
by
Sébastien Villemot
Browse files
Options
Downloads
Patches
Plain Diff
det_cond_forecast: remove commented code
parent
8e8d6508
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
matlab/perfect-foresight-models/det_cond_forecast.m
+1
-52
1 addition, 52 deletions
matlab/perfect-foresight-models/det_cond_forecast.m
with
1 addition
and
52 deletions
matlab/perfect-foresight-models/det_cond_forecast.m
+
1
−
52
View file @
d4b1857d
...
...
@@ -195,7 +195,6 @@ constrained_paths = zeros(n_periods, length(total_periods));
max_periods_simulation
=
0
;
for
i
=
1
:
n_periods
period_i
=
constrained_periods
{
i
};
%period_i
tp
=
total_periods
(
1
);
if
size
(
period_i
)
>
1
init_periods
=
period_i
(
1
);
...
...
@@ -234,7 +233,6 @@ if shocks_present
is_shock
=
zeros
(
length
(
total_periods
),
n_periods
);
for
i
=
1
:
n_periods
period_i
=
shock_periods
{
i
};
%period_i
tp
=
total_periods
(
1
);
if
size
(
period_i
)
>
1
init_periods
=
period_i
(
1
);
...
...
@@ -318,7 +316,7 @@ save_options_periods = options_.periods;
options_
.
periods
=
options_cond_fcst
.
periods
;
save_options_dynatol_f
=
options_
.
dynatol
.
f
;
options_
.
dynatol
.
f
=
1e-8
;
eps1
=
1e-7
;
%1e-4;
eps1
=
1e-7
;
exo
=
zeros
(
maximum_lag
+
options_cond_fcst
.
periods
,
nx
);
endo
=
zeros
(
maximum_lag
+
options_cond_fcst
.
periods
,
ny
);
endo
(
1
,:)
=
oo_
.
steady_state
'
;
...
...
@@ -452,21 +450,6 @@ if pf && ~surprise
cum_l1
=
cum_l1
+
length
(
constrained_vars
(
j1
));
end
% col_count = 1;
% for j = controlled_varexo'
% for time = time_index_constraint
% saved = oo_.exo_simul(time,j);
% oo_.exo_simul(time,j) = oo_.exo_simul(time,j) + eps1;
% simul();
% J1(:,col_count) = (oo_.endo_simul(indx_endo) - ys) / eps1;
% oo_.exo_simul(time,j) = saved;
% col_count = col_count + 1;
% end
% end
% J1
% sdfmlksdf;
disp
([
'iteration '
int2str
(
it
)
' error = '
num2str
(
normr
)]);
if
normr
<=
eps
...
...
@@ -477,7 +460,6 @@ if pf && ~surprise
old_exo
=
oo_
.
exo_simul
(
time_index_constraint
,:);
D_exo
=
-
J
\
r
;
col_count
=
1
;
%constrained_periods
for
j
=
controlled_varexo
'
oo_
.
exo_simul
(
time_index_constraint
,
j
)
=
oo_
.
exo_simul
(
time_index_constraint
,
j
)
+
D_exo
(
col_count
:
(
col_count
+
constrained_periods
-
1
));
col_count
=
col_count
+
constrained_periods
-
1
;
...
...
@@ -541,7 +523,6 @@ else
end
oo_
=
make_y_
(
M_
,
options_
,
oo_
);
end
%exo_init
oo_
.
exo_simul
=
exo_init
;
oo_
.
endo_simul
(:,
1
)
=
initial_conditions
;
...
...
@@ -649,7 +630,6 @@ else
cur_indx
=
M_
.
endo_nbr
+
find
(
M_
.
lead_lag_incidence
(
2
,:));
lead_indx
=
2
*
M_
.
endo_nbr
+
find
(
M_
.
lead_lag_incidence
(
3
,:));
cum_l1
=
0
;
%indx_x = zeros(length(constraint_index_t)* constrained_periods, 1);
cum_index_d_y_x
=
[];
indx_x
=
[];
for
k
=
1
:
per
...
...
@@ -731,37 +711,6 @@ else
cum_l1
=
cum_l1
+
length
(
constrained_vars_t
(
j1
));
end
% % Numerical computation of the derivatives in the second systme
% J1 = [];
% col_count = 1;
% for j = constraint_index_t
% j_pos = controlled_varexo(j);
% if constrained_perfect_foresight(j)
% for time = time_index_constraint
% saved = oo_.exo_simul(time,j_pos);
% oo_.exo_simul(time,j_pos) = oo_.exo_simul(time,j_pos) + eps1;
% simul();
% J1(:,col_count) = (oo_.endo_simul(indx_endo) - ys) / eps1;
% oo_.exo_simul(time,j_pos) = saved;
% col_count = col_count + 1;
% end
% else
% saved = oo_.exo_simul(maximum_lag+1,j_pos);
% oo_.exo_simul(maximum_lag+1,j_pos) = oo_.exo_simul(maximum_lag+1,j_pos) + eps1;
% simul();
% % indx_endo
% J1(:,col_count) = (oo_.endo_simul(indx_endo) - ys) / eps1;
% % J(:,col_count) = (oo_.endo_simul((pp - 1) * M_.endo_nbr + 1: pp * M_.endo_nbr) - ys) / eps1;
% oo_.exo_simul(maximum_lag+1,j_pos) = saved;
% col_count = col_count + 1;
% end
% end
% disp('J1');
% disp(full(J1));
% sdfmlk;
normr
=
norm
(
r
,
1
);
disp
([
'iteration '
int2str
(
it
)
' error = '
num2str
(
normr
)
' at time '
int2str
(
t
)]);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment