- Timestamp:
- 04/07/16 15:26:47 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem.Common/3.3/KnowledgeCenter.cs
r13722 r13748 107 107 108 108 public KnowledgeCenter() { 109 maximumEvaluations = new IntValue( 0);109 maximumEvaluations = new IntValue(10000); 110 110 instanceRuns = new RunCollection(); 111 seededRuns = new RunCollection(); 111 112 knowledgeBase = new RunCollection(); 112 113 suggestedInstances = new ItemList<IAlgorithm>(); … … 122 123 123 124 private void ProblemOnProblemChanged(object sender, EventArgs eventArgs) { 124 125 // TODO: Potentially, knowledge base has to be re-downloaded 125 126 } 126 127 … … 337 338 EventHandler exeStateChanged = (sender, e) => { 338 339 if (algorithmClone.ExecutionState == ExecutionState.Stopped) { 339 foreach (var solution in algorithmClone.Results.Where(x => x.Name.ToLower().Contains("solution")).Select(x => x.Value).OfType<IScope>()) { 340 Problem.Solutions.Add(new SingleObjectiveOKBSolution(Problem.ProblemId) { 341 Quality = solution.Variables.ContainsKey(Problem.Problem.Evaluator.QualityParameter.ActualName) ? ((DoubleValue)solution.Variables[Problem.Problem.Evaluator.QualityParameter.ActualName].Value).Value : double.NaN, 342 Solution = (IItem)solution.Clone() 343 }); 340 lock (Problem.Solutions) { 341 foreach (var solution in algorithmClone.Results.Where(x => x.Name.ToLower().Contains("solution")).Select(x => x.Value).OfType<IScope>()) { 342 Problem.Solutions.Add(new SingleObjectiveOKBSolution(Problem.ProblemId) { 343 Quality = solution.Variables.ContainsKey(Problem.Problem.Evaluator.QualityParameter.ActualName) ? ((DoubleValue)solution.Variables[Problem.Problem.Evaluator.QualityParameter.ActualName].Value).Value : double.NaN, 344 Solution = (IItem)solution.Clone() 345 }); 346 } 344 347 } 345 348 if (seedingStrategyLocal == SeedingStrategyTypes.NoSeeding) { 346 InstanceRuns.Add(algorithmClone.Runs.Last()); 347 } else SeededRuns.Add(algorithmClone.Runs.Last()); 349 lock (InstanceRuns) { 350 InstanceRuns.Add(algorithmClone.Runs.Last()); 351 } 352 } else { 353 lock (SeededRuns) { 354 SeededRuns.Add(algorithmClone.Runs.Last()); 355 } 356 } 348 357 waitHandle.Set(); 349 358 }
Note: See TracChangeset
for help on using the changeset viewer.