Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
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
Dynare
dynare
Commits
0147faad
Verified
Commit
0147faad
authored
3 years ago
by
Sébastien Villemot
Browse files
Options
Downloads
Patches
Plain Diff
Fix stack_solve_algo=1 without bytecode, on solve two boundaries simple/complete blocks
The result for the last simulation period was wrong.
parent
c9825c80
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#6783
passed
3 years ago
Stage: build
Stage: test
Stage: pkg
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
matlab/solve_two_boundaries.m
+3
-2
3 additions, 2 deletions
matlab/solve_two_boundaries.m
with
3 additions
and
2 deletions
matlab/solve_two_boundaries.m
+
3
−
2
View file @
0147faad
...
...
@@ -47,7 +47,7 @@ function [y, T, oo]= solve_two_boundaries(fname, y, x, params, steady_state, T,
% none.
%
% Copyright (C) 1996-202
0
Dynare Team
% Copyright (C) 1996-202
2
Dynare Team
%
% This file is part of Dynare.
%
...
...
@@ -187,8 +187,8 @@ while ~(cvg==1 || iter>maxit_)
B1_inv
=
inv
(
g1a
(
Elem
,
Elem
));
if
(
t
<
periods
)
S1
=
B1_inv
*
g1a
(
Elem
,
Elem_1
);
g1a
(
Elem
,
Elem_1
)
=
S1
;
end
g1a
(
Elem
,
Elem_1
)
=
S1
;
b
(
Elem
)
=
B1_inv
*
b
(
Elem
);
g1a
(
Elem
,
Elem
)
=
ones
(
Blck_size
,
Blck_size
);
if
t
<
periods
...
...
@@ -203,6 +203,7 @@ while ~(cvg==1 || iter>maxit_)
dx
=
ya
;
dx
(
y_Elem
)
=
za
-
ya
(
y_Elem
);
ya
(
y_Elem
)
=
ya
(
y_Elem
)
+
lambda
*
dx
(
y_Elem
);
y
(
y_index
,
y_kmin
+
periods
)
=
ya
(
y_Elem
);
for
t
=
periods
-
1
:
-
1
:
1
first_elem
=
(
t
-
1
)
*
Blck_size
+
1
;
last_elem
=
t
*
Blck_size
;
...
...
This diff is collapsed.
Click to expand it.
Sébastien Villemot
@sebastien
mentioned in commit
07eeb09d
·
3 years ago
mentioned in commit
07eeb09d
mentioned in commit 07eeb09d06dd9bd79b0957c92ddf356f804143c9
Toggle commit list
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