Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/09/10 13:29:06 (14 years ago)
Author:
svonolfe
Message:

Refactored VRP in preparation for the code review (#1039)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Crossovers/PotvinSBXCrossover.cs

    r4174 r4177  
    2727
    2828namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
    29   [Item("PotvinSBXCrossover", "The SBX crossover for the Potvin VRP representations.")]
     29  [Item("PotvinSBXCrossover", "The SBX crossover for the Potvin VRP representations.  It is implemented as described in Potvin, J.-Y. and Bengio, S. (1996). The Vehicle Routing Problem with Time Windows - Part II: Genetic Search. INFORMS Journal of Computing, 8:165–172.")]
    3030  [StorableClass]
    3131  public sealed class PotvinSBXCrossover : PotvinCrossover {
     
    7272          child.Unrouted.Add(city);
    7373
    74       if(Repair(random, child, newTour))
     74      if (Repair(random, child, newTour))
    7575        return child;
    76       else
    77         return parent1.Clone() as PotvinEncoding;
     76      else {
     77        if(random.NextDouble() < 0.5)
     78          return parent1.Clone() as PotvinEncoding;
     79        else
     80          return parent2.Clone() as PotvinEncoding;
     81      }
    7882    }
    7983  }
Note: See TracChangeset for help on using the changeset viewer.