Changeset 15973 for branches/2522_RefactorPluginInfrastructure/HeuristicLab.Tests/HeuristicLab-3.3/GeneticAlgorithmTest.cs
- Timestamp:
- 06/28/18 11:13:37 (6 years ago)
- Location:
- branches/2522_RefactorPluginInfrastructure
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2522_RefactorPluginInfrastructure
- Property svn:ignore
-
old new 24 24 protoc.exe 25 25 obj 26 .vs
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/2522_RefactorPluginInfrastructure/HeuristicLab.Tests
- Property svn:mergeinfo changed
-
branches/2522_RefactorPluginInfrastructure/HeuristicLab.Tests/HeuristicLab-3.3/GeneticAlgorithmTest.cs
r12012 r15973 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 21 21 22 22 using System; 23 using System.Threading;24 23 using HeuristicLab.Algorithms.GeneticAlgorithm; 25 24 using HeuristicLab.Common; … … 39 38 } 40 39 41 private EventWaitHandle trigger = new AutoResetEvent(false);42 40 private Exception ex; 43 41 … … 49 47 GeneticAlgorithm ga = (GeneticAlgorithm)XmlParser.Deserialize(@"Test Resources\GA_TSP.hl"); 50 48 ga.ExceptionOccurred += new EventHandler<EventArgs<Exception>>(ga_ExceptionOccurred); 51 ga.Stopped += new EventHandler(ga_Stopped);52 49 ga.SetSeedRandomly.Value = false; 53 50 ga.Seed.Value = 0; … … 55 52 ga.Prepare(); 56 53 ga.Start(); 57 trigger.WaitOne();58 54 if (ex != null) throw ex; 59 55 … … 80 76 ex = e.Value; 81 77 } 82 83 private void ga_Stopped(object sender, EventArgs e) {84 trigger.Set();85 }86 78 } 87 79 }
Note: See TracChangeset
for help on using the changeset viewer.