multiple objective functions (please help me!)

Maurizio Palesi mpalesi at diit.unict.it
Fri Mar 23 05:19:51 EST 2001


Hi,
  please, let me know where I mistake in the following code for multiple
objective functions use.

GARealAlleleSetArray alleles;
<...allele definitions...>
GARealGenome genome(alleles);

GASimpleGA ga(genome);
ga.objectiveFunction(firstObjective);
ga.initialize(my_seed);
// ngen1 generations using objective firstObjective
for (g=1; g<=ngen1; g++)
  ga.step();


ga.objectiveFunction(secondObjective);
// ngen2 generations using objective secondObjective
for (g=1; g<=ngen2; g++)
  ga.step();

I wish the second step starts with the population made by the last
generation of the first step.
Although the secondObjective has called in the second step, the score of
the individual is not updated. Why?

Thanks in advance for your help,
   Maurizio





More information about the galib mailing list