Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/06/16 15:07:45 (7 years ago)
Author:
abeham
Message:

#2701:

  • Using evaluated solutions from HC as max evaluations for tabu walking in MemPR
  • Fixed some bugs in MemPR (permutation) regarding subspace calculation (true means okay, false means no)
  • Fixed bug in TSP
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Permutation/LocalSearch/StaticAPI/Exhaustive.cs

    r14450 r14456  
    3535    public static Tuple<int, int> HillClimb(IRandom random, Encodings.PermutationEncoding.Permutation perm,
    3636      ref double quality, bool maximization, Func<Encodings.PermutationEncoding.Permutation, double> eval,
    37       CancellationToken token, bool[,] noTouch = null) {
     37      CancellationToken token, bool[,] subspace = null) {
    3838      if (double.IsNaN(quality)) quality = eval(perm);
    3939      Tuple<int, int> changes;
    4040      switch (perm.PermutationType) {
    4141        case PermutationTypes.Absolute:
    42           changes = ExhaustiveSwap2.HillClimb(random, perm, ref quality, maximization, eval, token, noTouch);
     42          changes = ExhaustiveSwap2.HillClimb(random, perm, ref quality, maximization, eval, token, subspace);
    4343          break;
    4444        case PermutationTypes.RelativeDirected:
    45           changes = Exhaustive1Shift.HillClimb(random, perm, ref quality, maximization, eval, token, noTouch);
     45          changes = Exhaustive1Shift.HillClimb(random, perm, ref quality, maximization, eval, token, subspace);
    4646          break;
    4747        case PermutationTypes.RelativeUndirected:
    48           changes = Exhaustive2Opt.HillClimb(random, perm, ref quality, maximization, eval, token, noTouch);
     48          changes = Exhaustive2Opt.HillClimb(random, perm, ref quality, maximization, eval, token, subspace);
    4949          break;
    5050        default: throw new ArgumentException(string.Format("Permutation type {0} is not known", perm.PermutationType));
Note: See TracChangeset for help on using the changeset viewer.