Skip to content
Snippets Groups Projects
Commit cf146ec4 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Reset oo_.{exo_}steady_state to zero before endval

This is necessary to enforce the documented behavior which says that, if a
variable is not given a value in the endval block, a zero value is assumed.
parent 9b3c8355
Branches
Tags
No related merge requests found
/*
* Copyright (C) 2003-2012 Dynare Team
* Copyright (C) 2003-2013 Dynare Team
*
* This file is part of Dynare.
*
......@@ -245,7 +245,9 @@ EndValStatement::writeOutput(ostream &output, const string &basename) const
<< "%" << endl;
// Writing endval block to set terminal values for variables
output << "ys0_= oo_.steady_state;" << endl
<< "ex0_ = oo_.exo_steady_state;" << endl;
<< "ex0_ = oo_.exo_steady_state;" << endl
<< "oo_.steady_state = zeros(size(ys0_));" << endl
<< "oo_.exo_steady_state = zeros(size(ex0_));" << endl;
writeInitValues(output);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment