Changeset 4068 for trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveGenerator.cs
- Timestamp:
- 07/22/10 00:44:01 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveGenerator.cs
r4047 r4068 20 20 #endregion 21 21 22 using System;23 22 using System.Collections.Generic; 24 using System.Linq;25 using System.Text;23 using HeuristicLab.Core; 24 using HeuristicLab.Data; 26 25 using HeuristicLab.Encodings.PermutationEncoding; 27 26 using HeuristicLab.Optimization; 28 using HeuristicLab. Core;27 using HeuristicLab.Parameters; 29 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 using HeuristicLab.Parameters;31 using HeuristicLab.Data;32 29 33 30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 41 38 protected override IPermutationMoveOperator PermutationMoveOperatorParameter { 42 39 get { return TranslocationMoveGeneratorParameter.Value; } 43 set { 40 set { 44 41 TranslocationMoveGeneratorParameter.Value = value as TranslocationMoveGenerator; 45 42 if (TranslocationMoveGeneratorParameter.Value is IMultiMoveGenerator) { … … 71 68 } 72 69 73 public AlbaTranslocationMoveGenerator(): base() { 74 Parameters.Add(new ValueLookupParameter<TranslocationMoveGenerator>("TranslocationMoveGenerator", "The move generator.", 70 public AlbaTranslocationMoveGenerator() 71 : base() { 72 Parameters.Add(new ValueLookupParameter<TranslocationMoveGenerator>("TranslocationMoveGenerator", "The move generator.", 75 73 new StochasticTranslocationMultiMoveGenerator())); 76 74 Parameters.Add(new ValueLookupParameter<IntValue>("SampleSize", "The number of moves to generate.")); … … 93 91 if (move != null) { 94 92 bool criteria1 = true; 95 if (move.Index1 - 1 >= 0 &&96 move.Index3 - 1 >= 0)93 if (move.Index1 - 1 >= 0 && 94 move.Index3 - 1 >= 0) 97 95 criteria1 = (permutation[move.Index1] >= cities && 98 96 permutation[move.Index1 - 1] >= cities && … … 107 105 permutation[index3] >= cities); 108 106 109 if (criteria1 && criteria2)107 if (criteria1 && criteria2) 110 108 toBeDeleted.Add(scope); 111 109 }
Note: See TracChangeset
for help on using the changeset viewer.