Changeset 7413 for branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Moves
- Timestamp:
- 01/26/12 00:36:45 (13 years ago)
- Location:
- branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Moves
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Moves/GQAPMoveGenerator.cs
r7407 r7413 22 22 using HeuristicLab.Common; 23 23 using HeuristicLab.Core; 24 using HeuristicLab.Encodings.IntegerVectorEncoding; 24 25 using HeuristicLab.Operators; 25 26 using HeuristicLab.Optimization; 27 using HeuristicLab.Parameters; 26 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 29 … … 29 31 [Item("GQAPMoveGenerator", "Base class for move generators for the Generalized Quadratic Assignment Problem.")] 30 32 [StorableClass] 31 public class GQAPMoveGenerator : SingleSuccessorOperator, IMoveGenerator { 33 public abstract class GQAPMoveGenerator : SingleSuccessorOperator, IMoveGenerator, IGQAPMoveOperator { 34 35 public ILookupParameter<IntegerVector> AssignmentParameter { 36 get { return (ILookupParameter<IntegerVector>)Parameters["Assignment"]; } 37 } 32 38 33 39 [StorableConstructor] 34 40 protected GQAPMoveGenerator(bool deserializing) : base(deserializing) { } 35 protected GQAPMoveGenerator(GQAPMoveGenerator original, Cloner cloner) 36 : base(original, cloner) { 37 // TODO: All fields, especially storable fields, need to be deep-cloned here 38 // myField = cloner.Clone(original.myField); 39 } 41 protected GQAPMoveGenerator(GQAPMoveGenerator original, Cloner cloner) : base(original, cloner) { } 40 42 public GQAPMoveGenerator() 41 43 : base() { 42 // TODO: Add construction logic here 43 } 44 45 public override IDeepCloneable Clone(Cloner cloner) { 46 return new GQAPMoveGenerator(this, cloner); 44 Parameters.Add(new LookupParameter<IntegerVector>("Assignment", "The current equipment-location assignment.")); 47 45 } 48 46 } -
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Moves/GQAPNMoveGenerator.cs
r7407 r7413 34 34 public abstract class GQAPNMoveGenerator : GQAPMoveGenerator, IGQAPNMoveOperator { 35 35 36 public ILookupParameter<IntegerVector> AssignmentParameter {37 get { return (ILookupParameter<IntegerVector>)Parameters["Assignment"]; }38 }39 36 public ILookupParameter<NMove> MoveParameter { 40 37 get { return (ILookupParameter<NMove>)Parameters["Move"]; } … … 49 46 public GQAPNMoveGenerator() 50 47 : base() { 51 Parameters.Add(new LookupParameter<IntegerVector>("Assignment", "The current equipment-location assignment."));52 48 Parameters.Add(new LookupParameter<NMove>("Move", "The move to generate.")); 53 49 Parameters.Add(new ValueLookupParameter<IntValue>("N", "The maximum number of equipment(s) that should be moved.", new IntValue(2))); -
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Moves/NMoveMaker.cs
r7412 r7413 25 25 using HeuristicLab.Encodings.IntegerVectorEncoding; 26 26 using HeuristicLab.Operators; 27 using HeuristicLab.Optimization; 27 28 using HeuristicLab.Parameters; 28 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 31 32 [Item("NMoveMaker", "Performs an n-move.")] 32 33 [StorableClass] 33 public class NMoveMaker : SingleSuccessorOperator, IGQAPNMoveOperator {34 public class NMoveMaker : SingleSuccessorOperator, IGQAPNMoveOperator, IMoveMaker { 34 35 35 36 public ILookupParameter<IntegerVector> AssignmentParameter { -
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Moves/StochasticNMoveMultiMoveGenerator.cs
r7412 r7413 30 30 31 31 namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment { 32 [Item("Stochastic 1-move MultiMoveGenerator", "Randomly samples a number of moves according to the 1-move described in Mateus, G., Resende, M., and Silva, R. 2011. GRASP with path-relinking for the generalized quadratic assignment problem. Journal of Heuristics 17, Springer Netherlands, pp. 527-565.")]32 [Item("Stochastic n-move MultiMoveGenerator", "Randomly samples a number of n-moves.")] 33 33 [StorableClass] 34 34 public class StochasticNMoveMultiMoveGenerator : GQAPNMoveGenerator, ILocationAwareGQAPOperator, IMultiMoveGenerator, IStochasticOperator { -
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Moves/StochasticNMoveSingleMoveGenerator.cs
r7412 r7413 30 30 31 31 namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment { 32 [Item("Stochastic 1-move and 2-move SingleMoveGenerator", "Randomly samples a single 1-move or 2-move as described in Mateus, G., Resende, M., and Silva, R. 2011. GRASP with path-relinking for the generalized quadratic assignment problem. Journal of Heuristics 17, Springer Netherlands, pp. 527-565.")]32 [Item("Stochastic n-move SingleMoveGenerator", "Randomly samples a single n-move.")] 33 33 [StorableClass] 34 34 public class StochasticNMoveSingleMoveGenerator : GQAPNMoveGenerator, ILocationAwareGQAPOperator, ISingleMoveGenerator, IStochasticOperator {
Note: See TracChangeset
for help on using the changeset viewer.