Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/29/10 20:34:10 (13 years ago)
Author:
mkommend
Message:

Worked on VRP project (ticket #922).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators/PotvinLocalSearchManipulator.cs

    r4352 r4691  
    2020#endregion
    2121
     22using System.Collections.Generic;
     23using HeuristicLab.Common;
    2224using HeuristicLab.Core;
    23 using HeuristicLab.Encodings.PermutationEncoding;
     25using HeuristicLab.Data;
    2426using HeuristicLab.Parameters;
    2527using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    26 using HeuristicLab.Data;
    27 using System.Collections.Generic;
    2828
    2929namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
     
    3737    [StorableConstructor]
    3838    private PotvinLocalSearchManipulator(bool deserializing) : base(deserializing) { }
    39 
    40     public PotvinLocalSearchManipulator() : base() {
     39    private PotvinLocalSearchManipulator(PotvinLocalSearchManipulator original, Cloner cloner)
     40      : base(original, cloner) {
     41    }
     42    public override IDeepCloneable Clone(Cloner cloner) {
     43      return new PotvinLocalSearchManipulator(this, cloner);
     44    }
     45    public PotvinLocalSearchManipulator()
     46      : base() {
    4147      Parameters.Add(new ValueParameter<IntValue>("Iterations", "The number of max iterations.", new IntValue(100)));
    4248    }
     
    7177          }
    7278          individual.Tours[currentTour].Cities.RemoveRange(currentCity, length);
    73          
     79
    7480          currentCity++;
    7581        }
     
    106112                  individual.Tours[insertionTour].Cities.InsertRange(
    107113                    insertionPlace,
    108                     toBeInserted); 
     114                    toBeInserted);
    109115                }
    110116                city++;
     
    115121          }
    116122          iterations++;
    117         } while (insertionFound && 
     123        } while (insertionFound &&
    118124          iterations < Iterations.Value.Value);
    119125
Note: See TracChangeset for help on using the changeset viewer.