ref
This commit is contained in:
parent
0508d7c055
commit
10fc282d78
12
src/main.cpp
12
src/main.cpp
|
@ -65,12 +65,12 @@ int main(int argc, char *argv[]) {
|
|||
|
||||
ReducedModelOptimizer optimizer(numberOfNodesPerSlot);
|
||||
|
||||
FlatPattern pattern("/home/iason/Models/TestSet_validPatterns/59.ply");
|
||||
optimizer.initialize(pattern, *reducedModels[1], {});
|
||||
// optimizer.setInitialGuess({0.10073746137216238, 1.9611251949927333,
|
||||
// 7.5940127902102867, 8.0260424171674654});
|
||||
optimizer.setInitialGuess({2, 2, 2, 2, 2});
|
||||
Eigen::VectorXd optimalParameters = optimizer.optimize(3);
|
||||
// FlatPattern pattern("/home/iason/Models/TestSet_validPatterns/59.ply");
|
||||
// optimizer.initialize(pattern, *reducedModels[1], {});
|
||||
// optimizer.setInitialGuess
|
||||
// ({0.050000000000000003, 4.0001308096448325, 4.2377893536538567,
|
||||
// 5.6122373437520334});
|
||||
// Eigen::VectorXd optimalParameters = optimizer.optimize(0);
|
||||
|
||||
std::string fullPatternsTestSetDirectory =
|
||||
"/home/iason/Models/TestSet_validPatterns";
|
||||
|
|
|
@ -282,8 +282,8 @@ void ReducedModelOptimizer::computeMaps(
|
|||
void ReducedModelOptimizer::createSimulationMeshes(FlatPattern &fullModel,
|
||||
FlatPattern &reducedModel) {
|
||||
if (typeid(CrossSectionType) != typeid(RectangularBeamDimensions)) {
|
||||
std::cerr << "A rectangular cross section is expected." << std::endl;
|
||||
return;
|
||||
std::cerr << "Error: A rectangular cross section is expected." << std::endl;
|
||||
terminate();
|
||||
}
|
||||
m_pReducedPatternSimulationMesh =
|
||||
std::make_shared<SimulationMesh>(reducedModel);
|
||||
|
@ -442,7 +442,7 @@ Eigen::VectorXd ReducedModelOptimizer::optimizeForSimulationJob(
|
|||
"conditions is not recommended.");
|
||||
// Set initial guess of solution
|
||||
|
||||
std::vector<double> x(n, 2);
|
||||
std::vector<double> x(n, 4);
|
||||
if (!initialGuess.empty()) {
|
||||
x = initialGuess;
|
||||
} // {0.10000000000000 001, 2, 1.9999999971613847, 6.9560343643347764};
|
||||
|
@ -450,7 +450,7 @@ Eigen::VectorXd ReducedModelOptimizer::optimizeForSimulationJob(
|
|||
// {0.0001, 2, 2.000000005047502, 1.3055270196964464};
|
||||
// {initialGuess(0), initialGuess(1), initialGuess(2),
|
||||
// initialGuess(3)};
|
||||
const double xMin = 0.05;
|
||||
const double xMin = 0.12;
|
||||
const double xMax = 10;
|
||||
// assert(x.end() == find_if(x.begin(), x.end(), [&](const double &d) {
|
||||
// return d >= xMax || d <= xMin;
|
||||
|
|
Loading…
Reference in New Issue