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
Dynare
preprocessor
Commits
7d37c35a
Verified
Commit
7d37c35a
authored
Dec 27, 2018
by
Houtan Bastani
Browse files
onlymodel: read initval and endval too
parent
f2b0bdf0
Pipeline
#523
passed with stage
in 1 minute and 23 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/ModFile.cc
View file @
7d37c35a
...
...
@@ -962,6 +962,24 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all, bool clear_glo
if
(
onlymodel
)
for
(
auto
&
statement
:
statements
)
{
/* Special treatment for initval block: insert initial values for the
auxiliary variables and initialize exo det */
auto
*
ivs
=
dynamic_cast
<
InitValStatement
*>
(
statement
.
get
());
if
(
ivs
!=
nullptr
)
{
ivs
->
writeOutput
(
mOutputFile
,
basename
,
minimal_workspace
);
static_model
.
writeAuxVarInitval
(
mOutputFile
,
ExprNodeOutputType
::
matlabOutsideModel
);
ivs
->
writeOutputPostInit
(
mOutputFile
);
}
// Special treatment for endval block: insert initial values for the auxiliary variables
auto
*
evs
=
dynamic_cast
<
EndValStatement
*>
(
statement
.
get
());
if
(
evs
!=
nullptr
)
{
evs
->
writeOutput
(
mOutputFile
,
basename
,
minimal_workspace
);
static_model
.
writeAuxVarInitval
(
mOutputFile
,
ExprNodeOutputType
::
matlabOutsideModel
);
}
auto
*
ips
=
dynamic_cast
<
InitParamStatement
*>
(
statement
.
get
());
if
(
ips
!=
nullptr
)
ips
->
writeOutput
(
mOutputFile
,
basename
,
minimal_workspace
);
...
...
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