Changeset 4722 for trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/IntraRouteInversion/AlbaStochasticIntraRouteInversionSingleMoveGenerator.cs
- Timestamp:
- 11/06/10 01:56:04 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources
- Property svn:mergeinfo changed
/branches/CloningRefactoring (added) merged: 4656-4693,4696-4697,4711-4714,4718-4719
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Problems.VehicleRouting
- Property svn:mergeinfo changed
/branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting (added) merged: 4686-4687,4689-4693,4696-4697
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/IntraRouteInversion/AlbaStochasticIntraRouteInversionSingleMoveGenerator.cs
r4352 r4722 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 28 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 30 29 … … 41 40 42 41 #endregion 43 42 44 43 public ILookupParameter<IRandom> RandomParameter { 45 44 get { return (ILookupParameter<IRandom>)Parameters["Random"]; } 46 45 } 47 46 48 47 [StorableConstructor] 49 48 private AlbaStochasticIntraRouteInversionSingleMoveGenerator(bool deserializing) : base(deserializing) { } 50 49 private AlbaStochasticIntraRouteInversionSingleMoveGenerator(AlbaStochasticIntraRouteInversionSingleMoveGenerator original, Cloner cloner) : base(original, cloner) { } 51 50 public AlbaStochasticIntraRouteInversionSingleMoveGenerator() 52 51 : base() { 53 Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator.")); 52 Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator.")); 53 } 54 55 public override IDeepCloneable Clone(Cloner cloner) { 56 return new AlbaStochasticIntraRouteInversionSingleMoveGenerator(this, cloner); 54 57 } 55 58 … … 75 78 76 79 int currentTourEnd = currentTourStart; 77 while (currentTourEnd < individual.Length && 80 while (currentTourEnd < individual.Length && 78 81 individual[currentTourEnd] < individual.Cities) { 79 82 currentTourEnd++; … … 93 96 94 97 AlbaIntraRouteInversionMove move = Apply(individual, Cities, RandomParameter.ActualValue); 95 if (move != null)98 if (move != null) 96 99 moves.Add(move); 97 100
Note: See TracChangeset
for help on using the changeset viewer.