Changeset 15703 for branches/1614_GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms
- Timestamp:
- 01/31/18 22:04:21 (7 years ago)
- Location:
- branches/1614_GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1614_GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Infrastructure/Algorithms/ContextAlgorithm.cs
r15700 r15703 191 191 192 192 protected override void OnPaused() { 193 base.OnPaused();194 193 elapsed += stopwatch.Elapsed; 195 194 stopwatch.Reset(); 196 195 firstHitGraph.Values[firstHitGraph.Values.Count - 1] = Tuple.Create(elapsed.TotalSeconds, Context.BestQuality); 196 base.OnPaused(); 197 197 } 198 198 199 199 protected override void OnStopped() { 200 base.OnStopped();201 200 if (stopwatch.IsRunning) { 202 201 elapsed += stopwatch.Elapsed; … … 204 203 firstHitGraph.Values[firstHitGraph.Values.Count - 1] = Tuple.Create(elapsed.TotalSeconds, Context.BestQuality); 205 204 } 205 // base call must be done last as the results will be cloned and a run is created 206 base.OnStopped(); 206 207 } 207 208 -
branches/1614_GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/RandomSearch/RandomSearch.cs
r15700 r15703 29 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 30 31 namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms. LocalSearch {31 namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms.RandomSearch { 32 32 [Item("Random Search (GQAP)", "Random search for the GQAP.")] 33 33 [Creatable(CreatableAttribute.Categories.SingleSolutionAlgorithms)] 34 34 [StorableClass] 35 public sealed class RandomSearch : StochasticAlgorithm< LocalSearchContext, IntegerVectorEncoding> {35 public sealed class RandomSearch : StochasticAlgorithm<RandomSearchContext, IntegerVectorEncoding> { 36 36 37 37 public override bool SupportsPause {
Note: See TracChangeset
for help on using the changeset viewer.