diff --git a/reducedmodeloptimizer_structs.hpp b/reducedmodeloptimizer_structs.hpp index a83ca49..c78ddf2 100644 --- a/reducedmodeloptimizer_structs.hpp +++ b/reducedmodeloptimizer_structs.hpp @@ -5,6 +5,7 @@ #include "csvfile.hpp" #include "drmsimulationmodel.hpp" #include "linearsimulationmodel.hpp" +#include "matplot/matplot.h" #include "simulation_structs.hpp" #include "simulationmodelfactory.hpp" #include "trianglepatterngeometry.hpp" @@ -40,6 +41,7 @@ struct xRange { std::string label{}; double min{0}; double max{0}; + NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT(xRange, label, min, max) inline bool operator<(const xRange& other) { return label < other.label; } std::string toString() const { @@ -113,117 +115,58 @@ inline int getParameterIndex(const std::string& s) { struct Settings { inline static std::string defaultFilename{"OptimizationSettings.json"}; - // std::array - // baseScenarioMaxMagnitudes{0.590241, - // 0.888372, - // 0.368304, - // 0.0127508, - // 1.18079, - // 0}; //final - // std::array - // baseScenarioMaxMagnitudes{ - // 0.590241 / 6, 0.588372 / 6, 0.368304 / 2, 0.05, 1.18 / 4, 0}; - // //final b,h= 0.001 std::array baseScenarioMaxMagnitudes{ 0.590241 / 3, 0.588372 / 3, 0.368304, 0.1, 1.18 / 2, 0}; // final b,h= 0.002 - // std::array - // baseScenarioMaxMagnitudes{0, 0, 0, 0.1, 0}; - - // std::array - // baseScenarioMaxMagnitudes{20.85302947095844, - // 1.8073431893126763, - // 0.2864731720436702, - // 0.14982243562639147, - // 0.18514829631059054};//median - // std::array - // baseScenarioMaxMagnitudes{1.1725844893199244, - // 0.3464275389927846, - // 0.09527915004635197, - // 0.06100757786262501, - // 0.10631914784812076}; //5_1565 0.03axial - // std::array - // baseScenarioMaxMagnitudes{/*15*/ 0 /*1.711973658196369*/, - // 1.878077115238504, - // 0.8, - // 0.15851675178327318, - // 0.8, - // /*1.711973658196369*/ 0}; //custom - // std::array - // baseScenarioMaxMagnitudes{0, - // 14.531854387244818, - // 0.38321932238436796, - // 0.21381267870193282, - // 0.28901381608791094, - // 1.711973658196369}; //9_14423 - // std::array - // baseScenarioMaxMagnitudes{1.1725844893199244, - // 0.3464275389927846, - // 0.09527915004635197, - // 0.06100757786262501, - // 0.10631914784812076}; //5_1565 0.03axial - // std::array - // baseScenarioMagnitudes{9.82679, 0.138652, 0.247242, 0.739443, - // 0.00675865}; //Hyperparam opt - // std::array - // baseScenarioMaxMagnitudes{ - // 30, 8, 0.4421382884449713, 0.22758433903942452, 0.3247935583883217}; - - // std::array - // baseScenarioMagnitudes{10 * 6.310485381644259, - // 10 * 1.7100142258819078, - // 10 * 0.18857048204421728, - // 10 * 0.10813697502645818, - // 10 * 0.11982893539207524}; //6_338 - // std::array - // baseScenarioMagnitudes{7.72224, - // 7.72224, - // 0.89468, - // 0.445912, - // 0.625905}; - // std::array - // baseScenarioMagnitudes{0.407714, - // 22.3524, - // 0.703164, - // 0.0226138, - // 0.161316}; - // std::array - // baseScenarioMagnitudes{2, 1, 0.4, 0.2, 0.2}; //8_15444 magnitudes - // from randomBending0 - - // std::array - // baseScenarioMagnitudes{1.0600375226325425, - // 0.6381040280710403, - // 0.17201755995098306, - // 0.0706601822149856, - // 0.13578373479448072}; //8_15444 - // magnitudes from displacements - // std::array - // baseScenarioMagnitudes{10 * 1.0600375226325425, - // 10 * 0.6381040280710403, - // 10 * 0.17201755995098306, - // 10 * 0.0706601822149856, - // 10 * 0.13578373479448072}; //8_15444 - // magnitudes from displacements - - // std::array - // baseScenarioMaxMagnitudes; - + // std::array + // baseScenarioMaxMagnitudes{ + // 0.590241, 0.888372, 0.368304, 0.0127508, 1.18079, 0 /*.3*/}; std::string getOptimizationSettingsLabel() const { return simulationModelLabel_groundTruth + "_" + simulationModelLabel_reducedModel; } + + enum OptimizationTool { + //#ifdef DLIB_DEFINED + dlib_globalMin = 0, + dlib_bobyqa, + //#else + ens_SA, + ens_DE, + ens_PSO, + //#endif + NumOptTools + }; + OptimizationTool optimizationTool{ens_SA}; + + inline static const std::array + labels_optimizationTools{ + //#ifdef DLIB_DEFINED + "dlib_globalMin", "dlib_bobyqa", + //#else + "ens_SA", "ens_DE", "ens_PSO" + + //#endif + }; + std::string getLabel_optimizationTool() const { + return labels_optimizationTools[optimizationTool]; + } + std::vector> optimizationStrategy = { - // {E,A, I2, I3, J, R, Theta}}; + // {E, A, I2, I3, J, R, Theta}}; {A, I2, I3, J, R, Theta}}; - // {E}}; - // {E, R, Theta}}; - // {A, R, Theta}}; + // {A, I2, I3, J}}; + // {R, Theta}}; + // {R, Theta}, + // {A, I2, I3, J}}; + // {A, I2, I3, J}, + // {R, Theta}}; std::optional> optimizationVariablesGroupsWeights; // TODO:should be removed in the - // future if not a splitting strategy - // is used for the optimization + // future if not a splitting + // strategy is used for the + // optimization enum NormalizationStrategy { NonNormalized, Epsilon }; inline static std::vector normalizationStrategyStrings{ "NonNormalized", "Epsilon"}; @@ -236,37 +179,42 @@ struct Settings { // ChronosEulerNonLinearSimulationModel::label}; DRMSimulationModel::label}; inline static std::string simulationModelLabel_reducedModel{ - LinearSimulationModel::label}; + LinearSimulationModel::label}; // namespace ReducedModelOptimization // ChronosEulerLinearSimulationModel::label}; - struct SettingsPSO { - int numberOfParticles{200}; -#ifdef USE_PSO - inline static std::string optimizerName{"pso"}; -#else - inline static std::string optimizerName{"sa"}; -#endif - } pso; - - struct SettingsDlibGlobal { - int numberOfFunctionCalls{100000}; - } dlib; - - double solverAccuracy{1e-2}; - double translationEpsilon{4e-3}; - // double translationEpsilon{0}; - // double angularDistanceEpsilon{vcg::math::ToRad(2.0)}; - double angularDistanceEpsilon{vcg::math::ToRad(0.0)}; double targetBaseTriangleSize{0.03}; + double translationEpsilon{4e-3}; + // double translationEpsilon{targetBaseTriangleSize * 1e-2}; + // double translationEpsilon{0}; + double angularDistanceEpsilon{vcg::math::ToRad(0.0)}; + double solver_accuracy{1e-3}; + double solver_maxIterations{100e3}; CrossSectionType beamDimensions_pattern{0.002, 0.002}; double youngsModulus_pattern{1e9}; std::filesystem::path intermediateResultsDirectoryPath; + bool beVerbose{false}; struct ObjectiveWeights { double translational{1.2}; double rotational{0.8}; bool operator==(const ObjectiveWeights& other) const; + NLOHMANN_DEFINE_TYPE_INTRUSIVE(ObjectiveWeights, translational, rotational) }; std::array perBaseScenarioObjectiveWeights; + NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT(Settings, + optimizationTool, + baseScenarioMaxMagnitudes, + optimizationStrategy, + variablesRanges, + simulationModelLabel_groundTruth, + simulationModelLabel_reducedModel, + solver_accuracy, + solver_maxIterations, + translationEpsilon, + angularDistanceEpsilon, + targetBaseTriangleSize, + beamDimensions_pattern, + youngsModulus_pattern, + perBaseScenarioObjectiveWeights) // std::array // perBaseScenarioObjectiveWeights{ // {{1.95, 0.05}, {0.87, 1.13}, {0.37, 1.63}, {0.01, 1.99}, @@ -284,83 +232,9 @@ struct Settings { return objectiveWeightsPairs; } - struct JsonKeys { - inline static std::string OptimizationStrategy{"OptimizationStrategy"}; - inline static std::string OptimizationStrategyGroupWeights{ - "OptimizationStrategyGroupWeights"}; - inline static std::string OptimizationVariables{"OptimizationVariables"}; - inline static std::string NumberOfFunctionCalls{"NumberOfFunctionCalls"}; - inline static std::string SolverAccuracy{"SolverAccuracy"}; - inline static std::string ObjectiveWeights{"ObjectiveWeight"}; - }; - nlohmann::json toJson() const { nlohmann::json json; - json[GET_VARIABLE_NAME(optimizationStrategy)] = optimizationStrategy; - if (optimizationVariablesGroupsWeights.has_value()) { - json[GET_VARIABLE_NAME(ptimizationStrategyGroupWeights)] = - optimizationVariablesGroupsWeights.value(); - } - // write x ranges - const std::array, - NumberOfOptimizationVariables> - xRangesAsTuples = [=]() { - std::array, - NumberOfOptimizationVariables> - xRangesAsTuples; - for (int optimizationParameterIndex = E; - optimizationParameterIndex != NumberOfOptimizationVariables; - optimizationParameterIndex++) { - xRangesAsTuples[optimizationParameterIndex] = - variablesRanges[optimizationParameterIndex].toTuple(); - } - return xRangesAsTuples; - }(); - json[JsonKeys::OptimizationVariables] = xRangesAsTuples; - // for (size_t xRangeIndex = 0; xRangeIndex < variablesRanges.size(); - // xRangeIndex++) { - // const auto &xRange = variablesRanges[xRangeIndex]; - // json[JsonKeys::OptimizationVariables + "_" + - // std::to_string(xRangeIndex)] - // = xRange.toString(); - // } - - json[GET_VARIABLE_NAME(solverAccuracy)] = solverAccuracy; - // Objective weights - std::array, NumberOfBaseSimulationScenarios> - objectiveWeightsPairs; - std::transform(perBaseScenarioObjectiveWeights.begin(), - perBaseScenarioObjectiveWeights.end(), - objectiveWeightsPairs.begin(), - [](const ObjectiveWeights& objectiveWeights) { - return std::make_pair(objectiveWeights.translational, - objectiveWeights.rotational); - }); - json[JsonKeys::ObjectiveWeights] = objectiveWeightsPairs; - json[GET_VARIABLE_NAME(translationEpsilon)] = translationEpsilon; - json[GET_VARIABLE_NAME(angularDistanceEpsilon)] = - vcg::math::ToDeg(angularDistanceEpsilon); - json[GET_VARIABLE_NAME(targetBaseTriangleSize)] = targetBaseTriangleSize; - json[GET_VARIABLE_NAME(baseScenarioMaxMagnitudes)] = - baseScenarioMaxMagnitudes; - json[GET_VARIABLE_NAME(simulationModelLabel_groundTruth)] = - simulationModelLabel_groundTruth; - json[GET_VARIABLE_NAME(simulationModelLabel_reducedModel)] = - simulationModelLabel_reducedModel; - json[GET_VARIABLE_NAME(youngsModulus_pattern)] = youngsModulus_pattern; - nlohmann::json json_dimensions; - beamDimensions_pattern.to_json(json_dimensions, beamDimensions_pattern); - json.update(json_dimensions); - -#ifdef USE_ENSMALLEN -#ifdef USE_PSO - json[GET_VARIABLE_NAME(pso.numberOfParticles)] = pso.numberOfParticles; -#endif - json[GET_VARIABLE_NAME(pso.optimizerName)] = pso.optimizerName; -#else - json[GET_VARIABLE_NAME(dlib.numberOfFunctionCalls)] = - dlib.numberOfFunctionCalls; -#endif + json = *this; return json; } void save(const std::filesystem::path& saveToPath) { @@ -385,99 +259,113 @@ struct Settings { std::ifstream ifs(jsonFilePath); nlohmann::json json; ifs >> json; + *this = json; - if (json.contains(GET_VARIABLE_NAME(optimizationStrategy))) { - optimizationStrategy = std::vector< - std::vector>( - (json.at(GET_VARIABLE_NAME(optimizationStrategy)))); - } - if (json.contains(GET_VARIABLE_NAME(optimizationStrategyGroupWeights))) { - optimizationVariablesGroupsWeights = std::vector( - json[GET_VARIABLE_NAME(optimizationStrategyGroupWeights)]); - } - // read x ranges - if (json.contains(JsonKeys::OptimizationVariables)) { - const std::array, - NumberOfOptimizationVariables> - xRangesAsTuples = json.at(JsonKeys::OptimizationVariables); - for (const auto& rangeTuple : xRangesAsTuples) { - variablesRanges[getParameterIndex(std::get<0>(rangeTuple))].set( - rangeTuple); - } - } else { // NOTE:legacy compatibility - size_t xRangeIndex = 0; - while (true) { - const std::string jsonXRangeKey = JsonKeys::OptimizationVariables + - "_" + std::to_string(xRangeIndex++); - if (!json.contains(jsonXRangeKey)) { - break; - } - xRange x; - x.fromString(json.at(jsonXRangeKey)); - variablesRanges[getParameterIndex(x.label)] = x; - } - } + // if (json.contains(GET_VARIABLE_NAME(optimizationStrategy))) { + // optimizationStrategy = std::vector< + // std::vector>( + // (json.at(GET_VARIABLE_NAME(optimizationStrategy)))); + // } + // if + // (json.contains(GET_VARIABLE_NAME(optimizationStrategyGroupWeights))) + // { + // optimizationVariablesGroupsWeights = std::vector( + // json[GET_VARIABLE_NAME(optimizationStrategyGroupWeights)]); + // } + // // read x ranges + // if (json.contains(JsonKeys::OptimizationVariables)) { + // const std::array, + // NumberOfOptimizationVariables> + // xRangesAsTuples = json.at(JsonKeys::OptimizationVariables); + // for (const auto& rangeTuple : xRangesAsTuples) { + // variablesRanges[getParameterIndex(std::get<0>(rangeTuple))].set( + // rangeTuple); + // } + // } else { // NOTE:legacy compatibility + // size_t xRangeIndex = 0; + // while (true) { + // const std::string jsonXRangeKey = + // JsonKeys::OptimizationVariables + // + + // "_" + + // std::to_string(xRangeIndex++); + // if (!json.contains(jsonXRangeKey)) { + // break; + // } + // xRange x; + // x.fromString(json.at(jsonXRangeKey)); + // variablesRanges[getParameterIndex(x.label)] = x; + // } + // } - if (json.contains(GET_VARIABLE_NAME(dlib.numberOfFunctionCalls))) { - dlib.numberOfFunctionCalls = - json.at(GET_VARIABLE_NAME(dlib.numberOfFunctionCalls)); - } - if (json.contains(GET_VARIABLE_NAME(solverAccuracy))) { - solverAccuracy = json.at(GET_VARIABLE_NAME(solverAccuracy)); - } - // Objective weights - if (json.contains(JsonKeys::ObjectiveWeights)) { - std::array, NumberOfBaseSimulationScenarios> - objectiveWeightsPairs = json.at(JsonKeys::ObjectiveWeights); - std::transform(objectiveWeightsPairs.begin(), objectiveWeightsPairs.end(), - perBaseScenarioObjectiveWeights.begin(), - [](const std::pair& objectiveWeightsPair) { - return ObjectiveWeights{objectiveWeightsPair.first, - objectiveWeightsPair.second}; - }); - } - if (json.contains(GET_VARIABLE_NAME(translationalNormalizationEpsilon))) { - translationEpsilon = - json[GET_VARIABLE_NAME(translationalNormalizationEpsilon)]; - } + // if (json.contains(GET_VARIABLE_NAME(dlib.numberOfFunctionCalls))) { + // dlib.numberOfFunctionCalls = + // json.at(GET_VARIABLE_NAME(dlib.numberOfFunctionCalls)); + // } + // if (json.contains(GET_VARIABLE_NAME(solverAccuracy))) { + // solverAccuracy = json.at(GET_VARIABLE_NAME(solverAccuracy)); + // } + // // Objective weights + // if (json.contains(JsonKeys::ObjectiveWeights)) { + // std::array, + // NumberOfBaseSimulationScenarios> + // objectiveWeightsPairs = json.at(JsonKeys::ObjectiveWeights); + // std::transform(objectiveWeightsPairs.begin(), + // objectiveWeightsPairs.end(), + // perBaseScenarioObjectiveWeights.begin(), + // [](const std::pair& + // objectiveWeightsPair) { + // return + // ObjectiveWeights{objectiveWeightsPair.first, + // objectiveWeightsPair.second}; + // }); + // } + // if + // (json.contains(GET_VARIABLE_NAME(translationalNormalizationEpsilon))) + // { + // translationEpsilon = + // json[GET_VARIABLE_NAME(translationalNormalizationEpsilon)]; + // } - if (json.contains(GET_VARIABLE_NAME(angularDistanceEpsilon))) { - angularDistanceEpsilon = vcg::math::ToRad( - static_cast(json[GET_VARIABLE_NAME(angularDistanceEpsilon)])); - } + // if (json.contains(GET_VARIABLE_NAME(angularDistanceEpsilon))) { + // angularDistanceEpsilon = vcg::math::ToRad( + // static_cast(json[GET_VARIABLE_NAME(angularDistanceEpsilon)])); + // } - if (json.contains(GET_VARIABLE_NAME(targetBaseTriangleSize))) { - targetBaseTriangleSize = - static_cast(json[GET_VARIABLE_NAME(targetBaseTriangleSize)]); - } + // if (json.contains(GET_VARIABLE_NAME(targetBaseTriangleSize))) { + // targetBaseTriangleSize = + // static_cast(json[GET_VARIABLE_NAME(targetBaseTriangleSize)]); + // } - if (json.contains(GET_VARIABLE_NAME(pso.numberOfParticles))) { - pso.numberOfParticles = - static_cast(json[GET_VARIABLE_NAME(pso.numberOfParticles)]); - } + // if (json.contains(GET_VARIABLE_NAME(pso.numberOfParticles))) { + // pso.numberOfParticles = + // static_cast(json[GET_VARIABLE_NAME(pso.numberOfParticles)]); + // } - if (json.contains(GET_VARIABLE_NAME(simulationModelLabel_reducedModel))) { - simulationModelLabel_reducedModel = static_cast( - json[GET_VARIABLE_NAME(simulationModelLabel_reducedModel)]); - } + // if + // (json.contains(GET_VARIABLE_NAME(simulationModelLabel_reducedModel))) + // { + // simulationModelLabel_reducedModel = static_cast( + // json[GET_VARIABLE_NAME(simulationModelLabel_reducedModel)]); + // } - beamDimensions_pattern.from_json(json, beamDimensions_pattern); + // beamDimensions_pattern.from_json(json, beamDimensions_pattern); - if (json.contains(GET_VARIABLE_NAME(youngsModulus_pattern))) { - youngsModulus_pattern = - static_cast(json[GET_VARIABLE_NAME(youngsModulus_pattern)]); - } + // if (json.contains(GET_VARIABLE_NAME(youngsModulus_pattern))) { + // youngsModulus_pattern = + // static_cast(json[GET_VARIABLE_NAME(youngsModulus_pattern)]); + // } // perBaseScenarioObjectiveWeights = // json.at(JsonKeys::ObjectiveWeights); // objectiveWeights.translational = - // json.at(JsonKeys::ObjectiveWeights); objectiveWeights.rotational = - // 2 - objectiveWeights.translational; + // json.at(JsonKeys::ObjectiveWeights); objectiveWeights.rotational + // = 2 - objectiveWeights.translational; return true; } std::string toString() const { return toJson().dump(); } - void writeHeaderTo(csvFile& os) const { + void writeHeaderTo(CSVFile& os) const { if (!variablesRanges.empty()) { for (const xRange& range : variablesRanges) { os << range.label + " max"; @@ -488,20 +376,19 @@ struct Settings { os << "Solution Accuracy"; os << "Normalization trans epsilon"; os << "Normalization rot epsilon(deg)"; - os << JsonKeys::ObjectiveWeights; + os << GET_VARIABLE_NAME(perBaseScenarioObjectiveWeights); os << "Optimization parameters"; // os << std::endl; } - void writeSettingsTo(csvFile& os) const { + void writeSettingsTo(CSVFile& os) const { if (!variablesRanges.empty()) { for (const xRange& range : variablesRanges) { os << range.max; os << range.min; } } - os << dlib.numberOfFunctionCalls; - os << solverAccuracy; + os << solver_accuracy; os << std::to_string(translationEpsilon); os << std::to_string(vcg::math::ToDeg(angularDistanceEpsilon)); std::string objectiveWeightsString; @@ -533,7 +420,7 @@ struct Settings { } os << Utilities::toString(vv); } -}; +}; // namespace ReducedModelOptimization inline bool operator==(const Settings& settings1, const Settings& settings2) noexcept { @@ -542,10 +429,8 @@ inline bool operator==(const Settings& settings1, settings1.perBaseScenarioObjectiveWeights.end(), settings2.perBaseScenarioObjectiveWeights.begin()) .first == settings1.perBaseScenarioObjectiveWeights.end(); - return settings1.dlib.numberOfFunctionCalls == - settings2.dlib.numberOfFunctionCalls && - settings1.variablesRanges == settings2.variablesRanges && - settings1.solverAccuracy == settings2.solverAccuracy && + return settings1.variablesRanges == settings2.variablesRanges && + settings1.solver_accuracy == settings2.solver_accuracy && haveTheSameObjectiveWeights && settings1.translationEpsilon == settings2.translationEpsilon; } @@ -802,12 +687,13 @@ struct Results { } // constexpr bool shouldSaveObjectiveValuePlot = - // shouldExportDebugFiles; if (shouldSaveObjectiveValuePlot) + // shouldExportDebugFiles; if + // (shouldSaveObjectiveValuePlot) // { saveObjectiveValuePlot(saveToPath); // } } - csvFile csv_resultsLocalFile( + CSVFile csv_resultsLocalFile( std::filesystem::path(saveToPath).append("results.csv"), true); csv_resultsLocalFile << "Name"; writeHeaderTo(csv_resultsLocalFile); @@ -1217,7 +1103,7 @@ struct Results { } } - void writeHeaderTo(csvFile& os) const { + void writeHeaderTo(CSVFile& os) const { if (exportSettings.exportRawObjectiveValue) { os << "Total raw Obj value"; } @@ -1253,13 +1139,13 @@ struct Results { } void writeHeaderTo( - std::vector& vectorOfPointersToOutputStreams) const { - for (csvFile* outputStream : vectorOfPointersToOutputStreams) { + std::vector& vectorOfPointersToOutputStreams) const { + for (CSVFile* outputStream : vectorOfPointersToOutputStreams) { writeHeaderTo(*outputStream); } } - void writeResultsTo(csvFile& os) const { + void writeResultsTo(CSVFile& os) const { if (exportSettings.exportRawObjectiveValue) { os << objectiveValue.totalRaw; } @@ -1298,13 +1184,13 @@ struct Results { } void writeResultsTo( - std::vector& vectorOfPointersToOutputStreams) const { - for (csvFile*& outputStream : vectorOfPointersToOutputStreams) { + std::vector& vectorOfPointersToOutputStreams) const { + for (CSVFile*& outputStream : vectorOfPointersToOutputStreams) { writeResultsTo(*outputStream); } } - void writeMinimaInfoTo(csvFile& outputCsv) { + void writeMinimaInfoTo(CSVFile& outputCsv) { outputCsv << "Iteration"; outputCsv << "Objective value"; for (int objectiveValueIndex = 0; diff --git a/simulationmodelfactory.cpp b/simulationmodelfactory.cpp index eb344ca..5ae9b14 100644 --- a/simulationmodelfactory.cpp +++ b/simulationmodelfactory.cpp @@ -2,9 +2,8 @@ SimulationModelFactory::SimulationModelFactory() {} -std::unique_ptr -SimulationModelFactory::create(const std::string& simulationModelLabel) -{ +std::unique_ptr SimulationModelFactory::create( + const std::string& simulationModelLabel) { if (simulationModelLabel == DRMSimulationModel::label) { return std::make_unique(); } else if (simulationModelLabel == ChronosEulerSimulationModel::label) { @@ -18,9 +17,9 @@ SimulationModelFactory::create(const std::string& simulationModelLabel) return std::make_unique(); } std::cerr - << "Simulation model used for computing the optimization results was " - "not recognized" - << std::endl; + << "Simulation model used for computing the optimization results was " + "not recognized" + << std::endl; assert(false); return nullptr; }