Changeset 8053 for trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange
- Timestamp:
- 06/19/12 13:17:29 (13 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.