Changeset 4722 for trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/AlbaExhaustiveLambdaInterchangeMoveGenerator.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/LambdaInterchange/AlbaExhaustiveLambdaInterchangeMoveGenerator.cs
r4352 r4722 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 30 29 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 34 33 [StorableConstructor] 35 34 private AlbaExhaustiveLambdaInterchangeMoveGenerator(bool deserializing) : base(deserializing) { } 36 37 public AlbaExhaustiveLambdaInterchangeMoveGenerator() 38 : base() { 35 private AlbaExhaustiveLambdaInterchangeMoveGenerator(AlbaExhaustiveLambdaInterchangeMoveGenerator original, Cloner cloner) : base(original, cloner) { } 36 public AlbaExhaustiveLambdaInterchangeMoveGenerator() : base() { } 37 public override IDeepCloneable Clone(Cloner cloner) { 38 return new AlbaExhaustiveLambdaInterchangeMoveGenerator(this, cloner); 39 39 } 40 40 … … 50 50 51 51 for (int length1 = 0; length1 <= Math.Min(lambda, tour1.Cities.Count); length1++) { 52 for (int length2 = 0; length2 <= Math.Min(lambda, tour2.Cities.Count); length2++) {53 if (length1 != 0 || length2 != 0) {54 for (int index1 = 0; index1 < tour1.Cities.Count - length1 + 1; index1++) {55 for (int index2 = 0; index2 < tour2.Cities.Count - length2 + 1; index2++) {56 moves.Add(new AlbaLambdaInterchangeMove(tour1Index, index1, length1, 52 for (int length2 = 0; length2 <= Math.Min(lambda, tour2.Cities.Count); length2++) { 53 if (length1 != 0 || length2 != 0) { 54 for (int index1 = 0; index1 < tour1.Cities.Count - length1 + 1; index1++) { 55 for (int index2 = 0; index2 < tour2.Cities.Count - length2 + 1; index2++) { 56 moves.Add(new AlbaLambdaInterchangeMove(tour1Index, index1, length1, 57 57 tour2Index, index2, length2, individual)); 58 58 }
Note: See TracChangeset
for help on using the changeset viewer.