Changeset 15703


Ignore:
Timestamp:
01/31/18 22:04:21 (19 months ago)
Author:
abeham
Message:

#1614: Corrected namespace of random search and fixed problem that convergence graph doesn't get updated when terminating normally

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  
    191191
    192192    protected override void OnPaused() {
    193       base.OnPaused();
    194193      elapsed += stopwatch.Elapsed;
    195194      stopwatch.Reset();
    196195      firstHitGraph.Values[firstHitGraph.Values.Count - 1] = Tuple.Create(elapsed.TotalSeconds, Context.BestQuality);
     196      base.OnPaused();
    197197    }
    198198
    199199    protected override void OnStopped() {
    200       base.OnStopped();
    201200      if (stopwatch.IsRunning) {
    202201        elapsed += stopwatch.Elapsed;
     
    204203        firstHitGraph.Values[firstHitGraph.Values.Count - 1] = Tuple.Create(elapsed.TotalSeconds, Context.BestQuality);
    205204      }
     205      // base call must be done last as the results will be cloned and a run is created
     206      base.OnStopped();
    206207    }
    207208
  • branches/1614_GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/RandomSearch/RandomSearch.cs

    r15700 r15703  
    2929using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3030
    31 namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms.LocalSearch {
     31namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms.RandomSearch {
    3232  [Item("Random Search (GQAP)", "Random search for the GQAP.")]
    3333  [Creatable(CreatableAttribute.Categories.SingleSolutionAlgorithms)]
    3434  [StorableClass]
    35   public sealed class RandomSearch : StochasticAlgorithm<LocalSearchContext, IntegerVectorEncoding> {
     35  public sealed class RandomSearch : StochasticAlgorithm<RandomSearchContext, IntegerVectorEncoding> {
    3636
    3737    public override bool SupportsPause {
Note: See TracChangeset for help on using the changeset viewer.