Commit c93cc6bf authored by ferhat's avatar ferhat
Browse files

- factorization of simulation methods for static m-file

- correction of bugs in resid.m

git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@2280 ac1d8469-bf42-47a9-8791-bf33cf982152
parent f6a330b2
......@@ -170,7 +170,12 @@ ModFile::writeOutputFiles(const string &basename, bool clear_all) const
mOutputFile << "logname_ = '" << basename << ".log';" << endl;
mOutputFile << "diary " << basename << ".log" << endl;
mOutputFile << "options_.model_mode = " << model_tree.mode << ";\n";
mOutputFile << "addpath " << basename << ";\n";
if (model_tree.mode == eSparseMode)
{
mOutputFile << "addpath " << basename << ";\n";
mOutputFile << "delete('" << basename << "_static.m');\n";
mOutputFile << "delete('" << basename << "_dynamic.m');\n";
}
if (model_tree.equation_number() > 0)
......
This diff is collapsed.
......@@ -107,7 +107,7 @@ private:
//! Writes the Block reordred structure of the model in M output
void writeModelEquationsOrdered_M(Model_Block *ModelBlock, const string &dynamic_basename) const;
//! Writes the Block reordred structure of the static model in M output
void writeModelStaticEquationsOrdered_M(ostream &output, Model_Block *ModelBlock, const string &static_basename) const;
void writeModelStaticEquationsOrdered_M(Model_Block *ModelBlock, const string &static_basename) const;
//! Writes the code of the Block reordred structure of the model in virtual machine bytecode
void writeModelEquationsCodeOrdered(const string file_name, const Model_Block *ModelBlock, const string bin_basename, ExprNodeOutputType output_type) const;
//! Writes static model file (Matlab version)
......@@ -115,7 +115,7 @@ private:
//! Writes static model file (C version)
void writeStaticCFile(const string &static_basename) const;
//! Writes static model file when Sparse option is on (Matlab version)
void writeSparseStaticMFile(const string &static_basename, const string &bin_basename, const int mode) const;
void writeSparseStaticMFile(const string &static_basename, const string &basename, const int mode) const;
//! Writes dynamic model file (Matlab version)
void writeDynamicMFile(const string &dynamic_basename) const;
//! Writes dynamic model file (C version)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment