Free cookie consent management tool by TermsFeed Policy Generator

Changeset 17011


Ignore:
Timestamp:
06/14/19 15:55:34 (5 years ago)
Author:
pfleck
Message:

#2707 Adapted to HEAL.Attic changes

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  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/2707_HeuristicLab.VRPEnhancements/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Creators/ClusterCreator.cs

    r14424 r17011  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2828using HeuristicLab.Optimization;
    2929using HeuristicLab.Parameters;
    30 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3130using HeuristicLab.Problems.VehicleRouting.Interfaces;
    3231using HeuristicLab.Problems.VehicleRouting.ProblemInstances;
    3332using HeuristicLab.Problems.VehicleRouting.Variants;
    3433using HeuristicLab.Random;
     34using HEAL.Attic;
    3535
    3636namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
    3737  [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   [StorableClass]
     38  [StorableType("B57A7C93-FE0B-4D3E-BC2D-DD2B8F4323CB")]
    3939  public abstract class ClusterCreator : PotvinCreator, IStochasticOperator {
    4040
     
    5959
    6060    [StorableConstructor]
    61     public ClusterCreator(bool deserializing) : base(deserializing) { }
     61    public ClusterCreator(StorableConstructorFlag _) : base(_) { }
    6262
    6363    public ClusterCreator() : base() {
     
    6565      Parameters.Add(new ValueParameter<IntValue>("MinK", "Minimum number of clusters which should be created", new IntValue(1)));
    6666      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 })));
    6969    }
    7070
  • branches/2707_HeuristicLab.VRPEnhancements/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Creators/GeographicDistanceClusterCreator.cs

    r14645 r17011  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2525using HeuristicLab.Common;
    2626using HeuristicLab.Core;
    27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2827using HeuristicLab.Problems.VehicleRouting.Interfaces;
    2928using HeuristicLab.Problems.VehicleRouting.Variants;
    3029using HeuristicLab.Random;
     30using HEAL.Attic;
    3131
    3232namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
    3333  [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   [StorableClass]
     34  [StorableType("C2E0290D-D97A-4DD7-83EC-03A309836CBC")]
    3535  public sealed class GeographicDistanceClusterCreator : ClusterCreator {
    3636
    3737    [StorableConstructor]
    38     private GeographicDistanceClusterCreator(bool deserializing) : base(deserializing) { }
     38    private GeographicDistanceClusterCreator(StorableConstructorFlag _) : base(_) { }
    3939
    4040    public GeographicDistanceClusterCreator() : base() {
  • branches/2707_HeuristicLab.VRPEnhancements/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Creators/TemporalDistanceClusterCreator.cs

    r14645 r17011  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2525using HeuristicLab.Common;
    2626using HeuristicLab.Core;
    27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2827using HeuristicLab.Problems.VehicleRouting.Variants;
    2928using HeuristicLab.Random;
     29using HEAL.Attic;
    3030
    3131namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
    3232  [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   [StorableClass]
     33  [StorableType("8D2C7AEA-023B-4B6B-82D2-43FA8B0CA7FF")]
    3434  public sealed class TemporalDistanceClusterCreator : ClusterCreator {
    3535
    3636    [StorableConstructor]
    37     private TemporalDistanceClusterCreator(bool deserializing) : base(deserializing) { }
     37    private TemporalDistanceClusterCreator(StorableConstructorFlag _) : base(_) { }
    3838
    3939    public TemporalDistanceClusterCreator() : base() {
     
    9898    private static double CalculateDistanceHelper(Tuple<double, double> time1, Tuple<double, double> time2) {
    9999      double distance = 0.0;
    100       distance +=   Math.Pow(time1.Item1 - time2.Item1, 2);
    101       distance +=   Math.Pow(time1.Item2 - time2.Item2, 2);
     100      distance += Math.Pow(time1.Item1 - time2.Item1, 2);
     101      distance += Math.Pow(time1.Item2 - time2.Item2, 2);
    102102      return Math.Sqrt(distance);
    103103    }
  • branches/2707_HeuristicLab.VRPEnhancements/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Crossovers/PotvinEdgePreservingSequenceBasedCrossover.cs

    r14417 r17011  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2323using HeuristicLab.Common;
    2424using HeuristicLab.Core;
    25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2625using HeuristicLab.Problems.VehicleRouting.Interfaces;
     26using HEAL.Attic;
    2727
    2828
    2929namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
    3030  [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")]
    3132  public sealed class PotvinEdgePreservingSequenceBasedCrossover : PotvinCrossover {
    32     private PotvinEdgePreservingSequenceBasedCrossover(bool deserializing) : base(deserializing) { }
     33    private PotvinEdgePreservingSequenceBasedCrossover(StorableConstructorFlag _) : base(_) { }
    3334
    3435    public PotvinEdgePreservingSequenceBasedCrossover() : base() { }
  • branches/2707_HeuristicLab.VRPEnhancements/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Manipulators/PotvinGreedyTourCreationManipulator.cs

    r14417 r17011  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2525using HeuristicLab.Data;
    2626using HeuristicLab.Parameters;
    27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2827using HeuristicLab.Problems.VehicleRouting.Interfaces;
    2928using HeuristicLab.Problems.VehicleRouting.ProblemInstances;
     29using HEAL.Attic;
    3030
    3131namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
    3232  [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   [StorableClass]
     33  [StorableType("9CAFF9B9-FFEE-4838-92CA-46C0F0FE780F")]
    3434  public sealed class PotvinGreedyTourCreationManipulator : PotvinManipulator {
    3535    public IValueParameter<BoolValue> IncludeCosts {
    36       get { return (IValueParameter<BoolValue>) Parameters["IncludeCosts"]; }
     36      get { return (IValueParameter<BoolValue>)Parameters["IncludeCosts"]; }
    3737    }
    3838
    3939    [StorableConstructor]
    40     private PotvinGreedyTourCreationManipulator(bool deserializing) : base(deserializing) { }
     40    private PotvinGreedyTourCreationManipulator(StorableConstructorFlag _) : base(_) { }
    4141
    4242    public PotvinGreedyTourCreationManipulator() : base() {
Note: See TracChangeset for help on using the changeset viewer.