No longer create +<basename>/+block/ folder (now empty)

master
Sébastien Villemot 2023-01-17 18:36:24 +01:00
parent f45a99fc68
commit 9013a5cb1b
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
6 changed files with 9 additions and 13 deletions

View File

@ -2458,7 +2458,7 @@ PlannerObjectiveStatement::writeOutput(ostream &output, const string &basename,
for (const auto &temporary_terms_derivative : model_tree.getTemporaryTermsDerivatives())
output << temporary_terms_derivative.size() << "; ";
output << "];" << endl;
model_tree.writeStaticFile(basename + ".objective", false, false, "", {}, {}, false);
model_tree.writeStaticFile(basename + ".objective", false, "", {}, {}, false);
}
void

View File

@ -2455,7 +2455,7 @@ DynamicModel::computeBlockDynJacobianCols()
}
void
DynamicModel::writeDynamicFile(const string &basename, bool block, bool use_dll, const string &mexext, const filesystem::path &matlabroot, const filesystem::path &dynareroot, bool julia) const
DynamicModel::writeDynamicFile(const string &basename, bool use_dll, const string &mexext, const filesystem::path &matlabroot, const filesystem::path &dynareroot, bool julia) const
{
filesystem::path model_dir{basename};
model_dir /= "model";
@ -2474,8 +2474,6 @@ DynamicModel::writeDynamicFile(const string &basename, bool block, bool use_dll,
ModFile::writeMOutput(), because of planner_objective which needs its
+objective subdirectory */
create_directories(plusfolder);
if (block && !use_dll)
create_directories(plusfolder / "+block");
auto sparsefolder {plusfolder / "+sparse"};
create_directories(sparsefolder);

View File

@ -365,7 +365,7 @@ public:
void updateVarAndTrendModel() const;
//! Writes dynamic model file (+ bytecode)
void writeDynamicFile(const string &basename, bool block, bool use_dll, const string &mexext, const filesystem::path &matlabroot, const filesystem::path &dynareroot, bool julia) const;
void writeDynamicFile(const string &basename, bool use_dll, const string &mexext, const filesystem::path &matlabroot, const filesystem::path &dynareroot, bool julia) const;
//! Writes file containing parameters derivatives
template<bool julia>

View File

@ -1043,11 +1043,11 @@ ModFile::writeMOutput(const string &basename, bool clear_all, bool clear_global,
{
if (!no_static)
{
static_model.writeStaticFile(basename, block, use_dll, mexext, matlabroot, dynareroot, false);
static_model.writeStaticFile(basename, use_dll, mexext, matlabroot, dynareroot, false);
static_model.writeParamsDerivativesFile<false>(basename);
}
dynamic_model.writeDynamicFile(basename, block, use_dll, mexext, matlabroot, dynareroot, false);
dynamic_model.writeDynamicFile(basename, use_dll, mexext, matlabroot, dynareroot, false);
dynamic_model.writeParamsDerivativesFile<false>(basename);
@ -1071,10 +1071,10 @@ ModFile::writeJuliaOutput(const string &basename) const
{
if (!no_static)
{
static_model.writeStaticFile(basename, false, false, "", {}, {}, true);
static_model.writeStaticFile(basename, false, "", {}, {}, true);
static_model.writeParamsDerivativesFile<true>(basename);
}
dynamic_model.writeDynamicFile(basename, block, use_dll, "", {}, {}, true);
dynamic_model.writeDynamicFile(basename, use_dll, "", {}, {}, true);
dynamic_model.writeParamsDerivativesFile<true>(basename);
}
steady_state_model.writeSteadyStateFile(basename, true);

View File

@ -456,7 +456,7 @@ StaticModel::writeStaticMCompatFile(const string &basename) const
}
void
StaticModel::writeStaticFile(const string &basename, bool block, bool use_dll, const string &mexext, const filesystem::path &matlabroot, const filesystem::path &dynareroot, bool julia) const
StaticModel::writeStaticFile(const string &basename, bool use_dll, const string &mexext, const filesystem::path &matlabroot, const filesystem::path &dynareroot, bool julia) const
{
filesystem::path model_dir{basename};
model_dir /= "model";
@ -475,8 +475,6 @@ StaticModel::writeStaticFile(const string &basename, bool block, bool use_dll, c
ModFile::writeMOutput(), because of planner_objective which needs its
+objective subdirectory */
create_directories(plusfolder);
if (block && !use_dll)
create_directories(plusfolder / "+block");
auto sparsefolder {plusfolder / "+sparse"};
create_directories(sparsefolder);

View File

@ -124,7 +124,7 @@ public:
void computingPass(int derivsOrder, int paramsDerivsOrder, const eval_context_t &eval_context, bool no_tmp_terms, bool block);
//! Writes static model file (+ bytecode)
void writeStaticFile(const string &basename, bool block, bool use_dll, const string &mexext, const filesystem::path &matlabroot, const filesystem::path &dynareroot, bool julia) const;
void writeStaticFile(const string &basename, bool use_dll, const string &mexext, const filesystem::path &matlabroot, const filesystem::path &dynareroot, bool julia) const;
//! Write JSON Output (used by PlannerObjectiveStatement)
void writeJsonOutput(ostream &output) const;