Changeset 7419 for branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Moves
- Timestamp:
- 01/27/12 13:24:36 (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
r7413 r7419 31 31 [Item("GQAPMoveGenerator", "Base class for move generators for the Generalized Quadratic Assignment Problem.")] 32 32 [StorableClass] 33 public abstract class GQAPMoveGenerator : SingleSuccessorOperator, I MoveGenerator, IGQAPMoveOperator {33 public abstract class GQAPMoveGenerator : SingleSuccessorOperator, IAssignmentAwareGQAPOperator, IMoveGenerator, IGQAPMoveOperator { 34 34 35 35 public ILookupParameter<IntegerVector> AssignmentParameter { … … 42 42 public GQAPMoveGenerator() 43 43 : base() { 44 Parameters.Add(new LookupParameter<IntegerVector>("Assignment", "The current equipment-location assignment."));44 Parameters.Add(new LookupParameter<IntegerVector>("Assignment", GQAPSolutionCreator.AssignmentDescription)); 45 45 } 46 46 } -
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Moves/GQAPNMoveGenerator.cs
r7413 r7419 34 34 public abstract class GQAPNMoveGenerator : GQAPMoveGenerator, IGQAPNMoveOperator { 35 35 36 #region Parameter Descriptions 37 public static readonly string MoveDescription = "Moves represent changes to the current solution. The n-move changes the assignment of up to or exactly n equipments."; 38 #endregion 39 36 40 public ILookupParameter<NMove> MoveParameter { 37 41 get { return (ILookupParameter<NMove>)Parameters["Move"]; } … … 46 50 public GQAPNMoveGenerator() 47 51 : base() { 48 Parameters.Add(new LookupParameter<NMove>("Move", "The move to generate."));52 Parameters.Add(new LookupParameter<NMove>("Move", MoveDescription)); 49 53 Parameters.Add(new ValueLookupParameter<IntValue>("N", "The maximum number of equipment(s) that should be moved.", new IntValue(2))); 50 54 } -
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Moves/NMoveMaker.cs
r7413 r7419 32 32 [Item("NMoveMaker", "Performs an n-move.")] 33 33 [StorableClass] 34 public class NMoveMaker : SingleSuccessorOperator, I GQAPNMoveOperator, IMoveMaker {34 public class NMoveMaker : SingleSuccessorOperator, IAssignmentAwareGQAPOperator, IQualityAwareGQAPOperator, IMoveQualityAwareGQAPOperator, IGQAPNMoveOperator, IMoveMaker { 35 35 36 36 public ILookupParameter<IntegerVector> AssignmentParameter { … … 39 39 public ILookupParameter<NMove> MoveParameter { 40 40 get { return (ILookupParameter<NMove>)Parameters["Move"]; } 41 } 42 ILookupParameter<BoolValue> IQualityAwareGQAPOperator.MaximizationParameter { 43 get { return MaximizationParameter; } 44 } 45 ILookupParameter<BoolValue> IMoveQualityAwareGQAPOperator.MaximizationParameter { 46 get { return MaximizationParameter; } 47 } 48 public ILookupParameter<BoolValue> MaximizationParameter { 49 get { return (ILookupParameter<BoolValue>)Parameters["Maximization"]; } 41 50 } 42 51 public ILookupParameter<DoubleValue> QualityParameter { … … 70 79 public NMoveMaker() 71 80 : base() { 72 Parameters.Add(new LookupParameter<IntegerVector>("Assignment", "The equipment-location assignment vector.")); 73 Parameters.Add(new LookupParameter<NMove>("Move", "The move to perform.")); 74 Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The solution quality.")); 75 Parameters.Add(new LookupParameter<DoubleValue>("FlowDistanceQuality", "The quality regarding the flow-distance criteria.")); 76 Parameters.Add(new LookupParameter<DoubleValue>("InstallationQuality", "The quality regarding the installation costs.")); 77 Parameters.Add(new LookupParameter<DoubleValue>("OverbookedCapacity", "The sum of the overbooked capacities relative to the capacity of each location.")); 78 Parameters.Add(new LookupParameter<DoubleValue>("MoveQuality", "The quality of the move if it would be applied.")); 79 Parameters.Add(new LookupParameter<DoubleValue>("MoveFlowDistanceQuality", "The quality of the move regarding the flow-distance criteria.")); 80 Parameters.Add(new LookupParameter<DoubleValue>("MoveInstallationQuality", "The quality of the move regarding the installation costs.")); 81 Parameters.Add(new LookupParameter<DoubleValue>("MoveOverbookedCapacity", "The sum of the overbooked capacities of the move relative to the capacity of each location.")); 81 Parameters.Add(new LookupParameter<IntegerVector>("Assignment", GQAPSolutionCreator.AssignmentDescription)); 82 Parameters.Add(new LookupParameter<NMove>("Move", GQAPNMoveGenerator.MoveDescription)); 83 Parameters.Add(new LookupParameter<BoolValue>("Maximization", GeneralizedQuadraticAssignmentProblem.MaximizationDescription)); 84 Parameters.Add(new LookupParameter<DoubleValue>("Quality", GQAPEvaluator.QualityDescription)); 85 Parameters.Add(new LookupParameter<DoubleValue>("FlowDistanceQuality", GQAPEvaluator.FlowDistanceQualityDescription)); 86 Parameters.Add(new LookupParameter<DoubleValue>("InstallationQuality", GQAPEvaluator.InstallationQualityDescription)); 87 Parameters.Add(new LookupParameter<DoubleValue>("OverbookedCapacity", GQAPEvaluator.OverbookedCapacityDescription)); 88 Parameters.Add(new LookupParameter<DoubleValue>("MoveQuality", GQAPNMoveEvaluator.MoveQualityDescription)); 89 Parameters.Add(new LookupParameter<DoubleValue>("MoveFlowDistanceQuality", GQAPNMoveEvaluator.MoveFlowDistanceQualityDescription)); 90 Parameters.Add(new LookupParameter<DoubleValue>("MoveInstallationQuality", GQAPNMoveEvaluator.MoveInstallationQualityDescription)); 91 Parameters.Add(new LookupParameter<DoubleValue>("MoveOverbookedCapacity", GQAPNMoveEvaluator.MoveOverbookedCapacityDescription)); 82 92 } 83 93 -
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Moves/StochasticNMoveMultiMoveGenerator.cs
r7413 r7419 32 32 [Item("Stochastic n-move MultiMoveGenerator", "Randomly samples a number of n-moves.")] 33 33 [StorableClass] 34 public class StochasticNMoveMultiMoveGenerator : GQAPNMoveGenerator, I LocationAwareGQAPOperator, IMultiMoveGenerator, IStochasticOperator {34 public class StochasticNMoveMultiMoveGenerator : GQAPNMoveGenerator, ICapacitiesAwareGQAPOperator, IStochasticOperator, IMultiMoveGenerator { 35 35 36 public ILookupParameter<DoubleArray> CapacitiesParameter { 37 get { return (ILookupParameter<DoubleArray>)Parameters["Capacities"]; } 38 } 36 39 public ILookupParameter<IRandom> RandomParameter { 37 40 get { return (ILookupParameter<IRandom>)Parameters["Random"]; } 38 }39 public ILookupParameter<DoubleArray> CapacitiesParameter {40 get { return (ILookupParameter<DoubleArray>)Parameters["Capacities"]; }41 41 } 42 42 public IValueLookupParameter<IntValue> SampleSizeParameter { … … 50 50 : base() { 51 51 Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator that should be used.")); 52 Parameters.Add(new LookupParameter<DoubleArray>("Capacities", "Capacities of the locations."));52 Parameters.Add(new LookupParameter<DoubleArray>("Capacities", GeneralizedQuadraticAssignmentProblem.CapacitiesDescription)); 53 53 Parameters.Add(new ValueLookupParameter<IntValue>("SampleSize", "The number of moves to generate.")); 54 54 } -
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Moves/StochasticNMoveSingleMoveGenerator.cs
r7413 r7419 32 32 [Item("Stochastic n-move SingleMoveGenerator", "Randomly samples a single n-move.")] 33 33 [StorableClass] 34 public class StochasticNMoveSingleMoveGenerator : GQAPNMoveGenerator, I LocationAwareGQAPOperator, ISingleMoveGenerator, IStochasticOperator {34 public class StochasticNMoveSingleMoveGenerator : GQAPNMoveGenerator, ICapacitiesAwareGQAPOperator, IStochasticOperator, ISingleMoveGenerator { 35 35 36 public ILookupParameter<DoubleArray> CapacitiesParameter { 37 get { return (ILookupParameter<DoubleArray>)Parameters["Capacities"]; } 38 } 36 39 public ILookupParameter<IRandom> RandomParameter { 37 40 get { return (ILookupParameter<IRandom>)Parameters["Random"]; } 38 }39 public ILookupParameter<DoubleArray> CapacitiesParameter {40 get { return (ILookupParameter<DoubleArray>)Parameters["Capacities"]; }41 41 } 42 42 … … 47 47 : base() { 48 48 Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator that should be used.")); 49 Parameters.Add(new LookupParameter<DoubleArray>("Capacities", "Capacities of the locations."));49 Parameters.Add(new LookupParameter<DoubleArray>("Capacities", GeneralizedQuadraticAssignmentProblem.CapacitiesDescription)); 50 50 } 51 51
Note: See TracChangeset
for help on using the changeset viewer.