Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/05/16 16:06:18 (8 years ago)
Author:
abeham
Message:

#2701:

  • Worked on MemPR algorithm for permutations
  • Refactored TSP
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/MemPRAlgorithm.cs

    r14453 r14454  
    557557        || Context.Population.Any(p => IsBetter(offspring, p))) return offspring;
    558558
    559       if (HillclimbingSuited(offspring))
     559      if (IsBetter(offspring.Fitness, Context.BestQuality))
     560        HillClimb(offspring, token); // perform hillclimb in full solution space
     561      else if (HillclimbingSuited(offspring))
    560562        HillClimb(offspring, token, subspace); // perform hillclimb in the solution sub-space
    561563      return offspring;
     
    587589      if (dist1 > 0 && dist2 > 0) {
    588590        var subspace = CalculateSubspace(new[] { a.Solution, b.Solution }, inverse: true);
    589         if (HillclimbingSuited(child)) {
    590           HillClimb(child, token, subspace);
     591        if (IsBetter(child.Fitness, Context.BestQuality))
     592          HillClimb(child, token); // perform hillclimb in full solution space
     593        else if (HillclimbingSuited(child)) {
     594          HillClimb(child, token, subspace); // perform hillclimb in solution sub-space
    591595        }
    592596      }
Note: See TracChangeset for help on using the changeset viewer.