Changeset 4383
- Timestamp:
- 09/13/10 13:54:30 (14 years ago)
- Location:
- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4
- Files:
-
- 2 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/AlbaEncoding.cs
r4376 r4383 83 83 public override IDeepCloneable Clone(HeuristicLab.Common.Cloner cloner) { 84 84 AlbaEncoding clone = new AlbaEncoding( 85 new Permutation(this.PermutationType, this.array), ProblemInstance);85 new Permutation(this.PermutationType, new IntArray(this.array)), ProblemInstance); 86 86 cloner.RegisterClonedObject(this, clone); 87 87 clone.readOnly = readOnly; -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaIntraRouteInversionEvaluator.cs
r4370 r4383 48 48 49 49 protected override void EvaluateMove() { 50 AlbaEncoding newSolution = VRPToursParameter.ActualValue.Clone() as AlbaEncoding;50 AlbaEncoding newSolution = IntraRouteInversionMoveParameter.ActualValue.Permutation.Clone() as AlbaEncoding; 51 51 AlbaIntraRouteInversionMoveMaker.Apply(newSolution, IntraRouteInversionMoveParameter.ActualValue); 52 52 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaIntraRouteInversionMove.cs
r4370 r4383 29 29 30 30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { 31 [Item(" IntraRouteInversionMove", "Item that describes an intra route inversion move on a VRP representation. It is implemented as described in Alba, E. and Dorronsoro, B. (2004). Solving the Vehicle Routing Problem by Using Cellular Genetic Algorithms.")]31 [Item("AlbaIntraRouteInversionMove", "Item that describes an intra route inversion move on a VRP representation. It is implemented as described in Alba, E. and Dorronsoro, B. (2004). Solving the Vehicle Routing Problem by Using Cellular Genetic Algorithms.")] 32 32 [StorableClass] 33 33 public class AlbaIntraRouteInversionMove : TwoIndexMove, IVRPMove { … … 43 43 44 44 public AlbaIntraRouteInversionMove(int index1, int index2, AlbaEncoding permutation) 45 : base(index1, index2, permutation) { 46 this.Permutation = permutation.Clone() as AlbaEncoding; 47 } 45 : base(index1, index2, permutation.Clone() as AlbaEncoding) { 46 } 48 47 49 48 public override IDeepCloneable Clone(HeuristicLab.Common.Cloner cloner) { … … 52 51 53 52 if (Permutation != null) 54 clone.Permutation = (AlbaEncoding)cloner.Clone(Permutation);53 clone.Permutation = Permutation.Clone() as AlbaEncoding; 55 54 56 55 cloner.RegisterClonedObject(this, clone); -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaIntraRouteInversionMoveMaker.cs
r4370 r4383 54 54 AlbaIntraRouteInversionMove move = IntraRouteInversionMoveParameter.ActualValue; 55 55 56 Apply(VRPToursParameter.ActualValue as AlbaEncoding, move); 56 Apply(move.Individual as AlbaEncoding, move); 57 VRPToursParameter.ActualValue = move.Individual as AlbaEncoding; 57 58 } 58 59 } -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange/AlbaLambdaInterchangeMove.cs
r4370 r4383 30 30 31 31 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { 32 [Item(" InversionMove", "Item that describes a lambda move on a VRP representation. It is implemented as described in Alba, E. and Dorronsoro, B. (2004). Solving the Vehicle Routing Problem by Using Cellular Genetic Algorithms.")]32 [Item("AlbaLambdaInterchangeMove", "Item that describes a lambda move on a VRP representation. It is implemented as described in Alba, E. and Dorronsoro, B. (2004). Solving the Vehicle Routing Problem by Using Cellular Genetic Algorithms.")] 33 33 [StorableClass] 34 34 public class AlbaLambdaInterchangeMove: Item, IVRPMove { … … 91 91 92 92 if (Individual != null) 93 clone.Individual = (AlbaEncoding)cloner.Clone(Individual);93 clone.Individual = Individual.Clone() as AlbaEncoding; 94 94 95 95 cloner.RegisterClonedObject(this, clone); -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange/AlbaLambdaInterchangeMoveEvaluator.cs
r4370 r4383 48 48 49 49 protected override void EvaluateMove() { 50 AlbaEncoding newSolution = VRPToursParameter.ActualValue.Clone() as AlbaEncoding;50 AlbaEncoding newSolution = LambdaInterchangeMoveParameter.ActualValue.Individual.Clone() as AlbaEncoding; 51 51 AlbaLambdaInterchangeMoveMaker.Apply(newSolution, LambdaInterchangeMoveParameter.ActualValue); 52 52 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange/AlbaLambdaInterchangeMoveMaker.cs
r4370 r4383 61 61 AlbaLambdaInterchangeMove move = LambdaInterchangeMoveParameter.ActualValue; 62 62 63 Apply(VRPToursParameter.ActualValue as AlbaEncoding, move); 63 Apply(move.Individual as AlbaEncoding, move); 64 VRPToursParameter.ActualValue = move.Individual; 64 65 } 65 66 } -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveEvaluator.cs
r4370 r4383 50 50 TranslocationMove move = TranslocationMoveParameter.ActualValue; 51 51 //perform move 52 AlbaEncoding newSolution = VRPToursParameter.ActualValue.Clone() as AlbaEncoding;52 AlbaEncoding newSolution = move.Permutation.Clone() as AlbaEncoding; 53 53 TranslocationManipulator.Apply(newSolution, move.Index1, move.Index2, move.Index3); 54 54 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveMaker.cs
r4370 r4383 54 54 55 55 protected override void PerformMove() { 56 IVariable moveVariable = this.ExecutionContext.Scope.Variables[ 57 TranslocationMoveParameter.ActualName]; 58 TranslocationMove move = moveVariable.Value as TranslocationMove; 59 VRPToursParameter.ActualValue = move.Permutation as AlbaEncoding; 60 56 61 moveMaker.PermutationParameter.ActualName = VRPToursParameter.ActualName; 57 62 IAtomicOperation op = this.ExecutionContext.CreateChildOperation(moveMaker); -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/HeuristicLab.Problems.VehicleRouting-3.4.csproj
r4379 r4383 153 153 <Compile Include="Encodings\Alba\Moves\LambdaInterchange\AlbaStochasticLambdaInterchangeSingleMoveGenerator.cs" /> 154 154 <Compile Include="Encodings\Alba\Moves\LambdaInterchange\IAlbaLambdaInterchangeMoveOperator.cs" /> 155 <Compile Include="Encodings\Alba\Moves\ThreeOpt\AlbaTranslocationMove.cs" /> 155 156 <Compile Include="Encodings\Alba\Moves\ThreeOpt\AlbaTranslocationMoveEvaluator.cs" /> 156 157 <Compile Include="Encodings\Alba\Moves\ThreeOpt\AlbaTranslocationMoveGenerator.cs" /> … … 159 160 <Compile Include="Encodings\Alba\Moves\ThreeOpt\AlbaTranslocationMoveSoftTabuCriterion.cs" /> 160 161 <Compile Include="Encodings\Alba\Moves\ThreeOpt\AlbaTranslocationMoveTabuMaker.cs" /> 162 <Compile Include="Encodings\Alba\Moves\ThreeOpt\AlbaStochasticTranslocationSingleMoveGenerator.cs" /> 161 163 <Compile Include="Encodings\Alba\Moves\ThreeOpt\IAlbaTranslocationMoveOperator.cs" /> 162 164 <Compile Include="Encodings\General\Creators\MultiVRPSolutionCreator.cs" />
Note: See TracChangeset
for help on using the changeset viewer.