Ignore:
Timestamp:
02/02/18 16:31:42 (4 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/GQAPIntegerSolver.cs

    r15700 r15713  
    8888
    8989      if (curObj >= prevObj) return;
    90       prevObj = curObj;
    91       Context.BestQuality = curObj;
    92            
     90      UpdateSolution(curObj);
     91
     92      Context.RunOperator(Analyzer, CancellationToken.None);
     93
     94      if (StoppingCriterion()) localSolver.Stop();
     95    }
     96
     97    private void UpdateSolution(double obj) {
     98      IResult result;
     99      prevObj = obj;
     100      Context.BestQuality = obj;
     101
    93102      if (Results.TryGetValue("BestQuality", out result))
    94103        ((DoubleValue)result.Value).Value = Context.BestQuality;
     
    110119        result.Value = Context.BestSolution;
    111120      else Results.Add(new Result("BestSolution", Context.BestSolution));
    112 
    113       Context.RunOperator(Analyzer, CancellationToken.None);
    114 
    115       if (StoppingCriterion()) localSolver.Stop();
    116121    }
    117122
     
    184189
    185190        localSolver.Solve();
     191
     192        var curObj = obj.GetDoubleValue();
     193        if (curObj < prevObj)
     194          UpdateSolution(curObj);
     195
     196        localSolver.RemoveCallback(LSCallbackType.IterationTicked, LocalSolverOnIterationTicked);
    186197      } finally {
    187198        localSolver.Dispose();
Note: See TracChangeset for help on using the changeset viewer.