Changeset 15504 for branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/Manipulators/SwapLocationManipulator.cs
- Timestamp:
- 12/10/17 22:11:10 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/Manipulators/SwapLocationManipulator.cs
r7523 r15504 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2017 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 24 24 using HeuristicLab.Common; 25 25 using HeuristicLab.Core; 26 using HeuristicLab.Data;27 26 using HeuristicLab.Encodings.IntegerVectorEncoding; 28 using HeuristicLab.Parameters;29 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 28 … … 33 31 [Item("SwapLocationManipluator", "Swaps two locations by exchanging all equipments between the locations.")] 34 32 [StorableClass] 35 public class SwapLocationManipluator : GQAPManipulator, ICapacitiesAwareGQAPOperator { 36 37 public ILookupParameter<DoubleArray> CapacitiesParameter { 38 get { return (ILookupParameter<DoubleArray>)Parameters["Capacities"]; } 39 } 40 33 public class SwapLocationManipluator : GQAPManipulator { 34 41 35 [StorableConstructor] 42 36 protected SwapLocationManipluator(bool deserializing) : base(deserializing) { } … … 44 38 public SwapLocationManipluator() 45 39 : base() { 46 Parameters.Add(new LookupParameter<DoubleArray>("Capacities", GeneralizedQuadraticAssignmentProblem.CapacitiesDescription));47 40 } 48 41 … … 72 65 } 73 66 74 protected override void Manipulate(IRandom random, IntegerVector vector ) {75 Apply(random, vector, CapacitiesParameter.ActualValue.Length);67 protected override void Manipulate(IRandom random, IntegerVector vector, GQAPInstance problemInstance) { 68 Apply(random, vector, problemInstance.Capacities.Length); 76 69 } 77 70 }
Note: See TracChangeset
for help on using the changeset viewer.