Write block decomposition information in M_ independently of “block” option
This is now possible since the block decomposition is always computed. Of course, the information is not printed if the decomposition failed.master
parent
836351565d
commit
1ed72f6da2
|
@ -1615,7 +1615,7 @@ DynamicModel::writeBlockDriverOutput(ostream &output, const string &basename,
|
|||
}
|
||||
|
||||
void
|
||||
DynamicModel::writeDriverOutput(ostream &output, const string &basename, bool block_decomposition, bool estimation_present, bool compute_xrefs) const
|
||||
DynamicModel::writeDriverOutput(ostream &output, const string &basename, bool estimation_present, bool compute_xrefs) const
|
||||
{
|
||||
/* Writing initialisation for M_.lead_lag_incidence matrix
|
||||
M_.lead_lag_incidence is a matrix with as many columns as there are
|
||||
|
@ -1744,7 +1744,7 @@ DynamicModel::writeDriverOutput(ostream &output, const string &basename, bool bl
|
|||
}
|
||||
|
||||
// Write the block structure of the model
|
||||
if (block_decomposition)
|
||||
if (block_decomposed)
|
||||
writeBlockDriverOutput(output, basename, state_var, estimation_present);
|
||||
|
||||
output << "M_.state_var = [";
|
||||
|
|
|
@ -327,7 +327,7 @@ public:
|
|||
void computingPass(int derivsOrder, int paramsDerivsOrder, const eval_context_t &eval_context,
|
||||
bool no_tmp_terms, bool block, bool use_dll);
|
||||
//! Writes information about the dynamic model to the driver file
|
||||
void writeDriverOutput(ostream &output, const string &basename, bool block, bool estimation_present, bool compute_xrefs) const;
|
||||
void writeDriverOutput(ostream &output, const string &basename, bool estimation_present, bool compute_xrefs) const;
|
||||
|
||||
//! Write JSON AST
|
||||
void writeJsonAST(ostream &output) const;
|
||||
|
|
|
@ -967,9 +967,9 @@ ModFile::writeMOutput(const string &basename, bool clear_all, bool clear_global,
|
|||
|
||||
if (dynamic_model.equation_number() > 0)
|
||||
{
|
||||
dynamic_model.writeDriverOutput(mOutputFile, basename, block, mod_file_struct.estimation_present, compute_xrefs);
|
||||
dynamic_model.writeDriverOutput(mOutputFile, basename, mod_file_struct.estimation_present, compute_xrefs);
|
||||
if (!no_static)
|
||||
static_model.writeDriverOutput(mOutputFile, block);
|
||||
static_model.writeDriverOutput(mOutputFile);
|
||||
}
|
||||
|
||||
if (onlymodel || gui)
|
||||
|
|
|
@ -791,14 +791,14 @@ StaticModel::writeStaticBlockCFile(const string &basename, vector<filesystem::pa
|
|||
}
|
||||
|
||||
void
|
||||
StaticModel::writeDriverOutput(ostream &output, bool block) const
|
||||
StaticModel::writeDriverOutput(ostream &output) const
|
||||
{
|
||||
output << "M_.static_tmp_nbr = [";
|
||||
for (const auto &temporary_terms_derivative : temporary_terms_derivatives)
|
||||
output << temporary_terms_derivative.size() << "; ";
|
||||
output << "];" << endl;
|
||||
|
||||
if (block)
|
||||
if (block_decomposed)
|
||||
writeBlockDriverOutput(output);
|
||||
|
||||
writeDriverSparseIndicesHelper<false>(output);
|
||||
|
|
|
@ -127,7 +127,7 @@ public:
|
|||
explicit StaticModel(const DynamicModel &m);
|
||||
|
||||
//! Writes information about the static model to the driver file
|
||||
void writeDriverOutput(ostream &output, bool block) const;
|
||||
void writeDriverOutput(ostream &output) const;
|
||||
|
||||
//! Execute computations (variable sorting + derivation + block decomposition)
|
||||
/*!
|
||||
|
|
Loading…
Reference in New Issue