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