Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
preprocessor
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dynare
preprocessor
Commits
282f34b2
Commit
282f34b2
authored
May 3, 2011
by
Sébastien Villemot
Browse files
Options
Downloads
Patches
Plain Diff
Preprocessor: adopt a more consistent behavior when no computing task is requested
parent
d6acd924
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
ModFile.cc
+9
-23
9 additions, 23 deletions
ModFile.cc
with
9 additions
and
23 deletions
ModFile.cc
+
9
−
23
View file @
282f34b2
...
...
@@ -349,9 +349,6 @@ void
ModFile
::
computingPass
(
bool
no_tmp_terms
)
{
// Mod file may have no equation (for example in a standalone BVAR estimation)
bool
dynamic_model_needed
=
mod_file_struct
.
simul_present
||
mod_file_struct
.
check_present
||
mod_file_struct
.
stoch_simul_present
||
mod_file_struct
.
estimation_present
||
mod_file_struct
.
osr_present
||
mod_file_struct
.
ramsey_policy_present
||
mod_file_struct
.
identification_present
;
if
(
dynamic_model
.
equation_number
()
>
0
)
{
if
(
nonstationary_variables
)
...
...
@@ -365,7 +362,10 @@ ModFile::computingPass(bool no_tmp_terms)
static_model
.
computingPass
(
global_eval_context
,
no_tmp_terms
,
false
,
block
,
byte_code
);
}
// Set things to compute for dynamic model
if
(
dynamic_model_needed
)
if
(
mod_file_struct
.
simul_present
||
mod_file_struct
.
check_present
||
mod_file_struct
.
stoch_simul_present
||
mod_file_struct
.
estimation_present
||
mod_file_struct
.
osr_present
||
mod_file_struct
.
ramsey_policy_present
||
mod_file_struct
.
identification_present
)
{
dynamic_model
.
initializeVariablesAndEquations
();
if
(
mod_file_struct
.
simul_present
)
...
...
@@ -383,8 +383,8 @@ ModFile::computingPass(bool no_tmp_terms)
dynamic_model
.
computingPass
(
true
,
hessian
,
thirdDerivatives
,
paramsDerivatives
,
global_eval_context
,
no_tmp_terms
,
block
,
use_dll
,
byte_code
);
}
}
else
dynamic_model
.
computingPass
(
true
,
true
,
false
,
false
,
global_eval_context
,
no_tmp_terms
,
false
,
false
,
byte_code
);
else
// No computing task requested, compute derivatives up to 2nd order by default
dynamic_model
.
computingPass
(
true
,
true
,
false
,
false
,
global_eval_context
,
no_tmp_terms
,
block
,
use_dll
,
byte_code
);
}
for
(
vector
<
Statement
*>::
iterator
it
=
statements
.
begin
();
...
...
@@ -400,9 +400,6 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all, bool console,
)
const
{
ofstream
mOutputFile
;
bool
dynamic_model_needed
=
mod_file_struct
.
simul_present
||
mod_file_struct
.
check_present
||
mod_file_struct
.
stoch_simul_present
||
mod_file_struct
.
estimation_present
||
mod_file_struct
.
osr_present
||
mod_file_struct
.
ramsey_policy_present
||
mod_file_struct
.
identification_present
;
if
(
basename
.
size
())
{
...
...
@@ -550,10 +547,7 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all, bool console,
if
(
dynamic_model
.
equation_number
()
>
0
)
{
if
(
dynamic_model_needed
)
dynamic_model
.
writeOutput
(
mOutputFile
,
basename
,
block
,
byte_code
,
use_dll
,
mod_file_struct
.
order_option
);
else
dynamic_model
.
writeOutput
(
mOutputFile
,
basename
,
false
,
false
,
false
,
mod_file_struct
.
order_option
);
if
(
!
no_static
)
static_model
.
writeOutput
(
mOutputFile
,
block
);
}
...
...
@@ -597,17 +591,9 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all, bool console,
if
(
!
no_static
)
static_model
.
writeStaticFile
(
basename
,
block
,
byte_code
);
if
(
dynamic_model_needed
)
{
dynamic_model
.
writeDynamicFile
(
basename
,
block
,
byte_code
,
use_dll
,
mod_file_struct
.
order_option
);
dynamic_model
.
writeParamsDerivativesFile
(
basename
);
}
else
{
dynamic_model
.
writeDynamicFile
(
basename
,
false
,
false
,
false
,
mod_file_struct
.
order_option
);
dynamic_model
.
writeParamsDerivativesFile
(
basename
);
}
}
// Create steady state file
steady_state_model
.
writeSteadyStateFile
(
basename
,
mod_file_struct
.
ramsey_policy_present
);
...
...
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