- Timestamp:
- 06/19/12 13:17:29 (12 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba
- Files:
-
- 41 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/AlbaEncoding.cs
r7906 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; 22 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; … … 25 26 using HeuristicLab.Encodings.PermutationEncoding; 26 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 using System.Collections.Generic;28 28 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 29 29 using HeuristicLab.Problems.VehicleRouting.Interfaces; 30 using HeuristicLab.Problems.VehicleRouting.Variants;31 30 32 31 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { 33 32 [Item("AlbaEncoding", "Represents an Alba encoding of VRP solutions. It is implemented as described in Alba, E. and Dorronsoro, B. (2004). Solving the Vehicle Routing Problem by Using Cellular Genetic Algorithms.")] 34 33 [StorableClass] 35 public class AlbaEncoding : PermutationEncoding {34 public class AlbaEncoding : PermutationEncoding { 36 35 #region IVRPEncoding Members 37 36 public override List<Tour> GetTours() { … … 40 39 41 40 int cities = ProblemInstance.Cities.Value; 42 41 43 42 Tour tour = new Tour(); 44 43 for (int i = 0; i < this.array.Length; i++) { … … 77 76 vehicleAssignment = this.array[i] - ProblemInstance.Cities.Value; 78 77 } 79 78 80 79 i--; 81 80 } 82 } 83 else 81 } else 84 82 vehicleAssignment = this[lastStopIndex + 1] - this.ProblemInstance.Cities.Value; 85 83 … … 123 121 public static AlbaEncoding ConvertFrom(List<int> routeParam, IVRPProblemInstance instance) { 124 122 List<int> route = new List<int>(routeParam); 125 123 126 124 int cities = instance.Cities.Value; 127 125 … … 153 151 int delimiter = 0; 154 152 int arrayIndex = 0; 155 153 156 154 foreach (Tour tour in tours) { 157 155 foreach (int city in tour.Stops) { … … 162 160 if (arrayIndex != array.Length) { 163 161 array[arrayIndex] = cities + encoding.GetVehicleAssignment(delimiter); 164 162 165 163 delimiter++; 166 164 arrayIndex++; -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Creators/AlbaCreator.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.Data;24 using HeuristicLab.Operators;25 using HeuristicLab.Parameters;26 24 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 25 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 27 26 using HeuristicLab.Problems.VehicleRouting.Interfaces; 28 using HeuristicLab.Problems.VehicleRouting.Encodings.General;29 using HeuristicLab.Common;30 27 31 28 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 36 33 get { return false; } 37 34 } 38 35 39 36 [StorableConstructor] 40 37 protected AlbaCreator(bool deserializing) : base(deserializing) { } -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Creators/RandomCreator.cs
r7865 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;23 22 using System.Collections.Generic; 23 using HeuristicLab.Common; 24 24 using HeuristicLab.Core; 25 using HeuristicLab.Data;26 using HeuristicLab.Encodings.PermutationEncoding;27 25 using HeuristicLab.Optimization; 28 26 using HeuristicLab.Parameters; 29 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 using HeuristicLab.Common;31 28 32 29 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Crossovers/AlbaCrossover.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.Optimization; 24 25 using HeuristicLab.Parameters; 25 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using HeuristicLab.Data; 27 using HeuristicLab.Optimization; 27 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 28 28 using HeuristicLab.Problems.VehicleRouting.Interfaces; 29 using HeuristicLab.Problems.VehicleRouting.Encodings.General;30 using HeuristicLab.Common;31 29 32 30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 37 35 get { return (LookupParameter<IRandom>)Parameters["Random"]; } 38 36 } 39 37 40 38 [StorableConstructor] 41 protected AlbaCrossover(bool deserializing) : base(deserializing) { 39 protected AlbaCrossover(bool deserializing) 40 : base(deserializing) { 42 41 } 43 42 … … 66 65 ParentsParameter.ActualValue = parents; 67 66 68 ChildParameter.ActualValue = 67 ChildParameter.ActualValue = 69 68 Crossover(RandomParameter.ActualValue, parents[0] as AlbaEncoding, parents[1] as AlbaEncoding); 70 69 (ChildParameter.ActualValue as AlbaEncoding).Repair(); -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Crossovers/AlbaPermutationCrossover.cs
r6714 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.Alba { 30 29 [Item("AlbaPermutationCrossover", "An operator which crosses two VRP representations using a standard permutation operator. It is implemented as described in Alba, E. and Dorronsoro, B. (2004). Solving the Vehicle Routing Problem by Using Cellular Genetic Algorithms.")] 31 30 [StorableClass] 32 public sealed class AlbaPermutationCrossover : AlbaCrossover { 31 public sealed class AlbaPermutationCrossover : AlbaCrossover { 33 32 public IValueLookupParameter<IPermutationCrossover> InnerCrossoverParameter { 34 33 get { return (IValueLookupParameter<IPermutationCrossover>)Parameters["InnerCrossover"]; } -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/IAlbaOperator.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 System;23 using System.Collections.Generic;24 using System.Linq;25 using System.Text;26 using HeuristicLab.Problems.VehicleRouting.Interfaces;27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;28 using HeuristicLab.Core;29 using HeuristicLab.Parameters;30 using HeuristicLab.Operators;31 22 using HeuristicLab.Problems.VehicleRouting.Variants; 32 23 33 24 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { 34 public interface IAlbaOperator :35 ISingleDepotOperator, IHeterogenousCapacitatedOperator, IMultiDepotOperator, ITimeWindowedOperator { 25 public interface IAlbaOperator : 26 ISingleDepotOperator, IHeterogenousCapacitatedOperator, IMultiDepotOperator, ITimeWindowedOperator { 36 27 } 37 28 } -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaCustomerInsertionManipulator.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.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.Alba { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaCustomerInversionManipulator.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.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.Alba { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaCustomerSwapManipulator.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.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.Alba { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaIntraRouteInversionManipulator.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.Core;23 using HeuristicLab.Encodings.PermutationEncoding;24 using HeuristicLab.Parameters;25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;26 using HeuristicLab.Data;27 using System;28 22 using System.Collections.Generic; 29 23 using HeuristicLab.Common; 24 using HeuristicLab.Core; 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 26 31 27 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { 32 28 [Item("AlbaIntraRouteInversionManipulator", "An operator which applies the SLS operation to a VRP representation. It is implemented as described in Alba, E. and Dorronsoro, B. (2004). Solving the Vehicle Routing Problem by Using Cellular Genetic Algorithms.")] 33 29 [StorableClass] 34 public sealed class AlbaIntraRouteInversionManipulator : AlbaManipulator { 30 public sealed class AlbaIntraRouteInversionManipulator : AlbaManipulator { 35 31 [StorableConstructor] 36 32 private AlbaIntraRouteInversionManipulator(bool deserializing) : base(deserializing) { } … … 38 34 public AlbaIntraRouteInversionManipulator() 39 35 : base() { 40 36 } 41 37 42 38 public override IDeepCloneable Clone(Cloner cloner) { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaLambdaInterchangeManipulator.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.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; 28 23 using System.Collections.Generic; 29 24 using HeuristicLab.Common; 25 using HeuristicLab.Core; 26 using HeuristicLab.Data; 27 using HeuristicLab.Parameters; 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 29 31 30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 36 35 get { return (IValueParameter<IntValue>)Parameters["Lambda"]; } 37 36 } 38 37 39 38 [StorableConstructor] 40 39 private AlbaLambdaInterchangeManipulator(bool deserializing) : base(deserializing) { } … … 42 41 public AlbaLambdaInterchangeManipulator() 43 42 : base() { 44 45 43 Parameters.Add(new ValueParameter<IntValue>("Lambda", "The lambda value.", new IntValue(1))); 44 } 46 45 47 46 public override IDeepCloneable Clone(Cloner cloner) { … … 53 52 } 54 53 55 public static void Apply(AlbaEncoding individual, int tour1Index, int position1, int length1, 54 public static void Apply(AlbaEncoding individual, int tour1Index, int position1, int length1, 56 55 int tour2Index, int position2, int length2) { 57 56 List<Tour> tours = individual.GetTours(); -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaManipulator.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.Optimization; 24 25 using HeuristicLab.Parameters; 25 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using HeuristicLab.Data; 27 using HeuristicLab.Optimization; 27 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 28 28 using HeuristicLab.Problems.VehicleRouting.Interfaces; 29 using HeuristicLab.Problems.VehicleRouting.Encodings.General;30 using HeuristicLab.Common;31 29 32 30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 43 41 public AlbaManipulator() 44 42 : base() { 45 43 Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators.")); 46 44 } 47 45 -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaPermutationManipulator.cs
r5867 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.Alba { … … 40 39 public AlbaPermutationManipualtor() 41 40 : base() { 42 41 Parameters.Add(new ValueLookupParameter<IPermutationManipulator>("InnerManipulator", "The permutation manipulator.", new TranslocationManipulator())); 43 42 } 44 43 -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/AlbaMoveEvaluator.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 System; 23 using System.Collections.Generic; 24 using System.Linq; 25 using System.Text; 26 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 22 using HeuristicLab.Common; 27 23 using HeuristicLab.Core; 28 24 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 using HeuristicLab. Common;25 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 30 26 31 27 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { 32 28 [Item("AlbaMoveEvaluator", "Evaluates an Alba VRP move.")] 33 29 [StorableClass] 34 public abstract class AlbaMoveEvaluator : VRPMoveEvaluator, IAlbaOperator {35 30 public abstract class AlbaMoveEvaluator : VRPMoveEvaluator, IAlbaOperator { 31 [StorableConstructor] 36 32 protected AlbaMoveEvaluator(bool deserializing) : base(deserializing) { } 37 33 38 34 public AlbaMoveEvaluator() 39 35 : base() { 40 36 } 41 37 42 43 44 38 protected AlbaMoveEvaluator(AlbaMoveEvaluator original, Cloner cloner) 39 : base(original, cloner) { 40 } 45 41 } 46 42 } -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/AlbaMoveGenerator.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 System; 23 using System.Collections.Generic; 24 using System.Linq; 25 using System.Text; 26 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 22 using HeuristicLab.Common; 27 23 using HeuristicLab.Core; 28 24 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 25 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 29 26 using HeuristicLab.Problems.VehicleRouting.Interfaces; 30 using HeuristicLab.Common;31 27 32 28 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { 33 29 [Item("AlbaMoveGenerator", "Generates Alba VRP moves.")] 34 30 [StorableClass] 35 public abstract class AlbaMoveGenerator : VRPMoveGenerator, IAlbaOperator { 31 public abstract class AlbaMoveGenerator : VRPMoveGenerator, IAlbaOperator { 36 32 [StorableConstructor] 37 33 protected AlbaMoveGenerator(bool deserializing) : base(deserializing) { } … … 50 46 VRPToursParameter.ActualValue = AlbaEncoding.ConvertFrom(solution, ProblemInstance); 51 47 } 52 48 53 49 return base.Apply(); 54 50 } -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/AlbaMoveMaker.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 System; 23 using System.Collections.Generic; 24 using System.Linq; 25 using System.Text; 26 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 22 using HeuristicLab.Common; 27 23 using HeuristicLab.Core; 28 24 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 using HeuristicLab.Problems.VehicleRouting.Interfaces; 30 using HeuristicLab.Common; 25 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 31 26 32 27 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { 33 28 [Item("AlbaMoveMaker", "Makes an Alba VRP move.")] 34 29 [StorableClass] 35 public abstract class AlbaMoveMaker : VRPMoveMaker, IAlbaOperator { 30 public abstract class AlbaMoveMaker : VRPMoveMaker, IAlbaOperator { 36 31 [StorableConstructor] 37 32 protected AlbaMoveMaker(bool deserializing) : base(deserializing) { } -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaExhaustiveIntraRouteInversionMoveGenerator.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 System; 22 using System.Collections.Generic; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Optimization; 25 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;27 using HeuristicLab.Parameters;28 using System.Collections.Generic;29 27 using HeuristicLab.Problems.VehicleRouting.Interfaces; 30 using HeuristicLab.Common;31 28 32 29 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 54 51 int currentTourStart = 0; 55 52 int currentTourEnd = 0; 56 while (currentTourEnd != individual.Length) {53 while (currentTourEnd != individual.Length) { 57 54 currentTourEnd = currentTourStart; 58 while (individual[currentTourEnd] < problemInstance.Cities.Value && 55 while (individual[currentTourEnd] < problemInstance.Cities.Value && 59 56 currentTourEnd < individual.Length) { 60 57 currentTourEnd++; … … 63 60 int tourLength = currentTourEnd - currentTourStart; 64 61 if (tourLength >= 4) { 65 for (int i = 0; i <= tourLength - 4; i++ 62 for (int i = 0; i <= tourLength - 4; i++) { 66 63 for (int j = i + 2; j <= tourLength - 2; j++) { 67 64 AlbaIntraRouteInversionMove move = new AlbaIntraRouteInversionMove( 68 currentTourStart + i, 69 currentTourStart + j, 65 currentTourStart + i, 66 currentTourStart + j, 70 67 individual); 71 68 -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaIntraRouteInversionEvaluator.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 24 using HeuristicLab.Parameters; 25 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 26 using HeuristicLab.Problems.VehicleRouting.Encodings.Alba; 27 using HeuristicLab.Data;28 using HeuristicLab.Common;29 27 30 28 namespace HeuristicLab.Problems.VehicleRouting { … … 45 43 public AlbaIntraRouteInversionMoveEvaluator() 46 44 : base() { 47 45 Parameters.Add(new LookupParameter<AlbaIntraRouteInversionMove>("AlbaIntraRouteInversionMove", "The move to evaluate.")); 48 46 } 49 47 … … 61 59 62 60 UpdateEvaluation(newSolution); 63 } 61 } 64 62 } 65 63 } -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaIntraRouteInversionMove.cs
r6772 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; 24 using HeuristicLab.Encodings.PermutationEncoding; 25 using HeuristicLab.Optimization; 23 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 24 using HeuristicLab.Encodings.PermutationEncoding;25 using HeuristicLab.Common;26 27 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 27 using HeuristicLab.Data;28 28 using HeuristicLab.Problems.VehicleRouting.Interfaces; 29 using HeuristicLab.Optimization;30 29 31 30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 52 51 public AlbaIntraRouteInversionMove(int index1, int index2, AlbaEncoding permutation) 53 52 : base(index1, index2, null) { 54 55 53 this.Permutation = permutation.Clone() as AlbaEncoding; 54 } 56 55 57 56 public override IDeepCloneable Clone(Cloner cloner) { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaIntraRouteInversionMoveGenerator.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 System;22 using HeuristicLab.Common; 23 23 using HeuristicLab.Core; 24 24 using HeuristicLab.Optimization; 25 using HeuristicLab.Parameters; 25 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;27 using HeuristicLab.Parameters;28 using System.Collections.Generic;29 27 using HeuristicLab.Problems.VehicleRouting.Interfaces; 30 using HeuristicLab.Common;31 28 32 29 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 51 48 public AlbaIntraRouteInversionMoveGenerator() 52 49 : base() { 53 54 50 Parameters.Add(new LookupParameter<AlbaIntraRouteInversionMove>("AlbaIntraRouteInversionMove", "The moves that should be generated in subscopes.")); 51 Parameters.Add(new ScopeParameter("CurrentScope", "The current scope where the moves should be added as subscopes.")); 55 52 } 56 53 -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaIntraRouteInversionMoveMaker.cs
r7906 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.Data;24 using HeuristicLab.Operators;25 24 using HeuristicLab.Optimization; 26 25 using HeuristicLab.Parameters; 27 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using HeuristicLab.Common;29 27 30 28 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaStochasticIntraRouteInversionMutliMoveGenerator.cs
r5867 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;22 using HeuristicLab.Common; 23 23 using HeuristicLab.Core; 24 using HeuristicLab.Data; 24 25 using HeuristicLab.Optimization; 26 using HeuristicLab.Parameters; 25 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using HeuristicLab.Problems.VehicleRouting.Encodings.Alba; 27 using HeuristicLab.Parameters; 28 using System.Collections.Generic; 29 using HeuristicLab.Data; 28 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 30 29 using HeuristicLab.Problems.VehicleRouting.Interfaces; 31 using HeuristicLab.Common;32 using HeuristicLab.Problems.VehicleRouting.Encodings.General;33 30 34 31 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 44 41 get { return (IValueLookupParameter<IntValue>)Parameters["SampleSize"]; } 45 42 } 46 43 47 44 [StorableConstructor] 48 45 private AlbaStochasticIntraRouteInversionMultiMoveGenerator(bool deserializing) : base(deserializing) { } … … 50 47 public AlbaStochasticIntraRouteInversionMultiMoveGenerator() 51 48 : base() { 52 53 49 Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator.")); 50 Parameters.Add(new ValueLookupParameter<IntValue>("SampleSize", "The number of moves to generate.")); 54 51 } 55 52 -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaStochasticIntraRouteInversionSingleMoveGenerator.cs
r5867 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; 22 using System.Collections.Generic; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Optimization; 26 using HeuristicLab.Parameters; 25 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;27 using HeuristicLab.Parameters;28 using System.Collections.Generic;29 using HeuristicLab.Problems.VehicleRouting.Encodings.General;30 28 using HeuristicLab.Problems.VehicleRouting.Interfaces; 31 using HeuristicLab.Common;32 29 33 30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 43 40 44 41 #endregion 45 42 46 43 public ILookupParameter<IRandom> RandomParameter { 47 44 get { return (ILookupParameter<IRandom>)Parameters["Random"]; } 48 45 } 49 46 50 47 [StorableConstructor] 51 48 private AlbaStochasticIntraRouteInversionSingleMoveGenerator(bool deserializing) : base(deserializing) { } … … 53 50 public AlbaStochasticIntraRouteInversionSingleMoveGenerator() 54 51 : base() { 55 52 Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator.")); 56 53 } 57 54 … … 103 100 104 101 AlbaIntraRouteInversionMove move = Apply(individual, problemInstance.Cities.Value, RandomParameter.ActualValue); 105 if (move != null)102 if (move != null) 106 103 moves.Add(move); 107 104 -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/IAlbaIntraRouteInversionMoveOperator.cs
r4370 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. … … 21 21 22 22 using HeuristicLab.Core; 23 using HeuristicLab.Encodings.PermutationEncoding;24 using HeuristicLab.Optimization;25 23 using HeuristicLab.Problems.VehicleRouting.Interfaces; 26 24 -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange/AlbaExhaustiveLambdaInterchangeMoveGenerator.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. … … 21 21 22 22 using System; 23 using System.Collections.Generic; 24 using HeuristicLab.Common; 23 25 using HeuristicLab.Core; 24 26 using HeuristicLab.Optimization; 25 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;27 using HeuristicLab.Parameters;28 using System.Collections.Generic;29 28 using HeuristicLab.Problems.VehicleRouting.Interfaces; 30 using HeuristicLab.Common;31 29 32 30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 61 59 for (int length1 = 0; length1 <= Math.Min(lambda, tour1.Stops.Count); length1++) { 62 60 for (int length2 = 0; length2 <= Math.Min(lambda, tour2.Stops.Count); length2++) { 63 if (length1 != 0 || length2 != 0) {61 if (length1 != 0 || length2 != 0) { 64 62 for (int index1 = 0; index1 < tour1.Stops.Count - length1 + 1; index1++) { 65 63 for (int index2 = 0; index2 < tour2.Stops.Count - length2 + 1; index2++) { 66 moves.Add(new AlbaLambdaInterchangeMove(tour1Index, index1, length1, 64 moves.Add(new AlbaLambdaInterchangeMove(tour1Index, index1, length1, 67 65 tour2Index, index2, length2, individual)); 68 66 } -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange/AlbaLambdaInterchangeMove.cs
r7906 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; 24 using HeuristicLab.Optimization; 23 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 24 using HeuristicLab.Encodings.PermutationEncoding;25 using HeuristicLab.Common;26 using System.Collections.Generic;27 26 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 28 using HeuristicLab.Data;29 27 using HeuristicLab.Problems.VehicleRouting.Interfaces; 30 using HeuristicLab.Optimization;31 28 32 29 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { 33 30 [Item("AlbaLambdaInterchangeMove", "Item that describes a lambda move on a VRP representation. It is implemented as described in Alba, E. and Dorronsoro, B. (2004). Solving the Vehicle Routing Problem by Using Cellular Genetic Algorithms.")] 34 31 [StorableClass] 35 public class AlbaLambdaInterchangeMove : Item, IVRPMove {32 public class AlbaLambdaInterchangeMove : Item, IVRPMove { 36 33 [Storable] 37 34 public IVRPEncoding Individual { get; protected set; } 38 35 39 36 [Storable] 40 37 public int Tour1 { get; protected set; } … … 54 51 [Storable] 55 52 public int Length2 { get; protected set; } 56 57 public AlbaLambdaInterchangeMove(): base() { 53 54 public AlbaLambdaInterchangeMove() 55 : base() { 58 56 Tour1 = -1; 59 57 Position1 = -1; … … 67 65 } 68 66 69 public AlbaLambdaInterchangeMove(int tour1, int position1, int length1, 67 public AlbaLambdaInterchangeMove(int tour1, int position1, int length1, 70 68 int tour2, int position2, int length2, AlbaEncoding permutation) { 71 72 73 69 Tour1 = tour1; 70 Position1 = position1; 71 Length1 = length1; 74 72 75 76 77 73 Tour2 = tour2; 74 Position2 = position2; 75 Length2 = length2; 78 76 79 77 this.Individual = permutation.Clone() as AlbaEncoding; 80 78 } 81 79 -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange/AlbaLambdaInterchangeMoveEvaluator.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 24 using HeuristicLab.Parameters; 25 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 26 using HeuristicLab.Problems.VehicleRouting.Encodings.Alba; 27 using HeuristicLab.Data;28 using HeuristicLab.Common;29 27 30 28 namespace HeuristicLab.Problems.VehicleRouting { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange/AlbaLambdaInterchangeMoveGenerator.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 System;22 using HeuristicLab.Common; 23 23 using HeuristicLab.Core; 24 using HeuristicLab.Data; 24 25 using HeuristicLab.Optimization; 26 using HeuristicLab.Parameters; 25 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;27 using HeuristicLab.Parameters;28 using System.Collections.Generic;29 using HeuristicLab.Data;30 28 using HeuristicLab.Problems.VehicleRouting.Interfaces; 31 using HeuristicLab.Common;32 29 33 30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 60 57 public AlbaLambdaInterchangeMoveGenerator() 61 58 : base() { 62 63 64 59 Parameters.Add(new LookupParameter<AlbaLambdaInterchangeMove>("AlbaLambdaInterchangeMove", "The moves that should be generated in subscopes.")); 60 Parameters.Add(new ScopeParameter("CurrentScope", "The current scope where the moves should be added as subscopes.")); 61 Parameters.Add(new ValueParameter<IntValue>("Lambda", "The lambda value.", new IntValue(1))); 65 62 } 66 63 -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange/AlbaLambdaInterchangeMoveMaker.cs
r7906 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.Data;24 using HeuristicLab.Operators;25 24 using HeuristicLab.Optimization; 26 25 using HeuristicLab.Parameters; 27 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using System.Collections.Generic;29 using HeuristicLab.Common;30 27 31 28 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange/AlbaStochasticLambdaInterchangeMutliMoveGenerator.cs
r6751 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;22 using HeuristicLab.Common; 23 23 using HeuristicLab.Core; 24 using HeuristicLab.Data; 24 25 using HeuristicLab.Optimization; 26 using HeuristicLab.Parameters; 25 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using HeuristicLab.Problems.VehicleRouting.Encodings.Alba; 27 using HeuristicLab.Parameters; 28 using System.Collections.Generic; 29 using HeuristicLab.Data; 28 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 30 29 using HeuristicLab.Problems.VehicleRouting.Interfaces; 31 using HeuristicLab.Common;32 using HeuristicLab.Problems.VehicleRouting.Encodings.General;33 30 34 31 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 44 41 get { return (IValueLookupParameter<IntValue>)Parameters["SampleSize"]; } 45 42 } 46 43 47 44 [StorableConstructor] 48 45 private AlbaStochasticLambdaInterchangeMultiMoveGenerator(bool deserializing) : base(deserializing) { } … … 50 47 public AlbaStochasticLambdaInterchangeMultiMoveGenerator() 51 48 : base() { 52 53 49 Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator.")); 50 Parameters.Add(new ValueLookupParameter<IntValue>("SampleSize", "The number of moves to generate.")); 54 51 } 55 52 -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange/AlbaStochasticLambdaInterchangeSingleMoveGenerator.cs
r5867 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. … … 21 21 22 22 using System; 23 using System.Collections.Generic; 24 using HeuristicLab.Common; 23 25 using HeuristicLab.Core; 24 26 using HeuristicLab.Optimization; 27 using HeuristicLab.Parameters; 25 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;27 using HeuristicLab.Parameters;28 using System.Collections.Generic;29 using HeuristicLab.Problems.VehicleRouting.Encodings.General;30 29 using HeuristicLab.Problems.VehicleRouting.Interfaces; 31 using HeuristicLab.Common;32 30 33 31 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 43 41 44 42 #endregion 45 43 46 44 public ILookupParameter<IRandom> RandomParameter { 47 45 get { return (ILookupParameter<IRandom>)Parameters["Random"]; } 48 46 } 49 47 50 48 [StorableConstructor] 51 49 private AlbaStochasticLambdaInterchangeSingleMoveGenerator(bool deserializing) : base(deserializing) { } … … 53 51 public AlbaStochasticLambdaInterchangeSingleMoveGenerator() 54 52 : base() { 55 53 Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator.")); 56 54 } 57 55 … … 96 94 97 95 AlbaLambdaInterchangeMove move = Apply(individual, problemInstance.Cities.Value, lambda, RandomParameter.ActualValue); 98 if (move != null)96 if (move != null) 99 97 moves.Add(move); 100 98 -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange/IAlbaLambdaInterchangeMoveOperator.cs
r4370 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. … … 21 21 22 22 using HeuristicLab.Core; 23 using HeuristicLab.Encodings.PermutationEncoding;24 using HeuristicLab.Optimization;25 23 using HeuristicLab.Problems.VehicleRouting.Interfaces; 26 24 -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaStochasticTranslocationSingleMoveGenerator.cs
r5867 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;22 using HeuristicLab.Common; 23 23 using HeuristicLab.Core; 24 24 using HeuristicLab.Data; 25 25 using HeuristicLab.Encodings.PermutationEncoding; 26 using HeuristicLab.Optimization;27 using HeuristicLab.Parameters;28 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 27 using HeuristicLab.Problems.VehicleRouting.Interfaces; 30 using HeuristicLab.Problems.VehicleRouting.Encodings.General;31 using HeuristicLab.Common;32 28 33 29 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 37 33 [Storable] 38 34 private TranslocationMoveGenerator generator = new StochasticTranslocationSingleMoveGenerator(); 39 35 40 36 public ILookupParameter<TranslocationMove> TranslocationMoveParameter { 41 37 get { 42 38 return generator.TranslocationMoveParameter; 43 39 } 44 40 } -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMove.cs
r6772 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; 24 using HeuristicLab.Encodings.PermutationEncoding; 25 using HeuristicLab.Optimization; 23 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 24 using HeuristicLab.Encodings.PermutationEncoding;25 using HeuristicLab.Common;26 using System.Collections.Generic;27 27 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 28 using HeuristicLab.Data;29 28 using HeuristicLab.Problems.VehicleRouting.Interfaces; 30 using HeuristicLab.Optimization;31 29 32 30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { 33 31 [Item("AlbaTranslocationMove", "Item that describes a translocation move on a VRP representation. It is implemented as described in Alba, E. and Dorronsoro, B. (2004). Solving the Vehicle Routing Problem by Using Cellular Genetic Algorithms.")] 34 32 [StorableClass] 35 public class AlbaTranslocationMove : TranslocationMove, IVRPMove {33 public class AlbaTranslocationMove : TranslocationMove, IVRPMove { 36 34 public IVRPEncoding Individual { get { return Permutation as AlbaEncoding; } } 37 35 38 public AlbaTranslocationMove(int index1, int index2, int index3) :36 public AlbaTranslocationMove(int index1, int index2, int index3) : 39 37 base(index1, index2, index3) { 40 38 } 41 39 42 public AlbaTranslocationMove(int index1, int index2, int index3, AlbaEncoding individual) :43 base(index1, index2, index3, individual.Clone() as AlbaEncoding) {40 public AlbaTranslocationMove(int index1, int index2, int index3, AlbaEncoding individual) : 41 base(index1, index2, index3, individual.Clone() as AlbaEncoding) { 44 42 } 45 43 … … 53 51 protected AlbaTranslocationMove(AlbaTranslocationMove original, Cloner cloner) 54 52 : base(original, cloner) { 55 56 57 53 this.Index1 = original.Index1; 54 this.Index2 = original.Index2; 55 this.Index3 = original.Index3; 58 56 59 57 this.Permutation = cloner.Clone(Permutation) as AlbaEncoding; 60 58 } 61 59 -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveEvaluator.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 24 using HeuristicLab.Encodings.PermutationEncoding; … … 25 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 27 using HeuristicLab.Problems.VehicleRouting.Encodings.Alba; 27 using HeuristicLab.Common;28 28 29 29 namespace HeuristicLab.Problems.VehicleRouting { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveGenerator.cs
r5867 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;22 using HeuristicLab.Common; 23 23 using HeuristicLab.Core; 24 24 using HeuristicLab.Data; … … 28 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 29 using HeuristicLab.Problems.VehicleRouting.Interfaces; 30 using HeuristicLab.Common;31 30 32 31 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveHardTabuCriterion.cs
r5867 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.Data; … … 27 28 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 28 29 using HeuristicLab.Problems.VehicleRouting.Interfaces; 29 using HeuristicLab.Common;30 30 31 31 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveMaker.cs
r5867 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.Data;24 24 using HeuristicLab.Encodings.PermutationEncoding; 25 using HeuristicLab.Optimization;26 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 using HeuristicLab.Problems.VehicleRouting.Interfaces;28 using HeuristicLab.Common;29 26 30 27 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 61 58 private AlbaTranslocationMoveMaker(AlbaTranslocationMoveMaker original, Cloner cloner) 62 59 : base(original, cloner) { 63 60 moveMaker = cloner.Clone(original.moveMaker); 64 61 } 65 62 -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveSoftTabuCriterion.cs
r5867 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.Data; … … 27 28 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 28 29 using HeuristicLab.Problems.VehicleRouting.Interfaces; 29 using HeuristicLab.Common;30 30 31 31 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 78 78 private AlbaTranslocationMoveSoftTabuCriterion(AlbaTranslocationMoveSoftTabuCriterion original, Cloner cloner) 79 79 : base(original, cloner) { 80 80 tabuChecker = cloner.Clone(original.tabuChecker); 81 81 } 82 82 -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveTabuMaker.cs
r5867 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.Data; … … 27 28 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 28 29 using HeuristicLab.Problems.VehicleRouting.Interfaces; 29 using HeuristicLab.Common;30 30 31 31 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 78 78 private AlbaTranslocationMoveTabuMaker(AlbaTranslocationMoveTabuMaker original, Cloner cloner) 79 79 : base(original, cloner) { 80 80 moveTabuMaker = cloner.Clone(original.moveTabuMaker); 81 81 } 82 82 -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/IAlbaTranslocationMoveOperator.cs
r4369 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. … … 22 22 using HeuristicLab.Core; 23 23 using HeuristicLab.Encodings.PermutationEncoding; 24 using HeuristicLab.Optimization;25 24 using HeuristicLab.Problems.VehicleRouting.Interfaces; 26 25
Note: See TracChangeset
for help on using the changeset viewer.