BugBuster in PSO
This commit is contained in:
parent
3f31f5d396
commit
211c7a4477
@ -1429,7 +1429,9 @@ public class ParticleSwarmOptimization implements InterfaceOptimizer, java.io.Se
|
|||||||
init();
|
init();
|
||||||
} else for (int i=0; i<pop.size(); i++) {
|
} else for (int i=0; i<pop.size(); i++) {
|
||||||
AbstractEAIndividual indy = pop.getEAIndividual(i);
|
AbstractEAIndividual indy = pop.getEAIndividual(i);
|
||||||
if (indy.hasData(partTypeKey)) {
|
if (indy==null) {
|
||||||
|
System.err.println("Error in PSO.setPopulation!");
|
||||||
|
} else if (!indy.hasData(partTypeKey)) {
|
||||||
initIndividualDefaults(indy);
|
initIndividualDefaults(indy);
|
||||||
initIndividualMemory(indy);
|
initIndividualMemory(indy);
|
||||||
indy.putData(indexKey, i);
|
indy.putData(indexKey, i);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user