Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
DynareJulia
LinearRationalExpectations.jl
Commits
732e5ca9
Commit
732e5ca9
authored
Apr 16, 2021
by
Sébastien Villemot
Browse files
Merge branch 'stationary' into 'master'
Stationary See merge request
DynareJulia/LinearRationalExpectations.jl!1
parents
9d0075ba
b1ef7cb7
Pipeline
#5159
passed with stage
in 35 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Project.toml
View file @
732e5ca9
name
=
"LinearRationalExpectations"
name
=
"LinearRationalExpectations"
uuid
=
"45f42fbc-210c-4ecc-9452-59ec793b9bfd"
uuid
=
"45f42fbc-210c-4ecc-9452-59ec793b9bfd"
authors
=
[
"michel "
]
authors
=
[
"michel "
]
version
=
"0.1.
0
"
version
=
"0.1.
1
"
[deps]
[deps]
FastLapackInterface
=
"29a986be-02c6-4525-aec4-84b980013641"
FastLapackInterface
=
"29a986be-02c6-4525-aec4-84b980013641"
...
...
src/extended_lyapunov.jl
View file @
732e5ca9
...
@@ -15,6 +15,7 @@ struct LyapdWs
...
@@ -15,6 +15,7 @@ struct LyapdWs
dgees_ws
::
DgeesWs
dgees_ws
::
DgeesWs
linsolve_ws1
::
LinSolveWs
linsolve_ws1
::
LinSolveWs
linsolve_ws2
::
LinSolveWs
linsolve_ws2
::
LinSolveWs
stationary_model
::
Bool
function
LyapdWs
(
n
)
function
LyapdWs
(
n
)
AA
=
Matrix
{
Float64
}(
undef
,
n
,
n
)
AA
=
Matrix
{
Float64
}(
undef
,
n
,
n
)
AAtemp
=
Matrix
{
Float64
}(
undef
,
n
,
n
)
AAtemp
=
Matrix
{
Float64
}(
undef
,
n
,
n
)
...
@@ -27,9 +28,10 @@ struct LyapdWs
...
@@ -27,9 +28,10 @@ struct LyapdWs
dgees_ws
=
DgeesWs
(
n
)
dgees_ws
=
DgeesWs
(
n
)
linsolve_ws1
=
LinSolveWs
(
n
)
linsolve_ws1
=
LinSolveWs
(
n
)
linsolve_ws2
=
LinSolveWs
(
2
*
n
)
linsolve_ws2
=
LinSolveWs
(
2
*
n
)
stationary_model
=
true
new
(
AA
,
AAtemp
,
AA2
,
BB
,
temp1
,
XX
,
nonstationary_variables
,
new
(
AA
,
AAtemp
,
AA2
,
BB
,
temp1
,
XX
,
nonstationary_variables
,
nonstationary_trends
,
dgees_ws
,
linsolve_ws1
,
nonstationary_trends
,
dgees_ws
,
linsolve_ws1
,
linsolve_ws2
)
linsolve_ws2
,
stationary_model
)
end
end
end
end
...
@@ -143,6 +145,7 @@ function extended_lyapd_core!(Σ, A, B, ws)
...
@@ -143,6 +145,7 @@ function extended_lyapd_core!(Σ, A, B, ws)
if
row
==
1
||
A
[
row
,
row
-
1
]
==
0
if
row
==
1
||
A
[
row
,
row
-
1
]
==
0
if
A
[
row
,
row
]
>
1
-
1e-6
if
A
[
row
,
row
]
>
1
-
1e-6
ws
.
nonstationary_trends
[
row
]
=
true
ws
.
nonstationary_trends
[
row
]
=
true
ws
.
stationary_model
=
false
else
else
solve_one_row!
(
Σ
,
A
,
B
,
n
,
row
,
ws
)
solve_one_row!
(
Σ
,
A
,
B
,
n
,
row
,
ws
)
vB
=
view
(
B
,
1
:
row
-
1
,
1
:
row
-
1
)
vB
=
view
(
B
,
1
:
row
-
1
,
1
:
row
-
1
)
...
@@ -164,6 +167,7 @@ function extended_lyapd_core!(Σ, A, B, ws)
...
@@ -164,6 +167,7 @@ function extended_lyapd_core!(Σ, A, B, ws)
if
a
*
a
+
A
[
row
,
row
-
1
]
*
A
[
row
-
1
,
row
]
>
1
-
2e-6
if
a
*
a
+
A
[
row
,
row
-
1
]
*
A
[
row
-
1
,
row
]
>
1
-
2e-6
ws
.
nonstationary_trends
[
row
]
=
true
ws
.
nonstationary_trends
[
row
]
=
true
ws
.
nonstationary_trends
[
row
-
1
]
=
true
ws
.
nonstationary_trends
[
row
-
1
]
=
true
ws
.
stationary_model
=
false
else
else
solve_two_rows!
(
Σ
,
A
,
B
,
n
,
row
,
ws
)
solve_two_rows!
(
Σ
,
A
,
B
,
n
,
row
,
ws
)
vB
=
view
(
B
,
1
:
row
-
2
,
1
:
row
-
2
)
vB
=
view
(
B
,
1
:
row
-
2
,
1
:
row
-
2
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment