Changeset 4177 for trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators
- Timestamp:
- 08/09/10 13:29:06 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/AlbaManipulator.cs
r4154 r4177 27 27 28 28 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { 29 [Item("AlbaManipulator", "An operator which manipulates an alba VRP representation.")] 29 30 [StorableClass] 30 public abstract class AlbaManipulator : VRPManipulator { 31 protected virtual void Manipulate() { 31 public sealed class AlbaManipulator : VRPManipulator { 32 public IValueLookupParameter<IPermutationManipulator> PermutationManipulatorParameter { 33 get { return (IValueLookupParameter<IPermutationManipulator>)Parameters["PermutationManipulator"]; } 32 34 } 33 35 36 public AlbaManipulator() 37 : base() { 38 Parameters.Add(new ValueLookupParameter<IPermutationManipulator>("PermutationManipulator", "The permutation manipulator.", new TranslocationManipulator())); 39 } 40 34 41 public override IOperation Apply() { 35 42 IVRPEncoding solution = VRPSolutionParameter.ActualValue; … … 38 45 } 39 46 40 Manipulate();47 OperationCollection next = new OperationCollection(base.Apply()); 41 48 42 return base.Apply(); 49 IPermutationManipulator op = PermutationManipulatorParameter.ActualValue; 50 if (op != null) { 51 op.PermutationParameter.ActualName = VRPSolutionParameter.ActualName; 52 next.Insert(0, ExecutionContext.CreateOperation(op)); 53 } 54 55 return next; 43 56 } 44 57 }
Note: See TracChangeset
for help on using the changeset viewer.