Changeset 15504 for branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/Shakers
- Timestamp:
- 12/10/17 22:11:10 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/Shakers/NMoveShakingOperator.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. … … 32 32 [Item("NMoveShakingOperator", "Performs a number of shaking operations that increase in strength.")] 33 33 [StorableClass] 34 public class NMoveShakingOperator : SingleSuccessorOperator, I AssignmentAwareGQAPOperator, ICapacitiesAwareGQAPOperator, IMultiNeighborhoodShakingOperator, IStochasticOperator {34 public class NMoveShakingOperator : SingleSuccessorOperator, IProblemInstanceAwareGQAPOperator, IMultiNeighborhoodShakingOperator, IStochasticOperator { 35 35 36 37 public ILookupParameter<GQAPInstance> ProblemInstanceParameter { 38 get { return (ILookupParameter<GQAPInstance>)Parameters["ProblemInstance"]; } 39 } 36 40 public ILookupParameter<IntegerVector> AssignmentParameter { 37 41 get { return (ILookupParameter<IntegerVector>)Parameters["Assignment"]; } 38 }39 public ILookupParameter<DoubleArray> CapacitiesParameter {40 get { return (ILookupParameter<DoubleArray>)Parameters["Capacities"]; }41 42 } 42 43 public IValueLookupParameter<IntValue> CurrentNeighborhoodIndexParameter { … … 54 55 protected NMoveShakingOperator(NMoveShakingOperator original, Cloner cloner) : base(original, cloner) { } 55 56 public NMoveShakingOperator() { 57 Parameters.Add(new LookupParameter<GQAPInstance>("ProblemInstance", GQAP.ProblemInstanceDescription)); 56 58 Parameters.Add(new LookupParameter<IntegerVector>("Assignment", GQAPSolutionCreator.AssignmentDescription)); 57 Parameters.Add(new LookupParameter<DoubleArray>("Capacities", GeneralizedQuadraticAssignmentProblem.CapacitiesDescription));58 59 Parameters.Add(new ValueLookupParameter<IntValue>("CurrentNeighborhoodIndex", "The index of the operator that should be applied (k).")); 59 60 Parameters.Add(new LookupParameter<IntValue>("NeighborhoodCount", "The number of operators that are available.")); … … 68 69 var random = RandomParameter.ActualValue; 69 70 var assignment = AssignmentParameter.ActualValue; 70 var capacities = CapacitiesParameter.ActualValue;71 var capacities = ProblemInstanceParameter.ActualValue.Capacities; 71 72 72 73 if (NeighborhoodCountParameter.ActualValue == null)
Note: See TracChangeset
for help on using the changeset viewer.