Free cookie consent management tool by TermsFeed Policy Generator

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

#1614: Added random search and fixed execution time counting for commercial solvers

File:
1 edited

Legend:

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

    r15633 r15698  
    2121
    2222using System;
     23using System.Linq;
    2324using System.Threading;
     25using HeuristicLab.Analysis;
    2426using HeuristicLab.Common;
    2527using HeuristicLab.Core;
     
    118120
    119121    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      }
    120126      token = cancellationToken;
    121127      lastUpdate = DateTime.UtcNow.AddSeconds(-1);
     
    177183        localSolver.AddCallback(LSCallbackType.IterationTicked, LocalSolverOnIterationTicked);
    178184
     185        Context.LastUpdateTimeParameter.Value = new DateTimeValue(DateTime.UtcNow);
     186
    179187        localSolver.Solve();
    180188      } finally {
Note: See TracChangeset for help on using the changeset viewer.