- Timestamp:
- 01/02/12 10:57:21 (13 years ago)
- Location:
- branches/HeuristicLab.MetaOptimization
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.MetaOptimization
- Property svn:ignore
-
old new 7 7 TraceAndTestImpact.testsettings 8 8 HeuristicLab.MetaOptimization.sln.docstates.suo 9 _ReSharper.HeuristicLab.MetaOptimization
-
- Property svn:ignore
-
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Evaluators/AlgorithmEvaluator.cs
r6473 r7253 3 3 using HeuristicLab.Core; 4 4 using HeuristicLab.Data; 5 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;6 5 using HeuristicLab.Operators; 7 6 using HeuristicLab.Optimization; … … 58 57 if (!isValidScope) return base.Apply(); 59 58 60 ItemDictionary<StringValue, RunCollection> solutionCache = ResultsParameter.ActualValue.ContainsKey("SolutionCache") ? (ItemDictionary<StringValue, RunCollection>)ResultsParameter.ActualValue["SolutionCache"].Value : null; 59 ItemDictionary<StringValue, RunCollection> solutionCache = 60 ResultsParameter.ActualValue.ContainsKey("SolutionCache") ? 61 (ItemDictionary<StringValue, RunCollection>)ResultsParameter.ActualValue["SolutionCache"].Value : 62 null; 61 63 ParameterConfigurationTree parameterConfiguration = ParameterConfigurationParameter.ActualValue; 62 64 IAlgorithm algorithm = AlgorithmParameter.ActualValue; … … 70 72 return base.Apply(); 71 73 } 72 73 // for debug purposes, remove later74 private static string PrintGrammar(ISymbolicExpressionGrammar grammar) {75 return string.Join(string.Empty, grammar.Symbols.Select(x => x.InitialFrequency).ToArray());76 //foreach (var symbol in grammar.Symbols) {77 // Console.WriteLine("{0} ({1})", symbol.ToString(), symbol.InitialFrequency);78 //}79 }80 74 } 81 75 } -
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Evaluators/AlgorithmRunsAnalyzer.cs
r6489 r7253 156 156 run.Results.Add("Meta-ProblemIndex", new IntValue(problemIndex)); 157 157 run.Name = string.Format("{0} Problem {1} Run {2}", parameterConfiguration.ParameterInfoString, problemIndex, repetitionIndex); 158 159 qualities[problemIndex][repetitionIndex] = GetResultValue<DoubleValue>(run.Results, qualityMeasureName).Value; 158 159 qualities[problemIndex][repetitionIndex] = GetResultValue<DoubleValue>(run.Results, qualityMeasureName).Value; 160 160 executionTimes[problemIndex][repetitionIndex] = (((TimeSpanValue)run.Results["Execution Time"]).Value); 161 evaluatedSolutions[problemIndex][repetitionIndex] = (((IntValue)run.Results["EvaluatedSolutions"]).Value); 161 if (run.Results.ContainsKey("EvaluatedSolutions")) { 162 evaluatedSolutions[problemIndex][repetitionIndex] = (((IntValue)run.Results["EvaluatedSolutions"]).Value); 163 } else { 164 evaluatedSolutions[problemIndex][repetitionIndex] = 1; 165 } 162 166 runs.Add(run); 163 167 } … … 208 212 // in OSGA there are more subscopes, so be careful which to delete 209 213 CurrentScope.SubScopes.RemoveAll(x => x.Variables.Count((v) => (v.Name == "RepetitionCount")) == 1); 210 214 211 215 return base.Apply(); 212 216 }
Note: See TracChangeset
for help on using the changeset viewer.