Refactoring
This commit is contained in:
parent
58e04fe162
commit
dd0bedcc8f
|
|
@ -58,10 +58,10 @@ int main(int argc, char *argv[])
|
||||||
// Optimize pairthere
|
// Optimize pairthere
|
||||||
const std::string pairName = std::to_string(fullPattern.EN()) + "#"
|
const std::string pairName = std::to_string(fullPattern.EN()) + "#"
|
||||||
+ fullPattern.getLabel(); // + "@" + reducedPattern.getLabel();
|
+ fullPattern.getLabel(); // + "@" + reducedPattern.getLabel();
|
||||||
const std::string optimizationName = pairName + "("
|
const std::string optimizationName = pairName /* + "_"
|
||||||
+ std::to_string(
|
+ std::to_string(
|
||||||
settings_optimization.numberOfFunctionCalls)
|
settings_optimization.numberOfFunctionCalls)*/
|
||||||
+ ")";
|
;
|
||||||
const std::string optimizationResultsDirectory = argv[4];
|
const std::string optimizationResultsDirectory = argv[4];
|
||||||
std::string resultsOutputDir;
|
std::string resultsOutputDir;
|
||||||
bool optimizationResultFolderExists = false;
|
bool optimizationResultFolderExists = false;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <parallel/parallel.h>
|
#include <parallel/parallel.h>
|
||||||
|
|
||||||
#define USE_SCENARIO_WEIGHTS
|
//#define USE_SCENARIO_WEIGHTS
|
||||||
|
|
||||||
using namespace ReducedPatternOptimization;
|
using namespace ReducedPatternOptimization;
|
||||||
|
|
||||||
|
|
@ -569,6 +569,12 @@ void ReducedModelOptimizer::initializePatterns(
|
||||||
initializeOptimizationParameters(m_pFullPatternSimulationMesh, optimizationParameters);
|
initializeOptimizationParameters(m_pFullPatternSimulationMesh, optimizationParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ReducedModelOptimizer::setIntermediateResultsDirectoryPath(
|
||||||
|
const std::filesystem::path &newIntermediateResultsDirectoryPath)
|
||||||
|
{
|
||||||
|
intermediateResultsDirectoryPath = newIntermediateResultsDirectoryPath;
|
||||||
|
}
|
||||||
|
|
||||||
void ReducedModelOptimizer::initializeUpdateReducedPatternFunctions()
|
void ReducedModelOptimizer::initializeUpdateReducedPatternFunctions()
|
||||||
{
|
{
|
||||||
global.functions_updateReducedPatternParameter[R] =
|
global.functions_updateReducedPatternParameter[R] =
|
||||||
|
|
@ -1824,12 +1830,6 @@ void ReducedModelOptimizer::computeObjectiveValueNormalizationFactors()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReducedModelOptimizer::setIntermediateResultsDirectoryPath(
|
|
||||||
const std::filesystem::path &newIntermediateResultsDirectoryPath)
|
|
||||||
{
|
|
||||||
intermediateResultsDirectoryPath = newIntermediateResultsDirectoryPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ReducedModelOptimizer::optimize(
|
void ReducedModelOptimizer::optimize(
|
||||||
const Settings &optimizationSettings,
|
const Settings &optimizationSettings,
|
||||||
ReducedPatternOptimization::Results &results,
|
ReducedPatternOptimization::Results &results,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue