Ignore:
Timestamp:
01/31/18 18:14:33 (4 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/GQAPIntegerSolver.cs

    r15698 r15700  
    2121
    2222using System;
    23 using System.Linq;
    2423using System.Threading;
    25 using HeuristicLab.Analysis;
    2624using HeuristicLab.Common;
    2725using HeuristicLab.Core;
     
    6260    }
    6361    public GQAPIntegerSolver() {
     62      Problem = new GQAP();
     63      MaximumEvaluationsParameter.Hidden = true;
     64      MaximumIterationsParameter.Hidden = true;
    6465    }
    6566
     
    111112
    112113      Context.RunOperator(Analyzer, CancellationToken.None);
     114
     115      if (StoppingCriterion()) localSolver.Stop();
    113116    }
    114117
     
    120123
    121124    protected override void Run(CancellationToken cancellationToken) {
    122       var qpc = ((MultiAnalyzer)Analyzer).Operators.OfType<QualityPerClockAnalyzer>().FirstOrDefault();
    123       if (qpc != null) {
    124         qpc.LastUpdateTimeParameter.ActualName = Context.LastUpdateTimeParameter.Name;
    125       }
     125      base.Run(cancellationToken);
    126126      token = cancellationToken;
    127127      lastUpdate = DateTime.UtcNow.AddSeconds(-1);
     
    183183        localSolver.AddCallback(LSCallbackType.IterationTicked, LocalSolverOnIterationTicked);
    184184
    185         Context.LastUpdateTimeParameter.Value = new DateTimeValue(DateTime.UtcNow);
    186 
    187185        localSolver.Solve();
    188186      } finally {
Note: See TracChangeset for help on using the changeset viewer.