Commit dbc17c9f authored by kraus's avatar kraus
Browse files

reduce amount of data that is written in optimizer and sampler runs

parent cf38bb2b
...@@ -144,6 +144,7 @@ struct OpalDataImpl { ...@@ -144,6 +144,7 @@ struct OpalDataImpl {
bool isInOPALCyclMode_m; bool isInOPALCyclMode_m;
bool isInOPALTMode_m; bool isInOPALTMode_m;
bool isInOPALEnvMode_m; bool isInOPALEnvMode_m;
bool isOptimizerFlag_m;
bool isInPrepState_m; bool isInPrepState_m;
std::map<std::string, unsigned int> problemSize_m; std::map<std::string, unsigned int> problemSize_m;
...@@ -167,6 +168,7 @@ OpalDataImpl::OpalDataImpl(): ...@@ -167,6 +168,7 @@ OpalDataImpl::OpalDataImpl():
isInOPALCyclMode_m(false), isInOPALCyclMode_m(false),
isInOPALTMode_m(false), isInOPALTMode_m(false),
isInOPALEnvMode_m(false), isInOPALEnvMode_m(false),
isOptimizerFlag_m(true),
isInPrepState_m(false) isInPrepState_m(false)
{ {
bunch_m = nullptr; bunch_m = nullptr;
...@@ -280,6 +282,7 @@ void OpalData::reset() { ...@@ -280,6 +282,7 @@ void OpalData::reset() {
p->isInOPALTMode_m = false; p->isInOPALTMode_m = false;
p->isInOPALEnvMode_m = false; p->isInOPALEnvMode_m = false;
p->isInPrepState_m = false; p->isInPrepState_m = false;
p->isOptimizerFlag_m = false;
} }
bool OpalData::isInOPALCyclMode() { bool OpalData::isInOPALCyclMode() {
...@@ -294,6 +297,10 @@ bool OpalData::isInOPALEnvMode() { ...@@ -294,6 +297,10 @@ bool OpalData::isInOPALEnvMode() {
return p->isInOPALEnvMode_m; return p->isInOPALEnvMode_m;
} }
bool OpalData::isOptimizerRun() {
return p->isOptimizerFlag_m;
}
void OpalData::setInOPALCyclMode() { void OpalData::setInOPALCyclMode() {
p->isInOPALCyclMode_m = true; p->isInOPALCyclMode_m = true;
} }
...@@ -306,6 +313,10 @@ void OpalData::setInOPALEnvMode() { ...@@ -306,6 +313,10 @@ void OpalData::setInOPALEnvMode() {
p->isInOPALEnvMode_m = true; p->isInOPALEnvMode_m = true;
} }
void OpalData::setOptimizerFlag() {
p->isOptimizerFlag_m = true;
}
bool OpalData::isInPrepState() { bool OpalData::isInPrepState() {
return p->isInPrepState_m; return p->isInPrepState_m;
} }
......
...@@ -149,10 +149,12 @@ public: ...@@ -149,10 +149,12 @@ public:
bool isInOPALCyclMode(); bool isInOPALCyclMode();
bool isInOPALTMode(); bool isInOPALTMode();
bool isInOPALEnvMode(); bool isInOPALEnvMode();
bool isOptimizerRun();
void setInOPALCyclMode(); void setInOPALCyclMode();
void setInOPALTMode(); void setInOPALTMode();
void setInOPALEnvMode(); void setInOPALEnvMode();
void setOptimizerFlag();
bool isInPrepState(); bool isInPrepState();
void setInPrepState(bool state); void setInPrepState(bool state);
......
...@@ -128,9 +128,14 @@ double CavityAutophaser::getPhaseAtMaxEnergy(const Vector_t &R, ...@@ -128,9 +128,14 @@ double CavityAutophaser::getPhaseAtMaxEnergy(const Vector_t &R,
newPhase = std::fmod(newPhase + basePhase, Physics::two_pi); newPhase = std::fmod(newPhase + basePhase, Physics::two_pi);
std::ofstream out("data/" + itsCavity_m->getName() + "_AP.dat"); auto opal = OpalData::getInstance();
track(initialR_m, initialP_m, t + tErr, dt, newPhase, &out); if (!opal->isOptimizerRun()) {
out.close(); std::ofstream out("data/" + itsCavity_m->getName() + "_AP.dat");
track(initialR_m, initialP_m, t + tErr, dt, newPhase, &out);
out.close();
} else {
track(initialR_m, initialP_m, t + tErr, dt, newPhase, NULL);
}
INFOMSG(level1 << std::fixed << std::setprecision(4) INFOMSG(level1 << std::fixed << std::setprecision(4)
<< itsCavity_m->getName() << "_phi = " << newPhase * Physics::rad2deg << " [deg], " << itsCavity_m->getName() << "_phi = " << newPhase * Physics::rad2deg << " [deg], "
......
...@@ -137,6 +137,8 @@ enum elements { ...@@ -137,6 +137,8 @@ enum elements {
}; };
void IndexMap::saveSDDS(double startS) const { void IndexMap::saveSDDS(double startS) const {
auto opal = OpalData::getInstance();
if (opal->isOptimizerRun()) return;
std::string fileName("data/" + OpalData::getInstance()->getInputBasename() + "_ElementPositions.sdds"); std::string fileName("data/" + OpalData::getInstance()->getInputBasename() + "_ElementPositions.sdds");
std::ofstream sdds; std::ofstream sdds;
......
...@@ -44,7 +44,8 @@ OrbitThreader::OrbitThreader(const PartData &ref, ...@@ -44,7 +44,8 @@ OrbitThreader::OrbitThreader(const PartData &ref,
integrator_m(ref), integrator_m(ref),
reference_m(ref) reference_m(ref)
{ {
if (Ippl::myNode() == 0) { auto opal = OpalData::getInstance();
if (Ippl::myNode() == 0 && !opal->isOptimizerRun()) {
std::string fileName = "data/" + OpalData::getInstance()->getInputBasename() + "_DesignPath.dat"; std::string fileName = "data/" + OpalData::getInstance()->getInputBasename() + "_DesignPath.dat";
if (Options::openMode == Options::WRITE || !boost::filesystem::exists(fileName)) { if (Options::openMode == Options::WRITE || !boost::filesystem::exists(fileName)) {
logger_m.open(fileName); logger_m.open(fileName);
...@@ -164,7 +165,7 @@ void OrbitThreader::integrate(const IndexMap::value_t &activeSet, size_t maxStep ...@@ -164,7 +165,7 @@ void OrbitThreader::integrate(const IndexMap::value_t &activeSet, size_t maxStep
Bf += itsOpalBeamline_m.rotateFromLocalCS(*it, localB); Bf += itsOpalBeamline_m.rotateFromLocalCS(*it, localB);
} }
if (step % loggingFrequency_m == 0 && Ippl::myNode() == 0) { if (step % loggingFrequency_m == 0 && Ippl::myNode() == 0 && !OpalData::getInstance()->isOptimizerRun()) {
logger_m << std::setw(18) << std::setprecision(8) << pathLength_m + std::copysign(euclidean_norm(r_m - oldR), dt_m) logger_m << std::setw(18) << std::setprecision(8) << pathLength_m + std::copysign(euclidean_norm(r_m - oldR), dt_m)
<< std::setw(18) << std::setprecision(8) << r_m(0) << std::setw(18) << std::setprecision(8) << r_m(0)
<< std::setw(18) << std::setprecision(8) << r_m(1) << std::setw(18) << std::setprecision(8) << r_m(1)
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
#include "Utilities/GeneralClassicException.h" #include "Utilities/GeneralClassicException.h"
#include "Utilities/Util.h" #include "Utilities/Util.h"
#include "Utilities/Options.h" #include "Utilities/Options.h"
#include "AbstractObjects/OpalData.h"
#include "Physics/Physics.h" #include "Physics/Physics.h"
...@@ -364,13 +365,17 @@ void FM3DDynamic::getOnaxisEz(std::vector<std::pair<double, double> > & F) { ...@@ -364,13 +365,17 @@ void FM3DDynamic::getOnaxisEz(std::vector<std::pair<double, double> > & F) {
-- index_y; -- index_y;
} }
std::ofstream out("data/" + Filename_m);
unsigned int ii = (index_y + index_x * num_gridpy_m) * num_gridpz_m; unsigned int ii = (index_y + index_x * num_gridpy_m) * num_gridpz_m;
for(unsigned int i = 0; i < num_gridpz_m; ++ i) { for(unsigned int i = 0; i < num_gridpz_m; ++ i) {
F[i].first = hz_m * i; F[i].first = hz_m * i;
F[i].second = FieldstrengthEz_m[ii ++] / 1e6; F[i].second = FieldstrengthEz_m[ii ++] / 1e6;
}
auto opal = OpalData::getInstance();
if (opal->isOptimizerRun()) return;
std::ofstream out("data/" + Filename_m);
for(unsigned int i = 0; i < num_gridpz_m; ++ i) {
Vector_t R(0,0,zbegin_m + F[i].first), B(0.0), E(0.0); Vector_t R(0,0,zbegin_m + F[i].first), B(0.0), E(0.0);
getFieldstrength(R, E, B); getFieldstrength(R, E, B);
out << std::setw(16) << std::setprecision(8) << F[i].first out << std::setw(16) << std::setprecision(8) << F[i].first
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "Fields/FMDummy.h" #include "Fields/FMDummy.h"
#include "Utilities/GeneralClassicException.h" #include "Utilities/GeneralClassicException.h"
#include "Utilities/Options.h" #include "Utilities/Options.h"
#include "AbstractObjects/OpalData.h"
#include "Physics/Physics.h" #include "Physics/Physics.h"
#include "H5hut.h" #include "H5hut.h"
...@@ -367,7 +368,7 @@ MapType Fieldmap::readHeader(std::string Filename) { ...@@ -367,7 +368,7 @@ MapType Fieldmap::readHeader(std::string Filename) {
h5_file_t file = H5OpenFile (Filename.c_str(), H5_O_RDONLY, props); h5_file_t file = H5OpenFile (Filename.c_str(), H5_O_RDONLY, props);
assert (file != (h5_file_t)H5_ERR); assert (file != (h5_file_t)H5_ERR);
H5CloseProp (props); H5CloseProp (props);
h5err = H5SetStep(file, 0); h5err = H5SetStep(file, 0);
assert (h5err != H5_ERR); assert (h5err != H5_ERR);
...@@ -469,8 +470,9 @@ void Fieldmap::checkMap(unsigned int accuracy, ...@@ -469,8 +470,9 @@ void Fieldmap::checkMap(unsigned int accuracy,
size_t lastSlash = Filename_m.find_last_of("/"); size_t lastSlash = Filename_m.find_last_of("/");
lastSlash = (lastSlash == std::string::npos)? 0: lastSlash + 1; lastSlash = (lastSlash == std::string::npos)? 0: lastSlash + 1;
auto opal = OpalData::getInstance();
std::ofstream out; std::ofstream out;
if (Ippl::myNode() == 0) { if (Ippl::myNode() == 0 && !opal->isOptimizerRun()) {
out.open("data/" + Filename_m.substr(lastSlash, lastDot) + ".check"); out.open("data/" + Filename_m.substr(lastSlash, lastDot) + ".check");
out << "# z original reproduced\n"; out << "# z original reproduced\n";
} }
...@@ -492,10 +494,13 @@ void Fieldmap::checkMap(unsigned int accuracy, ...@@ -492,10 +494,13 @@ void Fieldmap::checkMap(unsigned int accuracy,
ezMax = std::abs(ez) > ezMax? std::abs(ez): ezMax; ezMax = std::abs(ez) > ezMax? std::abs(ez): ezMax;
error += std::pow(difference, 2.0); error += std::pow(difference, 2.0);
ezSquare += std::pow(ez, 2.0); ezSquare += std::pow(ez, 2.0);
out << std::setw(16) << std::setprecision(8) << *it
<< std::setw(16) << std::setprecision(8) << ez if (Ippl::myNode() == 0 && !opal->isOptimizerRun()) {
<< std::setw(16) << std::setprecision(8) << onAxisFieldCheck out << std::setw(16) << std::setprecision(8) << *it
<< std::endl; << std::setw(16) << std::setprecision(8) << ez
<< std::setw(16) << std::setprecision(8) << onAxisFieldCheck
<< std::endl;
}
} }
out.close(); out.close();
...@@ -801,4 +806,4 @@ REGISTER_PARSE_TYPE(std::string); ...@@ -801,4 +806,4 @@ REGISTER_PARSE_TYPE(std::string);
std::string Fieldmap::alpha_numeric("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-+\211"); std::string Fieldmap::alpha_numeric("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-+\211");
std::map<std::string, Fieldmap::FieldmapDescription> Fieldmap::FieldmapDictionary = std::map<std::string, Fieldmap::FieldmapDescription>(); std::map<std::string, Fieldmap::FieldmapDescription> Fieldmap::FieldmapDictionary = std::map<std::string, Fieldmap::FieldmapDescription>();
char Fieldmap::buffer_m[READ_BUFFER_LENGTH]; char Fieldmap::buffer_m[READ_BUFFER_LENGTH];
\ No newline at end of file
...@@ -392,7 +392,8 @@ void OpalBeamline::compute3DLattice() { ...@@ -392,7 +392,8 @@ void OpalBeamline::compute3DLattice() {
} }
void OpalBeamline::plot3DLattice() { void OpalBeamline::plot3DLattice() {
if (Ippl::myNode() != 0) return; auto opal = OpalData::getInstance();
if (opal->isOptimizerRun() || Ippl::myNode() != 0) return;
elements_m.sort([](const ClassicField& a, const ClassicField& b) { elements_m.sort([](const ClassicField& a, const ClassicField& b) {
double edgeA = 0.0, edgeB = 0.0; double edgeA = 0.0, edgeB = 0.0;
...@@ -455,13 +456,6 @@ void OpalBeamline::plot3DLattice() { ...@@ -455,13 +456,6 @@ void OpalBeamline::plot3DLattice() {
} }
} }
it = elements_m.begin();
double tau = (minX(0) - origin(0) - 0.3) / direction(0);
origin += tau * direction;
if (origin(0) < minX(0)) minX(0) = origin(0);
if (origin(1) < minX(1)) minX(1) = origin(1);
std::ofstream gpl; std::ofstream gpl;
std::string fileName = "data/" + OpalData::getInstance()->getInputBasename() + "_ElementPositions.gpl"; std::string fileName = "data/" + OpalData::getInstance()->getInputBasename() + "_ElementPositions.gpl";
if (Options::openMode == Options::APPEND && boost::filesystem::exists(fileName)) { if (Options::openMode == Options::APPEND && boost::filesystem::exists(fileName)) {
...@@ -471,6 +465,7 @@ void OpalBeamline::plot3DLattice() { ...@@ -471,6 +465,7 @@ void OpalBeamline::plot3DLattice() {
} }
gpl.precision(8); gpl.precision(8);
it = elements_m.begin();
for (; it != end; ++ it) { for (; it != end; ++ it) {
std::shared_ptr<Component> element = (*it).getElement(); std::shared_ptr<Component> element = (*it).getElement();
...@@ -492,7 +487,7 @@ void OpalBeamline::plot3DLattice() { ...@@ -492,7 +487,7 @@ void OpalBeamline::plot3DLattice() {
} }
void OpalBeamline::save3DLattice() { void OpalBeamline::save3DLattice() {
if (Ippl::myNode() != 0) return; if (Ippl::myNode() != 0 || OpalData::getInstance()->isOptimizerRun()) return;
elements_m.sort([](const ClassicField& a, const ClassicField& b) { elements_m.sort([](const ClassicField& a, const ClassicField& b) {
return a.order_m < b.order_m; return a.order_m < b.order_m;
...@@ -647,7 +642,7 @@ namespace { ...@@ -647,7 +642,7 @@ namespace {
} }
void OpalBeamline::save3DInput() { void OpalBeamline::save3DInput() {
if (Ippl::myNode() != 0) return; if (Ippl::myNode() != 0 || OpalData::getInstance()->isOptimizerRun()) return;
FieldList::iterator it = elements_m.begin(); FieldList::iterator it = elements_m.begin();
FieldList::iterator end = elements_m.end(); FieldList::iterator end = elements_m.end();
......
...@@ -36,7 +36,9 @@ OpalFlexibleCollimator::OpalFlexibleCollimator(): ...@@ -36,7 +36,9 @@ OpalFlexibleCollimator::OpalFlexibleCollimator():
itsAttr[DESC] = Attributes::makeString itsAttr[DESC] = Attributes::makeString
("DESCRIPTION", "String describing the distribution of holes"); ("DESCRIPTION", "String describing the distribution of holes");
itsAttr[OUTFN] = Attributes::makeString itsAttr[OUTFN] = Attributes::makeString
("OUTFN", "File name of log file for deleted particles"); ("OUTFN", "File name of log file for deleted particles");
itsAttr[DUMP] = Attributes::makeBool
("DUMP", "Save quadtree and holes of collimator", false);
registerStringAttribute("OUTFN"); registerStringAttribute("OUTFN");
registerStringAttribute("DESC"); registerStringAttribute("DESC");
...@@ -109,6 +111,10 @@ void OpalFlexibleCollimator::update() { ...@@ -109,6 +111,10 @@ void OpalFlexibleCollimator::update() {
coll->setParticleMatterInteraction(partMatInt_m->handler_m); coll->setParticleMatterInteraction(partMatInt_m->handler_m);
} }
if (Attributes::getBool(itsAttr[DUMP])) {
coll->writeHolesAndQuadtree(getOpalName());
}
// Transmit "unknown" attributes. // Transmit "unknown" attributes.
OpalElement::updateUnknown(coll); OpalElement::updateUnknown(coll);
} }
\ No newline at end of file
...@@ -35,6 +35,7 @@ public: ...@@ -35,6 +35,7 @@ public:
FNAME = COMMON, // The horizontal half-size. FNAME = COMMON, // The horizontal half-size.
DESC, DESC,
OUTFN, OUTFN,
DUMP,
SIZE SIZE
}; };
......
...@@ -169,6 +169,8 @@ void OptimizeCmd::execute() { ...@@ -169,6 +169,8 @@ void OptimizeCmd::execute() {
namespace fs = boost::filesystem; namespace fs = boost::filesystem;
auto opal = OpalData::getInstance(); auto opal = OpalData::getInstance();
opal->setOptimizerFlag();
fs::path inputfile(Attributes::getString(itsAttr[INPUT])); fs::path inputfile(Attributes::getString(itsAttr[INPUT]));
std::vector<std::string> dvarsstr = Attributes::getStringArray(itsAttr[DVARS]); std::vector<std::string> dvarsstr = Attributes::getStringArray(itsAttr[DVARS]);
...@@ -415,7 +417,7 @@ void OptimizeCmd::execute() { ...@@ -415,7 +417,7 @@ void OptimizeCmd::execute() {
stashEnvironment(); stashEnvironment();
try { try {
CmdArguments_t args(new CmdArguments(argv.size(), &argv[0])); CmdArguments_t args(new CmdArguments(argv.size(), &argv[0]));
this->run(args, funcs, dvars, objectives, constraints); this->run(args, funcs, dvars, objectives, constraints);
} catch (OptPilotException &e) { } catch (OptPilotException &e) {
...@@ -442,15 +444,15 @@ void OptimizeCmd::popEnvironment() { ...@@ -442,15 +444,15 @@ void OptimizeCmd::popEnvironment() {
OptimizeCmd::CrossOver OptimizeCmd::crossoverSelection(std::string crossover) { OptimizeCmd::CrossOver OptimizeCmd::crossoverSelection(std::string crossover) {
crossover = Util::toUpper(crossover); crossover = Util::toUpper(crossover);
std::map<std::string, CrossOver> map; std::map<std::string, CrossOver> map;
map["BLEND"] = CrossOver::Blend; map["BLEND"] = CrossOver::Blend;
map["NAIVEONEPOINT"] = CrossOver::NaiveOnePoint; map["NAIVEONEPOINT"] = CrossOver::NaiveOnePoint;
map["NAIVEUNIFORM"] = CrossOver::NaiveUniform; map["NAIVEUNIFORM"] = CrossOver::NaiveUniform;
map["SIMULATEDBINARY"] = CrossOver::SimulatedBinary; map["SIMULATEDBINARY"] = CrossOver::SimulatedBinary;
CrossOver co = CrossOver::Blend; CrossOver co = CrossOver::Blend;
switch ( map[crossover] ) { switch ( map[crossover] ) {
case CrossOver::Blend: case CrossOver::Blend:
break; break;
...@@ -467,19 +469,19 @@ OptimizeCmd::CrossOver OptimizeCmd::crossoverSelection(std::string crossover) { ...@@ -467,19 +469,19 @@ OptimizeCmd::CrossOver OptimizeCmd::crossoverSelection(std::string crossover) {
throw OpalException("OptimizeCmd::crossoverSelection", throw OpalException("OptimizeCmd::crossoverSelection",
"No cross over '" + crossover + "' supported."); "No cross over '" + crossover + "' supported.");
} }
return co; return co;
} }
OptimizeCmd::Mutation OptimizeCmd::mutationSelection(std::string mutation) { OptimizeCmd::Mutation OptimizeCmd::mutationSelection(std::string mutation) {
mutation = Util::toUpper(mutation); mutation = Util::toUpper(mutation);
std::map<std::string, Mutation> map; std::map<std::string, Mutation> map;
map["INDEPENDENTBIT"] = Mutation::IndependentBit; map["INDEPENDENTBIT"] = Mutation::IndependentBit;
map["ONEBIT"] = Mutation::OneBit; map["ONEBIT"] = Mutation::OneBit;
Mutation mut = Mutation::IndependentBit; Mutation mut = Mutation::IndependentBit;
switch ( map[mutation] ) { switch ( map[mutation] ) {
case Mutation::IndependentBit: case Mutation::IndependentBit:
break; break;
...@@ -490,7 +492,7 @@ OptimizeCmd::Mutation OptimizeCmd::mutationSelection(std::string mutation) { ...@@ -490,7 +492,7 @@ OptimizeCmd::Mutation OptimizeCmd::mutationSelection(std::string mutation) {
throw OpalException("OptimizeCmd::mutationSelection", throw OpalException("OptimizeCmd::mutationSelection",
"No mutation '" + mutation + "' supported."); "No mutation '" + mutation + "' supported.");
} }
return mut; return mut;
} }
...@@ -505,18 +507,18 @@ void OptimizeCmd::run(const CmdArguments_t& args, ...@@ -505,18 +507,18 @@ void OptimizeCmd::run(const CmdArguments_t& args,
typedef CommSplitter< ManyMasterSplit< NoCommTopology > > Comm_t; typedef CommSplitter< ManyMasterSplit< NoCommTopology > > Comm_t;
typedef SocialNetworkGraph< NoCommTopology > SolPropagationGraph_t; typedef SocialNetworkGraph< NoCommTopology > SolPropagationGraph_t;
boost::shared_ptr<Comm_t> comm(new Comm_t(args, MPI_COMM_WORLD)); boost::shared_ptr<Comm_t> comm(new Comm_t(args, MPI_COMM_WORLD));
CrossOver crossover = this->crossoverSelection(Attributes::getString(itsAttr[CROSSOVER])); CrossOver crossover = this->crossoverSelection(Attributes::getString(itsAttr[CROSSOVER]));
Mutation mutation = this->mutationSelection(Attributes::getString(itsAttr[MUTATION])); Mutation mutation = this->mutationSelection(Attributes::getString(itsAttr[MUTATION]));
switch ( crossover + mutation ) { switch ( crossover + mutation ) {
case CrossOver::Blend + Mutation::IndependentBit: case CrossOver::Blend + Mutation::IndependentBit:
{ {
typedef FixedPisaNsga2< BlendCrossover, IndependentBitMutation > Opt_t; typedef FixedPisaNsga2< BlendCrossover, IndependentBitMutation > Opt_t;
typedef Pilot<Input_t, Opt_t, Sim_t, SolPropagationGraph_t, Comm_t> pilot_t; typedef Pilot<Input_t, Opt_t, Sim_t, SolPropagationGraph_t, Comm_t> pilot_t;
boost::scoped_ptr<pilot_t> pi(new pilot_t(args, comm, boost::scoped_ptr<pilot_t> pi(new pilot_t(args, comm,
funcs, dvars, funcs, dvars,
objectives, constraints, objectives, constraints,
...@@ -527,7 +529,7 @@ void OptimizeCmd::run(const CmdArguments_t& args, ...@@ -527,7 +529,7 @@ void OptimizeCmd::run(const CmdArguments_t& args,
{ {
typedef FixedPisaNsga2< BlendCrossover, OneBitMutation > Opt_t; typedef FixedPisaNsga2< BlendCrossover, OneBitMutation > Opt_t;
typedef Pilot<Input_t, Opt_t, Sim_t, SolPropagationGraph_t, Comm_t> pilot_t; typedef Pilot<Input_t, Opt_t, Sim_t, SolPropagationGraph_t, Comm_t> pilot_t;
boost::scoped_ptr<pilot_t> pi(new pilot_t(args, comm, boost::scoped_ptr<pilot_t> pi(new pilot_t(args, comm,
funcs, dvars, funcs, dvars,
objectives, constraints, objectives, constraints,
...@@ -538,7 +540,7 @@ void OptimizeCmd::run(const CmdArguments_t& args, ...@@ -538,7 +540,7 @@ void OptimizeCmd::run(const CmdArguments_t& args,
{ {
typedef FixedPisaNsga2< NaiveOnePointCrossover, IndependentBitMutation > Opt_t; typedef FixedPisaNsga2< NaiveOnePointCrossover, IndependentBitMutation > Opt_t;
typedef Pilot<Input_t, Opt_t, Sim_t, SolPropagationGraph_t, Comm_t> pilot_t; typedef Pilot<Input_t, Opt_t, Sim_t, SolPropagationGraph_t, Comm_t> pilot_t;
boost::scoped_ptr<pilot_t> pi(new pilot_t(args, comm, boost::scoped_ptr<pilot_t> pi(new pilot_t(args, comm,
funcs, dvars, funcs, dvars,
objectives, constraints, objectives, constraints,
...@@ -549,7 +551,7 @@ void OptimizeCmd::run(const CmdArguments_t& args, ...@@ -549,7 +551,7 @@ void OptimizeCmd::run(const CmdArguments_t& args,
{ {
typedef FixedPisaNsga2< NaiveOnePointCrossover, OneBitMutation > Opt_t; typedef FixedPisaNsga2< NaiveOnePointCrossover, OneBitMutation > Opt_t;
typedef Pilot<Input_t, Opt_t, Sim_t, SolPropagationGraph_t, Comm_t> pilot_t; typedef Pilot<Input_t, Opt_t, Sim_t, SolPropagationGraph_t, Comm_t> pilot_t;
boost::scoped_ptr<pilot_t> pi(new pilot_t(args, comm, boost::scoped_ptr<pilot_t> pi(new pilot_t(args, comm,
funcs, dvars, funcs, dvars,
objectives, constraints, objectives, constraints,
...@@ -560,7 +562,7 @@ void OptimizeCmd::run(const CmdArguments_t& args, ...@@ -560,7 +562,7 @@ void OptimizeCmd::run(const CmdArguments_t& args,
{ {
typedef FixedPisaNsga2< NaiveUniformCrossover, IndependentBitMutation > Opt_t; typedef FixedPisaNsga2< NaiveUniformCrossover, IndependentBitMutation > Opt_t;
typedef Pilot<Input_t, Opt_t, Sim_t, SolPropagationGraph_t, Comm_t> pilot_t; typedef Pilot<Input_t, Opt_t, Sim_t, SolPropagationGraph_t, Comm_t> pilot_t;
boost::scoped_ptr<pilot_t> pi(new pilot_t(args, comm, boost::scoped_ptr<pilot_t> pi(new pilot_t(args, comm,
funcs, dvars, funcs, dvars,
objectives, constraints, objectives, constraints,
...@@ -571,7 +573,7 @@ void OptimizeCmd::run(const CmdArguments_t& args, ...@@ -571,7 +573,7 @@ void OptimizeCmd::run(const CmdArguments_t& args,
{ {
typedef FixedPisaNsga2< NaiveUniformCrossover, OneBitMutation > Opt_t; typedef FixedPisaNsga2< NaiveUniformCrossover, OneBitMutation > Opt_t;
typedef Pilot<Input_t, Opt_t, Sim_t, SolPropagationGraph_t, Comm_t> pilot_t; typedef Pilot<Input_t, Opt_t, Sim_t, SolPropagationGraph_t, Comm_t> pilot_t;
boost::scoped_ptr<pilot_t> pi(new pilot_t(args, comm, boost::scoped_ptr<pilot_t> pi(new pilot_t(args, comm,
funcs, dvars, funcs, dvars,
objectives, constraints, objectives, constraints,
...@@ -582,7 +584,7 @@ void OptimizeCmd::run(const CmdArguments_t& args, ...@@ -582,7 +584,7 @@ void OptimizeCmd::run(const CmdArguments_t& args,
{ {