- Timestamp:
- 05/05/10 23:27:50 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithm.cs
r3654 r3658 121 121 get { return (ValueLookupParameter<BoolValue>)Parameters["OffspringSelectionBeforeMutation"]; } 122 122 } 123 private ValueParameter<MultiAnalyzer <IMultiPopulationAnalyzer>> AnalyzerParameter {124 get { return (ValueParameter<MultiAnalyzer <IMultiPopulationAnalyzer>>)Parameters["Analyzer"]; }125 } 126 private ValueParameter<MultiAnalyzer <IPopulationAnalyzer>> IslandAnalyzerParameter {127 get { return (ValueParameter<MultiAnalyzer <IPopulationAnalyzer>>)Parameters["IslandAnalyzer"]; }123 private ValueParameter<MultiAnalyzer> AnalyzerParameter { 124 get { return (ValueParameter<MultiAnalyzer>)Parameters["Analyzer"]; } 125 } 126 private ValueParameter<MultiAnalyzer> IslandAnalyzerParameter { 127 get { return (ValueParameter<MultiAnalyzer>)Parameters["IslandAnalyzer"]; } 128 128 } 129 129 #endregion … … 218 218 set { OffspringSelectionBeforeMutationParameter.Value = value; } 219 219 } 220 public MultiAnalyzer <IMultiPopulationAnalyzer>Analyzer {220 public MultiAnalyzer Analyzer { 221 221 get { return AnalyzerParameter.Value; } 222 222 set { AnalyzerParameter.Value = value; } 223 223 } 224 public MultiAnalyzer <IPopulationAnalyzer>IslandAnalyzer {224 public MultiAnalyzer IslandAnalyzer { 225 225 get { return IslandAnalyzerParameter.Value; } 226 226 set { IslandAnalyzerParameter.Value = value; } … … 276 276 Parameters.Add(new ValueLookupParameter<DoubleValue>("MaximumSelectionPressure", "The maximum selection pressure that terminates the algorithm.", new DoubleValue(100))); 277 277 Parameters.Add(new ValueLookupParameter<BoolValue>("OffspringSelectionBeforeMutation", "True if the offspring selection step should be applied before mutation, false if it should be applied after mutation.", new BoolValue(false))); 278 Parameters.Add(new ValueParameter<MultiAnalyzer <IMultiPopulationAnalyzer>>("Analyzer", "The operator used to analyze the islands.", new MultiAnalyzer<IMultiPopulationAnalyzer>()));279 Parameters.Add(new ValueParameter<MultiAnalyzer <IPopulationAnalyzer>>("IslandAnalyzer", "The operator used to analyze each island.", new MultiAnalyzer<IPopulationAnalyzer>()));278 Parameters.Add(new ValueParameter<MultiAnalyzer>("Analyzer", "The operator used to analyze the islands.", new MultiAnalyzer())); 279 Parameters.Add(new ValueParameter<MultiAnalyzer>("IslandAnalyzer", "The operator used to analyze each island.", new MultiAnalyzer())); 280 280 281 281 RandomCreator randomCreator = new RandomCreator(); … … 613 613 //Analyzer.Operators.Add(qualityAnalyzer); 614 614 if (Problem != null) { 615 foreach (I PopulationAnalyzer analyzer in Problem.Operators.OfType<IPopulationAnalyzer>().OrderBy(x => x.Name)) {615 foreach (IAnalyzer analyzer in Problem.Operators.OfType<IAnalyzer>().OrderBy(x => x.Name)) { 616 616 IslandAnalyzer.Operators.Add(analyzer); 617 617 } 618 foreach (I MultiPopulationAnalyzer analyzer in Problem.Operators.OfType<IMultiPopulationAnalyzer>().OrderBy(x => x.Name))618 foreach (IAnalyzer analyzer in Problem.Operators.OfType<IAnalyzer>().OrderBy(x => x.Name)) 619 619 Analyzer.Operators.Add(analyzer); 620 620 } -
trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/OffspringSelectionGeneticAlgorithm.cs
r3650 r3658 101 101 get { return (ValueLookupParameter<IntValue>)Parameters["SelectedParents"]; } 102 102 } 103 private ValueParameter<MultiAnalyzer <IPopulationAnalyzer>> AnalyzerParameter {104 get { return (ValueParameter<MultiAnalyzer <IPopulationAnalyzer>>)Parameters["Analyzer"]; }103 private ValueParameter<MultiAnalyzer> AnalyzerParameter { 104 get { return (ValueParameter<MultiAnalyzer>)Parameters["Analyzer"]; } 105 105 } 106 106 #endregion … … 171 171 set { SelectedParentsParameter.Value = value; } 172 172 } 173 public MultiAnalyzer <IPopulationAnalyzer>Analyzer {173 public MultiAnalyzer Analyzer { 174 174 get { return AnalyzerParameter.Value; } 175 175 set { AnalyzerParameter.Value = value; } … … 211 211 Parameters.Add(new ValueLookupParameter<BoolValue>("OffspringSelectionBeforeMutation", "True if the offspring selection step should be applied before mutation, false if it should be applied after mutation.", new BoolValue(false))); 212 212 Parameters.Add(new ValueLookupParameter<IntValue>("SelectedParents", "Should be about 2 * PopulationSize, for large problems use a smaller value to decrease memory footprint.", new IntValue(200))); 213 Parameters.Add(new ValueParameter<MultiAnalyzer <IPopulationAnalyzer>>("Analyzer", "The operator used to analyze each generation.", new MultiAnalyzer<IPopulationAnalyzer>()));213 Parameters.Add(new ValueParameter<MultiAnalyzer>("Analyzer", "The operator used to analyze each generation.", new MultiAnalyzer())); 214 214 215 215 RandomCreator randomCreator = new RandomCreator(); … … 436 436 //Analyzer.Operators.Add(qualityAnalyzer); 437 437 if (Problem != null) { 438 foreach (I PopulationAnalyzer analyzer in Problem.Operators.OfType<IPopulationAnalyzer>().OrderBy(x => x.Name))438 foreach (IAnalyzer analyzer in Problem.Operators.OfType<IAnalyzer>().OrderBy(x => x.Name)) 439 439 Analyzer.Operators.Add(analyzer); 440 440 } -
trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASA.cs
r3656 r3658 113 113 get { return (ValueLookupParameter<IntValue>)Parameters["SelectedParents"]; } 114 114 } 115 private ValueParameter<MultiAnalyzer <IMultiPopulationAnalyzer>> AnalyzerParameter {116 get { return (ValueParameter<MultiAnalyzer <IMultiPopulationAnalyzer>>)Parameters["Analyzer"]; }117 } 118 private ValueParameter<MultiAnalyzer <IPopulationAnalyzer>> VillageAnalyzerParameter {119 get { return (ValueParameter<MultiAnalyzer <IPopulationAnalyzer>>)Parameters["VillageAnalyzer"]; }115 private ValueParameter<MultiAnalyzer> AnalyzerParameter { 116 get { return (ValueParameter<MultiAnalyzer>)Parameters["Analyzer"]; } 117 } 118 private ValueParameter<MultiAnalyzer> VillageAnalyzerParameter { 119 get { return (ValueParameter<MultiAnalyzer>)Parameters["VillageAnalyzer"]; } 120 120 } 121 121 #endregion … … 198 198 set { SelectedParentsParameter.Value = value; } 199 199 } 200 public MultiAnalyzer <IMultiPopulationAnalyzer>Analyzer {200 public MultiAnalyzer Analyzer { 201 201 get { return AnalyzerParameter.Value; } 202 202 set { AnalyzerParameter.Value = value; } 203 203 } 204 public MultiAnalyzer <IPopulationAnalyzer>VillageAnalyzer {204 public MultiAnalyzer VillageAnalyzer { 205 205 get { return VillageAnalyzerParameter.Value; } 206 206 set { VillageAnalyzerParameter.Value = value; } … … 250 250 Parameters.Add(new ValueLookupParameter<BoolValue>("OffspringSelectionBeforeMutation", "True if the offspring selection step should be applied before mutation, false if it should be applied after mutation.", new BoolValue(false))); 251 251 Parameters.Add(new ValueLookupParameter<IntValue>("SelectedParents", "Should be about 2 * PopulationSize, for large problems use a smaller value to decrease memory footprint.", new IntValue(200))); 252 Parameters.Add(new ValueParameter<MultiAnalyzer <IMultiPopulationAnalyzer>>("Analyzer", "The operator used to analyze the villages.", new MultiAnalyzer<IMultiPopulationAnalyzer>()));253 Parameters.Add(new ValueParameter<MultiAnalyzer <IPopulationAnalyzer>>("VillageAnalyzer", "The operator used to analyze each village.", new MultiAnalyzer<IPopulationAnalyzer>()));252 Parameters.Add(new ValueParameter<MultiAnalyzer>("Analyzer", "The operator used to analyze the villages.", new MultiAnalyzer())); 253 Parameters.Add(new ValueParameter<MultiAnalyzer>("VillageAnalyzer", "The operator used to analyze each village.", new MultiAnalyzer())); 254 254 255 255 RandomCreator randomCreator = new RandomCreator(); … … 523 523 //Analyzer.Operators.Add(qualityAnalyzer); 524 524 if (Problem != null) { 525 foreach (I PopulationAnalyzer analyzer in Problem.Operators.OfType<IPopulationAnalyzer>().OrderBy(x => x.Name)) {525 foreach (IAnalyzer analyzer in Problem.Operators.OfType<IAnalyzer>().OrderBy(x => x.Name)) { 526 526 VillageAnalyzer.Operators.Add(analyzer); 527 527 } 528 foreach (I MultiPopulationAnalyzer analyzer in Problem.Operators.OfType<IMultiPopulationAnalyzer>().OrderBy(x => x.Name))528 foreach (IAnalyzer analyzer in Problem.Operators.OfType<IAnalyzer>().OrderBy(x => x.Name)) 529 529 Analyzer.Operators.Add(analyzer); 530 530 } -
trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASAMainLoop.cs
r3656 r3658 364 364 resultsCollector2.CollectedValues.Add(new LookupParameter<IntValue>("Generations")); 365 365 resultsCollector2.CollectedValues.Add(new LookupParameter<IntValue>("Evaluated Solutions", null, "EvaluatedSolutions")); 366 resultsCollector 1.CollectedValues.Add(new LookupParameter<DoubleValue>("ComparisonFactor", null, "ComparisonFactor"));367 resultsCollector 1.CollectedValues.Add(new LookupParameter<IntValue>("Terminated Villages", null, "TerminatedVillages"));366 resultsCollector2.CollectedValues.Add(new LookupParameter<DoubleValue>("ComparisonFactor", null, "ComparisonFactor")); 367 resultsCollector2.CollectedValues.Add(new LookupParameter<IntValue>("Terminated Villages", null, "TerminatedVillages")); 368 368 resultsCollector2.CollectedValues.Add(new LookupParameter<IntValue>("Total Active Villages", null, "VillageCount")); 369 369 resultsCollector2.ResultsParameter.ActualName = ResultsParameter.Name;
Note: See TracChangeset
for help on using the changeset viewer.