Changeset 12813 for branches/PerformanceComparison
- Timestamp:
- 07/30/15 15:27:04 (9 years ago)
- Location:
- branches/PerformanceComparison
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PerformanceComparison/HeuristicLab.Analysis
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Analysis (added) merged: 12790
- Property svn:mergeinfo changed
-
branches/PerformanceComparison/HeuristicLab.Analysis.Views
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/PerformanceComparison/HeuristicLab.Analysis/3.3/HeuristicLab.Analysis-3.3.csproj
r12804 r12813 105 105 </PropertyGroup> 106 106 <ItemGroup> 107 <Reference Include="ALGLIB-3. 7.0, Version=3.7.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">108 <HintPath>..\..\bin\ALGLIB-3. 7.0.dll</HintPath>107 <Reference Include="ALGLIB-3.9.0, Version=3.9.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 108 <HintPath>..\..\bin\ALGLIB-3.9.0.dll</HintPath> 109 109 <Private>False</Private> 110 110 </Reference> -
branches/PerformanceComparison/HeuristicLab.Analysis/3.3/Optimizers/IRRestarter.cs
r12808 r12813 44 44 private const string BestQualityResultName = "BestQuality"; 45 45 private const string RandomRestartsResultName = "RandomRestarts"; 46 private const string RTsResultName = "RTs"; 47 private const string RTusResultName = "RTus"; 48 private const string FEsResultName = "FEs"; 49 private const string FEusResultName = "FEus"; 46 50 47 51 public string Filename { get; set; } … … 192 196 get { return algorithm; } 193 197 set { 194 if (value != null && ! typeof(ISingleObjectiveHeuristicOptimizationProblem).IsAssignableFrom(value.ProblemType))198 if (value != null && !value.ProblemType.IsAssignableFrom(typeof(ISingleObjectiveHeuristicOptimizationProblem))) 195 199 throw new ArgumentException("Algorithm is not single-objective!"); 196 200 if (algorithm == value) return; … … 391 395 CurrentRun.Results.Add(BestQualityResultName, new DoubleValue(Maximization ? double.MinValue : double.MaxValue)); 392 396 CurrentRun.Results.Add(RandomRestartsResultName, new IntValue(0)); 397 CurrentRun.Results.Add(RTsResultName, new DoubleValue(0)); 398 CurrentRun.Results.Add(RTusResultName, new DoubleValue(0)); 399 CurrentRun.Results.Add(FEsResultName, new DoubleValue(0)); 400 CurrentRun.Results.Add(FEusResultName, new DoubleValue(0)); 393 401 } 394 402 Algorithm.Start(); … … 517 525 518 526 var execTime = ((TimeSpanValue)CurrentRun.Results[ExecutionTimeResultName]).Value; 527 double evaluationsInThisRun = 0; 519 528 foreach (var result in Algorithm.Results) { 520 529 if (result.Name == perClockAnalyzer.QualityPerClockParameter.ResultName) { … … 549 558 } 550 559 } else if (result.Name == perEvaluationsAnalyzer.EvaluatedSolutionsParameter.ActualName) { 551 var evalSols = ((IntValue)CurrentRun.Results[perEvaluationsAnalyzer.EvaluatedSolutionsParameter.ActualName]).Value; 552 CurrentRun.Results[perEvaluationsAnalyzer.EvaluatedSolutionsParameter.ActualName] = new IntValue(evalSols + ((IntValue)result.Value).Value); 560 var oldEvals = ((IntValue)CurrentRun.Results[perEvaluationsAnalyzer.EvaluatedSolutionsParameter.ActualName]).Value; 561 var newEvals = ((IntValue)result.Value).Value; 562 CurrentRun.Results[perEvaluationsAnalyzer.EvaluatedSolutionsParameter.ActualName] = new IntValue(oldEvals + newEvals); 563 evaluationsInThisRun += newEvals; 553 564 } else if (result.Name == perEvaluationsAnalyzer.EvaluatedMovesParameter.ActualName) { 554 var evalMoves = ((IntValue)CurrentRun.Results[perEvaluationsAnalyzer.EvaluatedMovesParameter.ActualName]).Value; 555 CurrentRun.Results[perEvaluationsAnalyzer.EvaluatedMovesParameter.ActualName] = new IntValue(evalMoves + ((IntValue)result.Value).Value); 565 var oldEvals = ((IntValue)CurrentRun.Results[perEvaluationsAnalyzer.EvaluatedMovesParameter.ActualName]).Value; 566 var newEvals = ((IntValue)result.Value).Value; 567 CurrentRun.Results[perEvaluationsAnalyzer.EvaluatedMovesParameter.ActualName] = new IntValue(oldEvals + newEvals); 568 evaluationsInThisRun += newEvals * moveCostPerSolution; 556 569 } else if (result.Name == perEvaluationsAnalyzer.BestQualityParameter.ActualName) { 557 570 var best = ((DoubleValue)CurrentRun.Results[BestQualityResultName]).Value; … … 566 579 CurrentRun.Results[ExecutionTimeResultName] = new TimeSpanValue(execTime + Algorithm.ExecutionTime); 567 580 581 // Algorithm sets ExecutionTime to zero before firing Prepared 582 // We will thus see ExecutionTimeChanged before Prepared 583 lastAlgorithmExecutionTime = TimeSpan.Zero; 584 568 585 if (!forceStop && !IsFinished) { 569 CurrentRun.Results[RandomRestartsResultName] = new IntValue(1 + ((IntValue)CurrentRun.Results[RandomRestartsResultName]).Value); 570 Algorithm.Prepare(); 586 var restarts = ((IntValue)CurrentRun.Results[RandomRestartsResultName]).Value; 587 if (restarts == 0) { 588 CurrentRun.Results[RTusResultName] = new DoubleValue(Algorithm.ExecutionTime.TotalSeconds); 589 CurrentRun.Results[FEusResultName] = new DoubleValue(evaluationsInThisRun); 590 } else { 591 var rtus = ((DoubleValue)CurrentRun.Results[RTusResultName]).Value; 592 var feus = ((DoubleValue)CurrentRun.Results[FEusResultName]).Value; 593 CurrentRun.Results[RTusResultName] = new DoubleValue(rtus * restarts / (restarts + 1.0) + Algorithm.ExecutionTime.TotalSeconds / (restarts + 1.0)); 594 CurrentRun.Results[FEusResultName] = new DoubleValue(feus * restarts / (restarts + 1.0) + evaluationsInThisRun / (restarts + 1.0)); 595 } 596 CurrentRun.Results[RandomRestartsResultName] = new IntValue(restarts + 1); 597 Algorithm.Prepare(true); 571 598 Algorithm.Start(); 572 599 } else { 600 if (Maximization && BestSoFar >= TargetValue || !Maximization && BestSoFar <= TargetValue) { 601 CurrentRun.Results[RTsResultName] = (IItem)Algorithm.Results[perClockAnalyzer.QualityPerClockParameter.ResultName].Value.Clone(); 602 CurrentRun.Results[FEsResultName] = (IItem)Algorithm.Results[perEvaluationsAnalyzer.QualityPerEvaluationsParameter.ResultName].Value.Clone(); 603 } 573 604 forceStop = false; 574 605 Runs.Add(CurrentRun); -
branches/PerformanceComparison/HeuristicLab.Analysis/3.3/Plugin.cs.frame
r12753 r12813 28 28 [Plugin("HeuristicLab.Analysis", "3.3.12.$WCREV$")] 29 29 [PluginFile("HeuristicLab.Analysis-3.3.dll", PluginFileType.Assembly)] 30 [PluginDependency("HeuristicLab.ALGLIB", "3. 7.0")]30 [PluginDependency("HeuristicLab.ALGLIB", "3.9")] 31 31 [PluginDependency("HeuristicLab.Collections", "3.3")] 32 32 [PluginDependency("HeuristicLab.Common", "3.3")] -
branches/PerformanceComparison/HeuristicLab.Optimization
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/PerformanceComparison/HeuristicLab.Optimization.Views
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Optimization.Views (added) merged: 12787
- Property svn:mergeinfo changed
-
branches/PerformanceComparison/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBoxPlotView.cs
r12077 r12813 345 345 switch (axisDimension) { 346 346 case AxisDimension.Color: { 347 value = GetCategoricalValue(-1, run.Color.ToString()); 347 const int colorDimension = -1; 348 if (!categoricalMapping.ContainsKey(colorDimension)) { 349 categoricalMapping[colorDimension] = Content.Where(r => r.Visible) 350 .Select(r => r.Color.Name) 351 .Distinct() 352 .OrderBy(c => c, new NaturalStringComparer()) 353 .Select((c, i) => new { Color = c, Index = i }) 354 .ToDictionary(a => (object)a.Color, a => (double)a.Index); 355 356 } 357 value = GetCategoricalValue(colorDimension, run.Color.Name); 348 358 break; 349 359 }
Note: See TracChangeset
for help on using the changeset viewer.