Changeset 3991
 Timestamp:
 06/30/10 15:54:47 (11 years ago)
 Location:
 trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Creators/AlbaPermutationCreator.cs
r3938 r3991 52 52 Parameters.Add(new ValueLookupParameter<IPermutationCreator>("PermutationCreatorParameter", "The permutation creator.", new RandomPermutationCreator())); 53 53 54 Initialize(); 54 55 ParameterizeSolutionCreator(); 55 56 Initialize();57 56 } 58 57 … … 75 74 void CitiesParameter_ValueChanged(object sender, EventArgs e) { 76 75 CitiesParameter.Value.ValueChanged += new EventHandler(CitiesValue_ValueChanged); 77 78 76 ParameterizeSolutionCreator(); 79 77 } … … 84 82 85 83 private void ParameterizeSolutionCreator() { 86 PermutationCreatorParameter.Value.LengthParameter.Value = CitiesParameter.Value;87 84 PermutationCreatorParameter.Value.PermutationTypeParameter.Value = new PermutationType(PermutationTypes.RelativeUndirected); 88 85 } 
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveGenerator.cs
r3947 r3991 84 84 Permutation permutation = VRPSolutionParameter.ActualValue as Permutation; 85 85 string moveName = TranslocationMoveGeneratorParameter.ActualValue.TranslocationMoveParameter.Name; 86 int cities = VRPSolutionParameter.ActualValue.Cities; 86 87 87 88 List<Scope> toBeDeleted = new List<Scope>(); … … 94 95 if(move.Index1  1 >= 0 && 95 96 move.Index3 1 >= 0) 96 criteria1 = (permutation[move.Index1] >= 100&&97 permutation[move.Index1  1] >= 100&&98 permutation[move.Index3  1] >= 100);97 criteria1 = (permutation[move.Index1] >= cities && 98 permutation[move.Index1  1] >= cities && 99 permutation[move.Index3  1] >= cities); 99 100 100 101 int index3 = move.Index3 + (move.Index2  move.Index1) + 1; … … 102 103 if (move.Index2 + 1 < permutation.Length && 103 104 index3 < permutation.Length) 104 criteria2 = (permutation[move.Index2] >= 100&&105 permutation[move.Index2 + 1] >= 100&&106 permutation[index3] >= 100);105 criteria2 = (permutation[move.Index2] >= cities && 106 permutation[move.Index2 + 1] >= cities && 107 permutation[index3] >= cities); 107 108 108 109 if(criteria1 && criteria2)
Note: See TracChangeset
for help on using the changeset viewer.