Commit 04aaf5fb authored by frey_m's avatar frey_m
Browse files

Sampler: skip dummy element

parent 3e6ab725
......@@ -158,7 +158,7 @@ protected:
sim->collectResults();
requested_results = sim->getResults();
// base clase of SamplePilot requires at least 1 objective --> dummy objective (SamplePilot, line 72)
// base clase of SamplePilot requires at least 1 objective --> dummy objective (SamplePilot, line 64)
if ( (this->objectives_.size() > 1) && filesToKeep_m.empty() ) {
sim->cleanUp();
} else {
......
......@@ -225,6 +225,11 @@ void Sampler::addIndividualToJSON_m(const boost::shared_ptr<Individual_t>& ind)
for(size_t i=0; i < ind->objectives.size(); i++, expr_it++) {
std::string name = expr_it->first;
// skip dummy objective (SamplePilot.h, line 64)
if ( name == "dummy" )
continue;
tree_m.put("samples." + id + ".obj." + name, ind->objectives[i]);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment