Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/31/18 18:14:33 (6 years ago)
Author:
abeham
Message:

#1614:

  • Changed performance measure to stopwatch instead of datetime for precision reasons
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1614_GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/LocalSolverNet/GQAPBinarySolver.cs

    r15698 r15700  
    2121
    2222using System;
    23 using System.Linq;
    2423using System.Threading;
    25 using HeuristicLab.Analysis;
    2624using HeuristicLab.Common;
    2725using HeuristicLab.Core;
     
    6361    }
    6462    public GQAPBinarySolver() {
     63      Problem = new GQAP();
     64      MaximumEvaluationsParameter.Hidden = true;
     65      MaximumIterationsParameter.Hidden = true;
    6566    }
    6667
     
    117118
    118119      Context.RunOperator(Analyzer, CancellationToken.None);
     120
     121      if (StoppingCriterion()) localSolver.Stop();
    119122    }
    120123
     
    126129
    127130    protected override void Run(CancellationToken cancellationToken) {
    128       var qpc = ((MultiAnalyzer)Analyzer).Operators.OfType<QualityPerClockAnalyzer>().FirstOrDefault();
    129       if (qpc != null) {
    130         qpc.LastUpdateTimeParameter.ActualName = Context.LastUpdateTimeParameter.Name;
    131       }
     131      base.Run(cancellationToken);
    132132      token = cancellationToken;
    133133      lastUpdate = DateTime.UtcNow.AddSeconds(-1);
     
    211211        localSolver.AddCallback(LSCallbackType.IterationTicked, LocalSolverOnIterationTicked);
    212212
    213         Context.LastUpdateTimeParameter.Value = new DateTimeValue(DateTime.UtcNow);
    214 
    215213        localSolver.Solve();
    216214
Note: See TracChangeset for help on using the changeset viewer.