Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/04/17 17:19:35 (8 years ago)
Author:
gkronber
Message:

#2520: changed all usages of StorableClass to use StorableType with an auto-generated GUID (did not add StorableType to other type definitions yet)

Location:
branches/PersistenceReintegration/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Crossovers
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/PersistenceReintegration/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Crossovers/PotvinCrossover.cs

    r14185 r14927  
    2626using HeuristicLab.Optimization;
    2727using HeuristicLab.Parameters;
    28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using HeuristicLab.Persistence;
    2929using HeuristicLab.Problems.VehicleRouting.Encodings.General;
    3030using HeuristicLab.Problems.VehicleRouting.Interfaces;
     
    3232namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
    3333  [Item("PotvinCrossover", "A VRP crossover operation.")]
    34   [StorableClass]
     34  [StorableType("365b6188-8945-45ec-ba4b-9e23fd8ad1c5")]
    3535  public abstract class PotvinCrossover : VRPCrossover, IStochasticOperator, IPotvinOperator {
    3636    public ILookupParameter<IRandom> RandomParameter {
  • branches/PersistenceReintegration/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Crossovers/PotvinInsertionBasedCrossover.cs

    r14185 r14927  
    2222using HeuristicLab.Common;
    2323using HeuristicLab.Core;
    24 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     24using HeuristicLab.Persistence;
    2525using System.Collections.Generic;
    2626using HeuristicLab.Data;
     
    3232namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
    3333  [Item("PotvinInsertionBasedCrossover", "The IBX crossover for VRP representations. It is implemented as described in Berger, J and Solois, M and Begin, R (1998). A hybrid genetic algorithm for the vehicle routing problem with time windows. LNCS 1418. Springer, London 114-127.")]
    34   [StorableClass]
     34  [StorableType("c64c5246-3ee2-4860-9e92-984dac2fde25")]
    3535  public sealed class PotvinInsertionBasedCrossover : PotvinCrossover {
    3636    public IValueParameter<IntValue> Length {
     
    206206      int length = Math.Min(Length.Value.Value, parent1.Tours.Count) + 1;
    207207      int k = 1;
    208       if(length > 1)
     208      if (length > 1)
    209209        k = random.Next(1, length);
    210210      for (int i = 0; i < k; i++) {
     
    230230        //DESTROY - remove cities from r1
    231231        int removed = 1;
    232         if(r1.Stops.Count > 1)
     232        if (r1.Stops.Count > 1)
    233233          removed = random.Next(1, r1.Stops.Count + 1);
    234234        for (int i = 0; i < removed; i++) {
     
    238238        //REPAIR - add cities from R2
    239239        int maxCount = 1;
    240         if(R2.Count > 1)
     240        if (R2.Count > 1)
    241241          maxCount = random.Next(1, Math.Min(5, R2.Count));
    242242        int count = 0;
     
    248248
    249249          int place = -1;
    250           bool found = FindRouteInsertionPlace(child, childTour, city, allowInfeasible, out place); 
     250          bool found = FindRouteInsertionPlace(child, childTour, city, allowInfeasible, out place);
    251251          if (found) {
    252252            childTour.Stops.Insert(place, city);
  • branches/PersistenceReintegration/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Crossovers/PotvinRouteBasedCrossover.cs

    r14185 r14927  
    2323using HeuristicLab.Core;
    2424using HeuristicLab.Encodings.PermutationEncoding;
    25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using HeuristicLab.Persistence;
    2626using HeuristicLab.Problems.VehicleRouting.Interfaces;
    2727
    2828namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
    2929  [Item("PotvinRouteBasedCrossover", "The RBX crossover for a 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.")]
    30   [StorableClass]
     30  [StorableType("0040d697-3e0e-481f-b2af-5d5a99c0b32c")]
    3131  public sealed class PotvinRouteBasedCrossover : PotvinCrossover {
    3232    [StorableConstructor]
  • branches/PersistenceReintegration/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Crossovers/PotvinSequenceBasedCrossover.cs

    r14185 r14927  
    2222using HeuristicLab.Common;
    2323using HeuristicLab.Core;
    24 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     24using HeuristicLab.Persistence;
    2525using HeuristicLab.Problems.VehicleRouting.Interfaces;
    2626
    2727namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
    2828  [Item("PotvinSequenceBasedCrossover", "The SBX crossover for a 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.")]
    29   [StorableClass]
     29  [StorableType("9e773df8-58d7-4899-9329-22b8cd52fe26")]
    3030  public sealed class PotvinSequenceBasedCrossover : PotvinCrossover {
    3131    [StorableConstructor]
Note: See TracChangeset for help on using the changeset viewer.