Changeset 17011 for branches/2707_HeuristicLab.VRPEnhancements
- Timestamp:
- 06/14/19 15:55:34 (5 years ago)
- Location:
- branches/2707_HeuristicLab.VRPEnhancements/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2707_HeuristicLab.VRPEnhancements/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Creators/Cluster.cs
r14559 r17011 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2707_HeuristicLab.VRPEnhancements/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Creators/ClusterCreator.cs
r14424 r17011 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 28 28 using HeuristicLab.Optimization; 29 29 using HeuristicLab.Parameters; 30 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;31 30 using HeuristicLab.Problems.VehicleRouting.Interfaces; 32 31 using HeuristicLab.Problems.VehicleRouting.ProblemInstances; 33 32 using HeuristicLab.Problems.VehicleRouting.Variants; 34 33 using HeuristicLab.Random; 34 using HEAL.Attic; 35 35 36 36 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { 37 37 [Item("ClusterCreator", "Creates a VRP solution by clustering customers first with a KMeans-algorithm and building tours afterwards alternatevly in a random or a greedy fashion.")] 38 [Storable Class]38 [StorableType("B57A7C93-FE0B-4D3E-BC2D-DD2B8F4323CB")] 39 39 public abstract class ClusterCreator : PotvinCreator, IStochasticOperator { 40 40 … … 59 59 60 60 [StorableConstructor] 61 public ClusterCreator( bool deserializing) : base(deserializing) { }61 public ClusterCreator(StorableConstructorFlag _) : base(_) { } 62 62 63 63 public ClusterCreator() : base() { … … 65 65 Parameters.Add(new ValueParameter<IntValue>("MinK", "Minimum number of clusters which should be created", new IntValue(1))); 66 66 Parameters.Add(new OptionalValueParameter<IntValue>("MaxK", "Maximum number of clusters which should be created")); 67 Parameters.Add(new ValueParameter<DoubleValue>("ClusterChangeThreshold", "A certain ratio below which a cluster should be considered as computed satisfactory", new DoubleValue(0.0))); 68 Parameters.Add(new ValueParameter<DoubleArray>("TourCreationProbabilities", "This weightage array denotes the probability which tour creation method is employed: [shuffled; greedy]", new DoubleArray(new double[] { 1, 1})));67 Parameters.Add(new ValueParameter<DoubleValue>("ClusterChangeThreshold", "A certain ratio below which a cluster should be considered as computed satisfactory", new DoubleValue(0.0))); 68 Parameters.Add(new ValueParameter<DoubleArray>("TourCreationProbabilities", "This weightage array denotes the probability which tour creation method is employed: [shuffled; greedy]", new DoubleArray(new double[] { 1, 1 }))); 69 69 } 70 70 -
branches/2707_HeuristicLab.VRPEnhancements/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Creators/GeographicDistanceClusterCreator.cs
r14645 r17011 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 25 25 using HeuristicLab.Common; 26 26 using HeuristicLab.Core; 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;28 27 using HeuristicLab.Problems.VehicleRouting.Interfaces; 29 28 using HeuristicLab.Problems.VehicleRouting.Variants; 30 29 using HeuristicLab.Random; 30 using HEAL.Attic; 31 31 32 32 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { 33 33 [Item("GeographicDistanceClusterCreator", "Creates a VRP solution by clustering customers first with a KMeans-algorithm based on their geographic position and building tours afterwards alternatevly in a random or a greedy fashion.")] 34 [Storable Class]34 [StorableType("C2E0290D-D97A-4DD7-83EC-03A309836CBC")] 35 35 public sealed class GeographicDistanceClusterCreator : ClusterCreator { 36 36 37 37 [StorableConstructor] 38 private GeographicDistanceClusterCreator( bool deserializing) : base(deserializing) { }38 private GeographicDistanceClusterCreator(StorableConstructorFlag _) : base(_) { } 39 39 40 40 public GeographicDistanceClusterCreator() : base() { -
branches/2707_HeuristicLab.VRPEnhancements/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Creators/TemporalDistanceClusterCreator.cs
r14645 r17011 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 25 25 using HeuristicLab.Common; 26 26 using HeuristicLab.Core; 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;28 27 using HeuristicLab.Problems.VehicleRouting.Variants; 29 28 using HeuristicLab.Random; 29 using HEAL.Attic; 30 30 31 31 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { 32 32 [Item("TemporalDistanceClusterCreator", "Creates a VRP solution by clustering customers first with a KMeans-algorithm based on their geographic position and building tours afterwards alternatevly in a random or a greedy fashion.")] 33 [Storable Class]33 [StorableType("8D2C7AEA-023B-4B6B-82D2-43FA8B0CA7FF")] 34 34 public sealed class TemporalDistanceClusterCreator : ClusterCreator { 35 35 36 36 [StorableConstructor] 37 private TemporalDistanceClusterCreator( bool deserializing) : base(deserializing) { }37 private TemporalDistanceClusterCreator(StorableConstructorFlag _) : base(_) { } 38 38 39 39 public TemporalDistanceClusterCreator() : base() { … … 98 98 private static double CalculateDistanceHelper(Tuple<double, double> time1, Tuple<double, double> time2) { 99 99 double distance = 0.0; 100 distance += 101 distance += 100 distance += Math.Pow(time1.Item1 - time2.Item1, 2); 101 distance += Math.Pow(time1.Item2 - time2.Item2, 2); 102 102 return Math.Sqrt(distance); 103 103 } -
branches/2707_HeuristicLab.VRPEnhancements/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Crossovers/PotvinEdgePreservingSequenceBasedCrossover.cs
r14417 r17011 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 23 23 using HeuristicLab.Common; 24 24 using HeuristicLab.Core; 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;26 25 using HeuristicLab.Problems.VehicleRouting.Interfaces; 26 using HEAL.Attic; 27 27 28 28 29 29 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { 30 30 [Item("PotvinEdgePreservingSequenceBasedCrossover", "An enhanced variant of the SBX crossover 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. In this SBX variant the second tour segment continues after the last stop of the first segment")] 31 [StorableType("04EAB1A0-F424-4B79-8489-096C6FDCE354")] 31 32 public sealed class PotvinEdgePreservingSequenceBasedCrossover : PotvinCrossover { 32 private PotvinEdgePreservingSequenceBasedCrossover( bool deserializing) : base(deserializing) { }33 private PotvinEdgePreservingSequenceBasedCrossover(StorableConstructorFlag _) : base(_) { } 33 34 34 35 public PotvinEdgePreservingSequenceBasedCrossover() : base() { } -
branches/2707_HeuristicLab.VRPEnhancements/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Manipulators/PotvinGreedyTourCreationManipulator.cs
r14417 r17011 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 25 25 using HeuristicLab.Data; 26 26 using HeuristicLab.Parameters; 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;28 27 using HeuristicLab.Problems.VehicleRouting.Interfaces; 29 28 using HeuristicLab.Problems.VehicleRouting.ProblemInstances; 29 using HEAL.Attic; 30 30 31 31 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { 32 32 [Item("PotvinGreedyTourCreationManipulator", "This Manipulator reorders the stops within all tours of a solution candidate by following the greedy heuristic: gradually adding those stops to a tour with the least effect on the overall costs.")] 33 [Storable Class]33 [StorableType("9CAFF9B9-FFEE-4838-92CA-46C0F0FE780F")] 34 34 public sealed class PotvinGreedyTourCreationManipulator : PotvinManipulator { 35 35 public IValueParameter<BoolValue> IncludeCosts { 36 get { return (IValueParameter<BoolValue>) 36 get { return (IValueParameter<BoolValue>)Parameters["IncludeCosts"]; } 37 37 } 38 38 39 39 [StorableConstructor] 40 private PotvinGreedyTourCreationManipulator( bool deserializing) : base(deserializing) { }40 private PotvinGreedyTourCreationManipulator(StorableConstructorFlag _) : base(_) { } 41 41 42 42 public PotvinGreedyTourCreationManipulator() : base() {
Note: See TracChangeset
for help on using the changeset viewer.