- Timestamp:
- 06/19/12 13:17:29 (13 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Zhu/Crossovers
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Zhu/Crossovers/ZhuCrossover.cs
r4752 r8053 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 0Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 using HeuristicLab. Encodings.PermutationEncoding;24 using HeuristicLab.Optimization; 24 25 using HeuristicLab.Parameters; 25 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using HeuristicLab.Data;27 using HeuristicLab.Optimization;28 27 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 29 28 using HeuristicLab.Problems.VehicleRouting.Interfaces; 30 using HeuristicLab.Common;31 29 32 30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Zhu { … … 37 35 get { return (LookupParameter<IRandom>)Parameters["Random"]; } 38 36 } 39 37 40 38 [StorableConstructor] 41 39 protected ZhuCrossover(bool deserializing) : base(deserializing) { } -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Zhu/Crossovers/ZhuHeuristicCrossover1.cs
r6851 r8053 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 0Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 using HeuristicLab.Encodings.PermutationEncoding;24 using HeuristicLab.Parameters;25 24 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using HeuristicLab.Data;27 using HeuristicLab.Common;28 25 29 26 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Zhu { 30 27 [Item("ZhuHeuristicCrossover1", "The Zhu Heuristic Crossover (Version 1). It is implemented as described in Zhu, K.Q. (2000). A New Genetic Algorithm For VRPTW. Proceedings of the International Conference on Artificial Intelligence.")] 31 28 [StorableClass] 32 public sealed class ZhuHeuristicCrossover1 : ZhuCrossover { 29 public sealed class ZhuHeuristicCrossover1 : ZhuCrossover { 33 30 [StorableConstructor] 34 31 private ZhuHeuristicCrossover1(bool deserializing) : base(deserializing) { } -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Zhu/Crossovers/ZhuHeuristicCrossover2.cs
r6851 r8053 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 0Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using HeuristicLab.Core;23 using HeuristicLab.Encodings.PermutationEncoding;24 using HeuristicLab.Parameters;25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;26 using HeuristicLab.Data;27 22 using System.Collections.Generic; 28 23 using HeuristicLab.Common; 24 using HeuristicLab.Core; 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 26 30 27 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Zhu { 31 28 [Item("ZhuHeuristicCrossover2", "The Zhu Heuristic Crossover (Version 2). It is implemented as described in Zhu, K.Q. (2000). A New Genetic Algorithm For VRPTW. Proceedings of the International Conference on Artificial Intelligence.")] 32 29 [StorableClass] 33 public sealed class ZhuHeuristicCrossover2 : ZhuCrossover { 30 public sealed class ZhuHeuristicCrossover2 : ZhuCrossover { 34 31 [StorableConstructor] 35 32 private ZhuHeuristicCrossover2(bool deserializing) : base(deserializing) { } … … 61 58 if (predecessor < 0) 62 59 predecessor = predecessor + child.Length; 63 60 64 61 int parent1Index = i; 65 62 int parent2Index = i; … … 68 65 if (i == breakPoint) { 69 66 child[i] = p1[parent1Index]; 70 67 71 68 p1.Remove(child[i]); 72 69 if (parent1Index >= p1.Count) -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Zhu/Crossovers/ZhuMergeCrossover1.cs
r6771 r8053 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 0Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 using HeuristicLab.Encodings.PermutationEncoding; 24 using HeuristicLab.Parameters; 24 using HeuristicLab.Data; 25 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using HeuristicLab.Data;27 26 using HeuristicLab.Problems.VehicleRouting.Variants; 28 using HeuristicLab.Common;29 27 30 28 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Zhu { 31 29 [Item("ZhuMergeCrossover1", "The Zhu Merge Crossover (Version 1). It is implemented as described in Zhu, K.Q. (2000). A New Genetic Algorithm For VRPTW. Proceedings of the International Conference on Artificial Intelligence.")] 32 30 [StorableClass] 33 public sealed class ZhuMergeCrossover1 : ZhuCrossover { 31 public sealed class ZhuMergeCrossover1 : ZhuCrossover { 34 32 [StorableConstructor] 35 33 private ZhuMergeCrossover1(bool deserializing) : base(deserializing) { } … … 71 69 if (ProblemInstance is ITimeWindowedProblemInstance) { 72 70 dueTime = (ProblemInstance as ITimeWindowedProblemInstance).DueTime; 73 } 71 } 74 72 75 73 do { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Zhu/Crossovers/ZhuMergeCrossover2.cs
r6771 r8053 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 0Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using System.Collections.Generic; 23 using HeuristicLab.Common; 22 24 using HeuristicLab.Core; 23 using HeuristicLab.Encodings.PermutationEncoding; 24 using HeuristicLab.Parameters; 25 using HeuristicLab.Data; 25 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using HeuristicLab.Data;27 using System.Collections.Generic;28 27 using HeuristicLab.Problems.VehicleRouting.Variants; 29 using HeuristicLab.Common;30 28 31 29 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Zhu { 32 30 [Item("ZhuMergeCrossover2", "The Zhu Merge Crossover (Version 2). It is implemented as described in Zhu, K.Q. (2000). A New Genetic Algorithm For VRPTW. Proceedings of the International Conference on Artificial Intelligence.")] 33 31 [StorableClass] 34 public sealed class ZhuMergeCrossover2 : ZhuCrossover { 32 public sealed class ZhuMergeCrossover2 : ZhuCrossover { 35 33 [StorableConstructor] 36 34 private ZhuMergeCrossover2(bool deserializing) : base(deserializing) { } … … 72 70 child[i] = p1[parent1Index]; 73 71 } else { 74 if (dueTime != null && 72 if (dueTime != null && 75 73 (dueTime[p1[parent1Index] + 1] < 76 74 dueTime[p2[parent2Index] + 1])) { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Zhu/Crossovers/ZhuPermutationCrossover.cs
r6771 r8053 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 0Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using HeuristicLab.Common; 22 23 using HeuristicLab.Core; 23 24 using HeuristicLab.Encodings.PermutationEncoding; 24 25 using HeuristicLab.Parameters; 25 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using HeuristicLab.Data;27 using HeuristicLab.Common;28 27 29 28 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Zhu { 30 29 [Item("ZhuPermutationCrossover", "An operator which crosses two VRP representations using a standard permutation operator. It is implemented as described in Zhu, K.Q. (2000). A New Genetic Algorithm For VRPTW. Proceedings of the International Conference on Artificial Intelligence.")] 31 30 [StorableClass] 32 public sealed class PrinsPermutationCrossover : ZhuCrossover { 31 public sealed class PrinsPermutationCrossover : ZhuCrossover { 33 32 public IValueLookupParameter<IPermutationCrossover> InnerCrossoverParameter { 34 33 get { return (IValueLookupParameter<IPermutationCrossover>)Parameters["InnerCrossover"]; }
Note: See TracChangeset
for help on using the changeset viewer.