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/GQAPBinarySolver.cs

    r15633 r15698  
    2121
    2222using System;
     23using System.Linq;
    2324using System.Threading;
     25using HeuristicLab.Analysis;
    2426using HeuristicLab.Common;
    2527using HeuristicLab.Core;
     
    124126
    125127    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      }
    126132      token = cancellationToken;
    127133      lastUpdate = DateTime.UtcNow.AddSeconds(-1);
     
    205211        localSolver.AddCallback(LSCallbackType.IterationTicked, LocalSolverOnIterationTicked);
    206212
     213        Context.LastUpdateTimeParameter.Value = new DateTimeValue(DateTime.UtcNow);
     214
    207215        localSolver.Solve();
    208216
Note: See TracChangeset for help on using the changeset viewer.