Changeset 5576
- Timestamp:
- 03/01/11 10:25:48 (14 years ago)
- Location:
- branches/HeuristicLab.MetaOptimization
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.MetaOptimization/HeuristicLab.MetaOptimization.Test/Program.cs
r5522 r5576 48 48 //private static int baseAlgorithmMaxGenerations = 1000; 49 49 50 private static int metaAlgorithmPopulationSize = 20;51 private static int metaAlgorithmMaxGenerations = 20;50 private static int metaAlgorithmPopulationSize = 5; 51 private static int metaAlgorithmMaxGenerations = 15; 52 52 private static int metaProblemRepetitions = 2; 53 private static int baseAlgorithmMaxGenerations = 10;53 private static int baseAlgorithmMaxGenerations = 5; 54 54 private static double mutationProbability = 0.10; 55 55 … … 638 638 ProblemSize = new IntValue(2) 639 639 }); 640 //metaOptimizationProblem.Problems.Add(new HeuristicLab.Problems.TestFunctions.SingleObjectiveTestFunctionProblem() {641 //Evaluator = new GriewankEvaluator(),642 //ProblemSize = new IntValue(20)643 //});644 //metaOptimizationProblem.Problems.Add(new HeuristicLab.Problems.TestFunctions.SingleObjectiveTestFunctionProblem() {645 //Evaluator = new GriewankEvaluator(),646 //ProblemSize = new IntValue(500)647 //});648 649 ConfigurePopulationSize(algorithmVc, 0, 20, 1);640 metaOptimizationProblem.Problems.Add(new HeuristicLab.Problems.TestFunctions.SingleObjectiveTestFunctionProblem() { 641 Evaluator = new GriewankEvaluator(), 642 ProblemSize = new IntValue(20) 643 }); 644 metaOptimizationProblem.Problems.Add(new HeuristicLab.Problems.TestFunctions.SingleObjectiveTestFunctionProblem() { 645 Evaluator = new GriewankEvaluator(), 646 ProblemSize = new IntValue(500) 647 }); 648 649 ConfigurePopulationSize(algorithmVc, 5, 20, 1); 650 650 ConfigureMutationRate(algorithmVc, 0.0, 1.0, 0.01); 651 651 ConfigureMutationOperator(algorithmVc); 652 ConfigureElites(algorithmVc, 0, 30, 1);652 //ConfigureElites(algorithmVc, 0, 30, 1); 653 653 ConfigureSelectionOperator(algorithmVc, true); 654 654 return algorithmVc; … … 855 855 var orderedRuns = rc.OrderBy(x => x.Results["AverageQualityNormalized"]); 856 856 857 TableBuilder tb = new TableBuilder("QNorm", "Qualities", "PoSi", "MutRa", "Eli","SelOp", "MutOp", "NrSelSubScopes");857 TableBuilder tb = new TableBuilder("QNorm", "Qualities", "PoSi", "MutRa", /*"Eli",*/ "SelOp", "MutOp", "NrSelSubScopes"); 858 858 foreach (IRun run in orderedRuns) { 859 859 string selector; … … 869 869 ((IntValue)run.Parameters["PopulationSize"]).Value.ToString(), 870 870 ((DoubleValue)run.Parameters["MutationProbability"]).Value.ToString("0.0000"), 871 ((IntValue)run.Parameters["Elites"]).Value.ToString(),871 //((IntValue)run.Parameters["Elites"]).Value.ToString(), 872 872 Shorten(selector, 20), 873 873 Shorten(run.Parameters.ContainsKey("Mutator") ? run.Parameters["Mutator"].ToString() : "null", 40), -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Analyzers/BestParameterConfigurationAnalyzer.cs
r5359 r5576 97 97 RunCollection rc = new RunCollection(); 98 98 foreach (ParameterConfigurationTree pt in parameterTrees.OrderBy(x => x.AverageQualityNormalized)) { // todo: respect Maximization:true/false 99 IRun run = new Run(); 100 run.Name = string.Format("Individual {0} ({1})", i, pt.ParameterInfoString); 101 pt.CollectResultValues(run.Results); 102 pt.CollectParameterValues(run.Parameters); 103 MetaOptimizationUtil.ClearParameters(run, pt.GetOptimizedParameterNames()); 104 rc.Add(run); 99 rc.Add(pt.ToRun(string.Format("Individual {0} ({1})", i, pt.ParameterInfoString))); 105 100 i++; 106 101 } -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/ParameterConfigurationTree.cs
r5359 r5576 240 240 return this.Name; 241 241 } 242 243 public IRun ToRun() { 244 return ToRun(this.ParameterInfoString); 245 } 246 247 public IRun ToRun(string name) { 248 IRun run = new Run(); 249 run.Name = name; 250 this.CollectResultValues(run.Results); 251 this.CollectParameterValues(run.Parameters); 252 MetaOptimizationUtil.ClearParameters(run, this.GetOptimizedParameterNames()); 253 return run; 254 } 242 255 } 243 256 } -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encoding/RangeConstraints/Range.cs
r5522 r5576 53 53 if (stepSize != value) { 54 54 if (stepSize != null) { 55 stepSize.ValueChanged -= new EventHandler( upperBound_ToStringChanged);55 stepSize.ValueChanged -= new EventHandler(stepSize_ToStringChanged); 56 56 } 57 57 stepSize = value; -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/HeuristicLab.Problems.MetaOptimization-3.3.csproj
r5522 r5576 139 139 <ItemGroup> 140 140 <Compile Include="Analyzers\BestParameterConfigurationAnalyzer.cs" /> 141 <Compile Include="Analyzers\PMOBestSolutionHistoryAnalyzer.cs" /> 142 <Compile Include="Analyzers\PMOProblemQualitiesAnalyzer.cs" /> 141 143 <Compile Include="Analyzers\PMOPopulationDiversityAnalyzer.cs" /> 142 144 <Compile Include="ConstrainedTypeValue.cs" /> 143 145 <Compile Include="MetaOptimizationUtil.cs" /> 146 <Compile Include="Operators\Crossovers\MultiIntValueCrossover.cs" /> 144 147 <Compile Include="TypeValue.cs" /> 145 148 <None Include="Properties\AssemblyInfo.cs.frame" /> -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/MetaOptimizationProblem.cs
r5522 r5576 109 109 private PMOPopulationDiversityAnalyzer PMOPopulationDiversityAnalyzer { 110 110 get { return Operators.OfType<PMOPopulationDiversityAnalyzer>().FirstOrDefault(); } 111 } 111 } 112 private PMOProblemQualitiesAnalyzer PMOProblemQualitiesAnalyzer { 113 get { return Operators.OfType<PMOProblemQualitiesAnalyzer>().FirstOrDefault(); } 114 } 115 private PMOBestSolutionHistoryAnalyzer PMOBestSolutionHistoryAnalyzer { 116 get { return Operators.OfType<PMOBestSolutionHistoryAnalyzer>().FirstOrDefault(); } 117 } 112 118 #endregion 113 119 … … 174 180 Operators.Add(new SolutionCacheAnalyzer()); 175 181 Operators.Add(new PMOPopulationDiversityAnalyzer()); 182 Operators.Add(new PMOProblemQualitiesAnalyzer()); 183 Operators.Add(new PMOBestSolutionHistoryAnalyzer()); 176 184 } 177 185 private void ParameterizeSolutionCreator() { … … 193 201 PMOPopulationDiversityAnalyzer.SolutionParameter.ActualName = ((RandomParameterConfigurationCreator)SolutionCreator).ParameterConfigurationParameter.ActualName; 194 202 PMOPopulationDiversityAnalyzer.StoreHistoryParameter.Value.Value = true; 203 } 204 if (PMOProblemQualitiesAnalyzer != null) { 205 PMOProblemQualitiesAnalyzer.ParameterConfigurationParameter.ActualName = ((RandomParameterConfigurationCreator)SolutionCreator).ParameterConfigurationParameter.ActualName; 206 } 207 if (PMOBestSolutionHistoryAnalyzer != null) { 208 PMOBestSolutionHistoryAnalyzer.ParameterConfigurationParameter.ActualName = ((RandomParameterConfigurationCreator)SolutionCreator).ParameterConfigurationParameter.ActualName; 195 209 } 196 210 }
Note: See TracChangeset
for help on using the changeset viewer.