Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/02/18 16:31:42 (6 years ago)
Author:
abeham
Message:

#1614:

  • added additional constraint to benchmark data generator and updated one instance that was affected by this
  • added fitness landscape characteristics for the GQAP
  • fixed RLD analysis view to compensate for empty convergence graphs
  • fixed CPLEX solvers not using the obj value when the solver terminates (callback is not called if proven optimal solution is found)
  • added code for local solver to also check on final quality
File:
1 edited

Legend:

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

    r15700 r15713  
    8989
    9090      if (curObj >= prevObj) return;
    91       prevObj = curObj;
    92       Context.BestQuality = curObj;
    93            
     91      UpdateSolution(curObj);
     92
     93      Context.RunOperator(Analyzer, CancellationToken.None);
     94
     95      if (StoppingCriterion()) localSolver.Stop();
     96    }
     97
     98    private void UpdateSolution(double obj) {
     99      IResult result;
     100      prevObj = obj;
     101      Context.BestQuality = obj;
     102
    94103      if (Results.TryGetValue("BestQuality", out result))
    95104        ((DoubleValue)result.Value).Value = Context.BestQuality;
     
    116125        result.Value = Context.BestSolution;
    117126      else Results.Add(new Result("BestSolution", Context.BestSolution));
    118 
    119       Context.RunOperator(Analyzer, CancellationToken.None);
    120 
    121       if (StoppingCriterion()) localSolver.Stop();
    122127    }
    123128
     
    213218        localSolver.Solve();
    214219
     220        var curObj = obj.GetDoubleValue();
     221        if (curObj < prevObj)
     222          UpdateSolution(curObj);
     223
    215224        localSolver.RemoveCallback(LSCallbackType.IterationTicked, LocalSolverOnIterationTicked);
    216225      } finally {
Note: See TracChangeset for help on using the changeset viewer.