From 849936d81bdadcdcd2e13358f5f890962e80d1a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=28Charybdis=29?= Date: Wed, 28 Mar 2018 18:53:02 +0200 Subject: [PATCH] Same as bce9b66312f3afe6054a301d32aff469cd4e8b67 for matlab output. --- src/DynamicModel.cc | 6 ++++++ src/StaticModel.cc | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/DynamicModel.cc b/src/DynamicModel.cc index 99858c75..73ff3feb 100644 --- a/src/DynamicModel.cc +++ b/src/DynamicModel.cc @@ -2919,6 +2919,12 @@ DynamicModel::writeOutput(ostream &output, const string &basename, bool block_de << modstruct << "nsfwrd = " << nfwrd+nboth << ";" << endl << modstruct << "nspred = " << npred+nboth << ";" << endl << modstruct << "ndynamic = " << npred+nboth+nfwrd << ";" << endl; + if (!julia) + output << modstruct << "dynamic_tmp_nbr = zeros(4,1); % Number of temporaries used for the dynamic model" << endl + << modstruct << "dynamic_tmp_nbr(1) = " << temporary_terms_res_idxs.size() << "; % Number of temporaries used for the evaluation of the residuals" << endl + << modstruct << "dynamic_tmp_nbr(2) = " << temporary_terms_g1_idxs.size() << "; % Number of temporaries used for the evaluation of g1 (jacobian)" << endl + << modstruct << "dynamic_tmp_nbr(3) = " << temporary_terms_g2_idxs.size() << "; % Number of temporaries used for the evaluation of g2 (hessian)" << endl + << modstruct << "dynamic_tmp_nbr(4) = " << temporary_terms_g3_idxs.size() << "; % Number of temporaries used for the evaluation of g3 (third order derivatives)" << endl; // Write equation tags if (julia) diff --git a/src/StaticModel.cc b/src/StaticModel.cc index 68c513ae..f4e728e4 100644 --- a/src/StaticModel.cc +++ b/src/StaticModel.cc @@ -2064,6 +2064,12 @@ StaticModel::writeStaticBlockMFSFile(const string &basename) const void StaticModel::writeOutput(ostream &output, bool block) const { + output << "M_.static_tmp_nbr = zeros(4,1); % Number of temporaries used for the static model" <