[Quantproject-developers] QuantProject/b1_ADT/Optimizing/Genetic GeneticOptimizer.cs, 1.26, 1.27
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2008-01-19 18:59:26
|
Update of /cvsroot/quantproject/QuantProject/b1_ADT/Optimizing/Genetic In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv15239/b1_ADT/Optimizing/Genetic Modified Files: GeneticOptimizer.cs Log Message: It has been improved the code to debug exceptions given by this.currentGeneration.Sort Now a full cycle through the generation (computing each fitness) can easily be done (thus, step by step debug is now allowed) Index: GeneticOptimizer.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b1_ADT/Optimizing/Genetic/GeneticOptimizer.cs,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** GeneticOptimizer.cs 21 Aug 2007 21:52:23 -0000 1.26 --- GeneticOptimizer.cs 19 Jan 2008 18:59:19 -0000 1.27 *************** *** 297,303 **** private void sortCurrentGenerationAndFireNewGenerationEvent() { ! // comment out the following line if you have an exception // in the Sort method and you want to break to the proper line ! // double fitness = ((Genome) this.currentGeneration[ 0 ]).Fitness; this.currentGeneration.Sort(this.genomeComparer); if(this.NewGeneration != null) --- 297,306 ---- private void sortCurrentGenerationAndFireNewGenerationEvent() { ! // comment out the following three lines if you have an exception // in the Sort method and you want to break to the proper line ! // double fitness; ! // for ( int i = 0 ; i < this.currentGeneration.Count ; i++ ) ! // fitness = ((Genome) this.currentGeneration[ i ]).Fitness; ! this.currentGeneration.Sort(this.genomeComparer); if(this.NewGeneration != null) |