Free cookie consent management tool by TermsFeed Policy Generator

Changeset 7419


Ignore:
Timestamp:
01/27/12 13:24:36 (13 years ago)
Author:
abeham
Message:

#1614

  • reworked parameterization (one interface for every parameter resp. parameter group)
  • unified parameter descriptions
Location:
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3
Files:
17 added
5 deleted
26 edited

Legend:

Unmodified
Added
Removed
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Analyzers/BestGQAPSolutionAnalyzer.cs

    r7418 r7419  
    3737  [Item("Best GeneralizedQAP Solution Analyzer", "An operator for analyzing the best solution of Generalized Quadratic Assignment Problems.")]
    3838  [StorableClass]
    39   public sealed class BestGQAPSolutionAnalyzer : SingleSuccessorOperator, IAnalyzer {
     39  public sealed class BestGQAPSolutionAnalyzer : SingleSuccessorOperator, IAssignmentsAwareGQAPOperator,
     40    IQualitiesAwareGQAPOperator, IDistancesAwareGQAPOperator, IWeightsAwareGQAPOperator, IInstallationCostsAwareGQAPOperator,
     41    IDemandsAwareGQAPOperator, ICapacitiesAwareGQAPOperator, ITransportationCostsAwareGQAPOperator,
     42    IOverbookedCapacityPenaltyAwareGQAPOperator, IEquipmentNamesAwareGQAPOperator, ILocationNamesAwareGQAPOperator,
     43    IBestKnownQualityAwareGQAPOperator, IBestKnownSolutionAwareGQAPOperator, IAnalyzer {
    4044
    4145    public bool EnabledByDefault {
     
    4347    }
    4448
    45     public LookupParameter<BoolValue> MaximizationParameter {
    46       get { return (LookupParameter<BoolValue>)Parameters["Maximization"]; }
     49    public IScopeTreeLookupParameter<IntegerVector> AssignmentParameter {
     50      get { return (IScopeTreeLookupParameter<IntegerVector>)Parameters["Assignment"]; }
    4751    }
    48     public LookupParameter<DoubleMatrix> DistancesParameter {
    49       get { return (LookupParameter<DoubleMatrix>)Parameters["Distances"]; }
     52    public ILookupParameter<BoolValue> MaximizationParameter {
     53      get { return (ILookupParameter<BoolValue>)Parameters["Maximization"]; }
    5054    }
    51     public LookupParameter<DoubleMatrix> WeightsParameter {
    52       get { return (LookupParameter<DoubleMatrix>)Parameters["Weights"]; }
     55    public IScopeTreeLookupParameter<DoubleValue> QualityParameter {
     56      get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; }
    5357    }
    54     public LookupParameter<DoubleMatrix> InstallationCostsParameter {
    55       get { return (LookupParameter<DoubleMatrix>)Parameters["InstallationCosts"]; }
     58    public IScopeTreeLookupParameter<DoubleValue> FlowDistanceQualityParameter {
     59      get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters["FlowDistanceQuality"]; }
    5660    }
    57     public LookupParameter<DoubleArray> DemandsParameter {
    58       get { return (LookupParameter<DoubleArray>)Parameters["Demands"]; }
     61    public IScopeTreeLookupParameter<DoubleValue> InstallationQualityParameter {
     62      get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters["InstallationQuality"]; }
    5963    }
    60     public LookupParameter<DoubleArray> CapacitiesParameter {
    61       get { return (LookupParameter<DoubleArray>)Parameters["Capacities"]; }
     64    public IScopeTreeLookupParameter<DoubleValue> OverbookedCapacityParameter {
     65      get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters["OverbookedCapacity"]; }
    6266    }
    63     public LookupParameter<DoubleValue> TransportationCostsParameter {
    64       get { return (LookupParameter<DoubleValue>)Parameters["TransportationCosts"]; }
     67    public ILookupParameter<DoubleMatrix> DistancesParameter {
     68      get { return (ILookupParameter<DoubleMatrix>)Parameters["Distances"]; }
    6569    }
    66     public LookupParameter<DoubleValue> OverbookedCapacityPenaltyParameter {
    67       get { return (LookupParameter<DoubleValue>)Parameters["OverbookedCapacityPenalty"]; }
     70    public ILookupParameter<DoubleMatrix> WeightsParameter {
     71      get { return (ILookupParameter<DoubleMatrix>)Parameters["Weights"]; }
    6872    }
    69     public ScopeTreeLookupParameter<IntegerVector> AssignmentParameter {
    70       get { return (ScopeTreeLookupParameter<IntegerVector>)Parameters["Assignment"]; }
     73    public ILookupParameter<DoubleMatrix> InstallationCostsParameter {
     74      get { return (ILookupParameter<DoubleMatrix>)Parameters["InstallationCosts"]; }
    7175    }
    72     public ScopeTreeLookupParameter<DoubleValue> QualityParameter {
    73       get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; }
     76    public ILookupParameter<DoubleArray> DemandsParameter {
     77      get { return (ILookupParameter<DoubleArray>)Parameters["Demands"]; }
    7478    }
    75     public ScopeTreeLookupParameter<DoubleValue> FlowDistanceQualityParameter {
    76       get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters["FlowDistanceQuality"]; }
     79    public ILookupParameter<DoubleArray> CapacitiesParameter {
     80      get { return (ILookupParameter<DoubleArray>)Parameters["Capacities"]; }
    7781    }
    78     public ScopeTreeLookupParameter<DoubleValue> InstallationQualityParameter {
    79       get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters["InstallationQuality"]; }
     82    public IValueLookupParameter<DoubleValue> TransportationCostsParameter {
     83      get { return (IValueLookupParameter<DoubleValue>)Parameters["TransportationCosts"]; }
    8084    }
    81     public ScopeTreeLookupParameter<DoubleValue> OverbookedCapacityParameter {
    82       get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters["OverbookedCapacity"]; }
    83     }
    84     public LookupParameter<GQAPAssignment> BestSolutionParameter {
    85       get { return (LookupParameter<GQAPAssignment>)Parameters["BestSolution"]; }
    86     }
    87     public ValueLookupParameter<ResultCollection> ResultsParameter {
    88       get { return (ValueLookupParameter<ResultCollection>)Parameters["Results"]; }
    89     }
    90     public LookupParameter<DoubleValue> BestKnownQualityParameter {
    91       get { return (LookupParameter<DoubleValue>)Parameters["BestKnownQuality"]; }
    92     }
    93     public LookupParameter<IntegerVector> BestKnownSolutionParameter {
    94       get { return (LookupParameter<IntegerVector>)Parameters["BestKnownSolution"]; }
     85    public IValueLookupParameter<DoubleValue> OverbookedCapacityPenaltyParameter {
     86      get { return (IValueLookupParameter<DoubleValue>)Parameters["OverbookedCapacityPenalty"]; }
    9587    }
    9688    public ILookupParameter<StringArray> EquipmentNamesParameter {
     
    9991    public ILookupParameter<StringArray> LocationNamesParameter {
    10092      get { return (ILookupParameter<StringArray>)Parameters["LocationNames"]; }
     93    }
     94    public ILookupParameter<DoubleValue> BestKnownQualityParameter {
     95      get { return (ILookupParameter<DoubleValue>)Parameters["BestKnownQuality"]; }
     96    }
     97    public ILookupParameter<IntegerVector> BestKnownSolutionParameter {
     98      get { return (ILookupParameter<IntegerVector>)Parameters["BestKnownSolution"]; }
     99    }
     100    public ILookupParameter<GQAPAssignment> BestSolutionParameter {
     101      get { return (ILookupParameter<GQAPAssignment>)Parameters["BestSolution"]; }
     102    }
     103    public IValueLookupParameter<ResultCollection> ResultsParameter {
     104      get { return (IValueLookupParameter<ResultCollection>)Parameters["Results"]; }
    101105    }
    102106
     
    115119      Parameters.Add(new LookupParameter<DoubleArray>("Demands", "The demands of the equipments."));
    116120      Parameters.Add(new LookupParameter<DoubleArray>("Capacities", "The capacities at the locations."));
    117       Parameters.Add(new LookupParameter<DoubleValue>("TransportationCosts", "The transportation cost represents the flow-unit per distance-unit cost factor. This value can also be set to 1 if these costs are factored into the weights matrix already."));
    118       Parameters.Add(new LookupParameter<DoubleValue>("OverbookedCapacityPenalty", "The multiplier for the constraint violation when added to the quality."));
     121      Parameters.Add(new ValueLookupParameter<DoubleValue>("TransportationCosts", "The transportation cost represents the flow-unit per distance-unit cost factor. This value can also be set to 1 if these costs are factored into the weights matrix already."));
     122      Parameters.Add(new ValueLookupParameter<DoubleValue>("OverbookedCapacityPenalty", "The multiplier for the constraint violation when added to the quality."));
    119123      Parameters.Add(new ScopeTreeLookupParameter<IntegerVector>("Assignment", "The GQAP solutions from which the best solution should be analyzed."));
    120124      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The qualities of the GQAP solutions which should be analyzed."));
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Analyzers/GQAPSolutionArchiveAnalyzer.cs

    r7418 r7419  
    3535  [Item("GeneralizedQAP Solution Archive Analyzer", "An operator for analyzing the archive of found solutions for the GQAP.")]
    3636  [StorableClass]
    37   public sealed class GQAPSolutionArchiveAnalyzer : SingleSuccessorOperator, IAnalyzer {
     37  public sealed class GQAPSolutionArchiveAnalyzer : SingleSuccessorOperator, IAssignmentsAwareGQAPOperator,
     38    IQualitiesAwareGQAPOperator, IDistancesAwareGQAPOperator, IWeightsAwareGQAPOperator, IInstallationCostsAwareGQAPOperator,
     39    IDemandsAwareGQAPOperator, ICapacitiesAwareGQAPOperator, ITransportationCostsAwareGQAPOperator,
     40    IOverbookedCapacityPenaltyAwareGQAPOperator, IEquipmentNamesAwareGQAPOperator, ILocationNamesAwareGQAPOperator,
     41    IBestKnownQualityAwareGQAPOperator, IBestKnownSolutionAwareGQAPOperator, IAnalyzer {
    3842
    3943    public bool EnabledByDefault {
    40       get { return true; }
     44      get { return false; }
    4145    }
    4246
    43     public LookupParameter<BoolValue> MaximizationParameter {
    44       get { return (LookupParameter<BoolValue>)Parameters["Maximization"]; }
     47    public IScopeTreeLookupParameter<IntegerVector> AssignmentParameter {
     48      get { return (IScopeTreeLookupParameter<IntegerVector>)Parameters["Assignment"]; }
    4549    }
    46     public LookupParameter<DoubleMatrix> DistancesParameter {
    47       get { return (LookupParameter<DoubleMatrix>)Parameters["Distances"]; }
     50    public ILookupParameter<BoolValue> MaximizationParameter {
     51      get { return (ILookupParameter<BoolValue>)Parameters["Maximization"]; }
    4852    }
    49     public LookupParameter<DoubleMatrix> WeightsParameter {
    50       get { return (LookupParameter<DoubleMatrix>)Parameters["Weights"]; }
     53    public IScopeTreeLookupParameter<DoubleValue> QualityParameter {
     54      get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; }
    5155    }
    52     public LookupParameter<DoubleMatrix> InstallationCostsParameter {
    53       get { return (LookupParameter<DoubleMatrix>)Parameters["InstallationCosts"]; }
     56    public IScopeTreeLookupParameter<DoubleValue> FlowDistanceQualityParameter {
     57      get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters["FlowDistanceQuality"]; }
    5458    }
    55     public LookupParameter<DoubleArray> DemandsParameter {
    56       get { return (LookupParameter<DoubleArray>)Parameters["Demands"]; }
     59    public IScopeTreeLookupParameter<DoubleValue> InstallationQualityParameter {
     60      get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters["InstallationQuality"]; }
    5761    }
    58     public LookupParameter<DoubleArray> CapacitiesParameter {
    59       get { return (LookupParameter<DoubleArray>)Parameters["Capacities"]; }
     62    public IScopeTreeLookupParameter<DoubleValue> OverbookedCapacityParameter {
     63      get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters["OverbookedCapacity"]; }
    6064    }
    61     public LookupParameter<DoubleValue> TransportationCostsParameter {
    62       get { return (LookupParameter<DoubleValue>)Parameters["TransportationCosts"]; }
     65    public ILookupParameter<DoubleMatrix> DistancesParameter {
     66      get { return (ILookupParameter<DoubleMatrix>)Parameters["Distances"]; }
    6367    }
    64     public LookupParameter<DoubleValue> OverbookedCapacityPenaltyParameter {
    65       get { return (LookupParameter<DoubleValue>)Parameters["OverbookedCapacityPenalty"]; }
     68    public ILookupParameter<DoubleMatrix> WeightsParameter {
     69      get { return (ILookupParameter<DoubleMatrix>)Parameters["Weights"]; }
    6670    }
    67     public ScopeTreeLookupParameter<IntegerVector> AssignmentParameter {
    68       get { return (ScopeTreeLookupParameter<IntegerVector>)Parameters["Assignment"]; }
     71    public ILookupParameter<DoubleMatrix> InstallationCostsParameter {
     72      get { return (ILookupParameter<DoubleMatrix>)Parameters["InstallationCosts"]; }
    6973    }
    70     public ScopeTreeLookupParameter<DoubleValue> QualityParameter {
    71       get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; }
     74    public ILookupParameter<DoubleArray> DemandsParameter {
     75      get { return (ILookupParameter<DoubleArray>)Parameters["Demands"]; }
    7276    }
    73     public ScopeTreeLookupParameter<DoubleValue> FlowDistanceQualityParameter {
    74       get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters["FlowDistanceQuality"]; }
     77    public ILookupParameter<DoubleArray> CapacitiesParameter {
     78      get { return (ILookupParameter<DoubleArray>)Parameters["Capacities"]; }
    7579    }
    76     public ScopeTreeLookupParameter<DoubleValue> InstallationQualityParameter {
    77       get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters["InstallationQuality"]; }
     80    public IValueLookupParameter<DoubleValue> TransportationCostsParameter {
     81      get { return (IValueLookupParameter<DoubleValue>)Parameters["TransportationCosts"]; }
    7882    }
    79     public ScopeTreeLookupParameter<DoubleValue> OverbookedCapacityParameter {
    80       get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters["OverbookedCapacity"]; }
    81     }
    82     public LookupParameter<GQAPAssignment> BestSolutionParameter {
    83       get { return (LookupParameter<GQAPAssignment>)Parameters["BestSolution"]; }
    84     }
    85     public ValueLookupParameter<ResultCollection> ResultsParameter {
    86       get { return (ValueLookupParameter<ResultCollection>)Parameters["Results"]; }
    87     }
    88     public LookupParameter<DoubleValue> BestKnownQualityParameter {
    89       get { return (LookupParameter<DoubleValue>)Parameters["BestKnownQuality"]; }
    90     }
    91     public LookupParameter<IntegerVector> BestKnownSolutionParameter {
    92       get { return (LookupParameter<IntegerVector>)Parameters["BestKnownSolution"]; }
     83    public IValueLookupParameter<DoubleValue> OverbookedCapacityPenaltyParameter {
     84      get { return (IValueLookupParameter<DoubleValue>)Parameters["OverbookedCapacityPenalty"]; }
    9385    }
    9486    public ILookupParameter<StringArray> EquipmentNamesParameter {
     
    9789    public ILookupParameter<StringArray> LocationNamesParameter {
    9890      get { return (ILookupParameter<StringArray>)Parameters["LocationNames"]; }
     91    }
     92    public ILookupParameter<DoubleValue> BestKnownQualityParameter {
     93      get { return (ILookupParameter<DoubleValue>)Parameters["BestKnownQuality"]; }
     94    }
     95    public ILookupParameter<IntegerVector> BestKnownSolutionParameter {
     96      get { return (ILookupParameter<IntegerVector>)Parameters["BestKnownSolution"]; }
     97    }
     98    public ILookupParameter<GQAPAssignment> BestSolutionParameter {
     99      get { return (ILookupParameter<GQAPAssignment>)Parameters["BestSolution"]; }
     100    }
     101    public IValueLookupParameter<ResultCollection> ResultsParameter {
     102      get { return (IValueLookupParameter<ResultCollection>)Parameters["Results"]; }
    99103    }
    100104
     
    113117      Parameters.Add(new LookupParameter<DoubleArray>("Demands", "The demands of the equipments."));
    114118      Parameters.Add(new LookupParameter<DoubleArray>("Capacities", "The capacities at the locations."));
    115       Parameters.Add(new LookupParameter<DoubleValue>("TransportationCosts", "The transportation cost represents the flow-unit per distance-unit cost factor. This value can also be set to 1 if these costs are factored into the weights matrix already."));
    116       Parameters.Add(new LookupParameter<DoubleValue>("OverbookedCapacityPenalty", "The multiplier for the constraint violation when added to the quality."));
     119      Parameters.Add(new ValueLookupParameter<DoubleValue>("TransportationCosts", "The transportation cost represents the flow-unit per distance-unit cost factor. This value can also be set to 1 if these costs are factored into the weights matrix already."));
     120      Parameters.Add(new ValueLookupParameter<DoubleValue>("OverbookedCapacityPenalty", "The multiplier for the constraint violation when added to the quality."));
    117121      Parameters.Add(new ScopeTreeLookupParameter<IntegerVector>("Assignment", "The GQAP solutions from which the best solution should be analyzed."));
    118122      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The qualities of the GQAP solutions which should be analyzed."));
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Evaluators/GQAPEvaluator.cs

    r7412 r7419  
    3333  [Item("GQAPEvaluator", "Evaluates solutions to the generalized quadratic assignment problem.")]
    3434  [StorableClass]
    35   public class GQAPEvaluator : SingleSuccessorOperator, IGQAPEvaluator {
     35  public class GQAPEvaluator : SingleSuccessorOperator, IGQAPEvaluator,
     36  IWeightsAwareGQAPOperator, IDistancesAwareGQAPOperator, IInstallationCostsAwareGQAPOperator,
     37  IDemandsAwareGQAPOperator, ICapacitiesAwareGQAPOperator, IAssignmentAwareGQAPOperator {
    3638
     39    #region Parameter Descriptions
     40    public static readonly string QualityDescription = "The quality of the solution.";
     41    public static readonly string FlowDistanceQualityDescription = "The quality regarding the flow-distance criteria.";
     42    public static readonly string InstallationQualityDescription = "The quality regarding the installation costs.";
     43    public static readonly string OverbookedCapacityDescription = "The sum of the overbooked capacities relative to the capacity of each location.";
     44    #endregion
     45
     46    public ILookupParameter<BoolValue> MaximizationParameter {
     47      get { return (ILookupParameter<BoolValue>)Parameters["Maximization"]; }
     48    }
    3749    public ILookupParameter<DoubleValue> QualityParameter {
    3850      get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
     
    7789    public GQAPEvaluator()
    7890      : base() {
    79       Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of the solution."));
    80       Parameters.Add(new LookupParameter<DoubleValue>("FlowDistanceQuality", "The quality regarding the flow-distance criteria."));
    81       Parameters.Add(new LookupParameter<DoubleValue>("InstallationQuality", "The quality regarding the installation costs."));
    82       Parameters.Add(new LookupParameter<DoubleValue>("OverbookedCapacity", "The sum of the overbooked capacities relative to the capacity of each location."));
    83       Parameters.Add(new ValueLookupParameter<DoubleValue>("TransportationCosts", "The transportation cost represents the flow-unit per distance-unit cost factor. This value can also be set to 1 if these costs are factored into the weights or distance matrix already."));
    84       Parameters.Add(new ValueLookupParameter<DoubleValue>("OverbookedCapacityPenalty", "The multiplier for the constraint violation when added to the quality."));
    85       Parameters.Add(new LookupParameter<DoubleMatrix>("Weights", "The weights matrix describes the flows between the equipments."));
    86       Parameters.Add(new LookupParameter<DoubleMatrix>("Distances", "The distances matrix describes the distances between the locations at which the equipment can be installed."));
    87       Parameters.Add(new LookupParameter<DoubleMatrix>("InstallationCosts", "The installation costs matrix describes the installation costs of installing equipment i at location j"));
    88       Parameters.Add(new LookupParameter<DoubleArray>("Demands", "The demands vector describes the space requirements of the equipments."));
    89       Parameters.Add(new LookupParameter<DoubleArray>("Capacities", "The capacities vector describes the available space at the locations."));
    90       Parameters.Add(new LookupParameter<IntegerVector>("Assignment", "The vector that encodes the assignment."));
     91      Parameters.Add(new LookupParameter<BoolValue>("Maximization", GeneralizedQuadraticAssignmentProblem.MaximizationDescription));
     92      Parameters.Add(new LookupParameter<DoubleValue>("Quality", QualityDescription));
     93      Parameters.Add(new LookupParameter<DoubleValue>("FlowDistanceQuality", FlowDistanceQualityDescription));
     94      Parameters.Add(new LookupParameter<DoubleValue>("InstallationQuality", InstallationQualityDescription));
     95      Parameters.Add(new LookupParameter<DoubleValue>("OverbookedCapacity", OverbookedCapacityDescription));
     96      Parameters.Add(new ValueLookupParameter<DoubleValue>("TransportationCosts", GeneralizedQuadraticAssignmentProblem.TransportationCostsDescription));
     97      Parameters.Add(new ValueLookupParameter<DoubleValue>("OverbookedCapacityPenalty", GeneralizedQuadraticAssignmentProblem.OverbookedCapacityPenaltyDescription));
     98      Parameters.Add(new LookupParameter<DoubleMatrix>("Weights", GeneralizedQuadraticAssignmentProblem.WeightsDescription));
     99      Parameters.Add(new LookupParameter<DoubleMatrix>("Distances", GeneralizedQuadraticAssignmentProblem.DistancesDescription));
     100      Parameters.Add(new LookupParameter<DoubleMatrix>("InstallationCosts", GeneralizedQuadraticAssignmentProblem.InstallationCostsDescription));
     101      Parameters.Add(new LookupParameter<DoubleArray>("Demands", GeneralizedQuadraticAssignmentProblem.DemandsDescription));
     102      Parameters.Add(new LookupParameter<DoubleArray>("Capacities", GeneralizedQuadraticAssignmentProblem.CapacitiesDescription));
     103      Parameters.Add(new LookupParameter<IntegerVector>("Assignment", GQAPSolutionCreator.AssignmentDescription));
    91104    }
    92105
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Evaluators/GQAPNMoveEvaluator.cs

    r7413 r7419  
    2727using HeuristicLab.Encodings.IntegerVectorEncoding;
    2828using HeuristicLab.Operators;
     29using HeuristicLab.Optimization;
    2930using HeuristicLab.Parameters;
    3031using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    3334  [Item("GQAPNMoveEvaluator", "Evaluates an n-move.")]
    3435  [StorableClass]
    35   public class GQAPNMoveEvaluator : SingleSuccessorOperator, IGQAPNMoveEvaluator {
    36 
     36  public class GQAPNMoveEvaluator : SingleSuccessorOperator, IGQAPNMoveEvaluator, IAssignmentAwareGQAPOperator,
     37  IQualityAwareGQAPOperator, ITransportationCostsAwareGQAPOperator,
     38  IOverbookedCapacityPenaltyAwareGQAPOperator, IWeightsAwareGQAPOperator, IDistancesAwareGQAPOperator,
     39  IInstallationCostsAwareGQAPOperator, IDemandsAwareGQAPOperator, ICapacitiesAwareGQAPOperator {
     40
     41    #region Parameter Descriptions
     42    public static readonly string MoveQualityDescription = "The quality of the move if it would be applied.";
     43    public static readonly string MoveFlowDistanceQualityDescription = "The quality of the move regarding the flow-distance criteria.";
     44    public static readonly string MoveInstallationQualityDescription = "The quality of the move regarding the installation costs.";
     45    public static readonly string MoveOverbookedCapacityDescription = "The sum of the overbooked capacities of the move relative to the capacity of each location.";
     46    #endregion
     47
     48    #region Parameter Properties
     49    ILookupParameter<BoolValue> IQualityAwareGQAPOperator.MaximizationParameter {
     50      get { return MaximizationParameter; }
     51    }
     52    ILookupParameter<BoolValue> IGQAPMoveEvaluator.MaximizationParameter {
     53      get { return MaximizationParameter; }
     54    }
     55    public ILookupParameter<BoolValue> MaximizationParameter {
     56      get { return (ILookupParameter<BoolValue>)Parameters["Maximization"]; }
     57    }
     58    public ILookupParameter<DoubleValue> MoveQualityParameter {
     59      get { return (ILookupParameter<DoubleValue>)Parameters["MoveQuality"]; }
     60    }
     61    public ILookupParameter<DoubleValue> MoveFlowDistanceQualityParameter {
     62      get { return (ILookupParameter<DoubleValue>)Parameters["MoveFlowDistanceQuality"]; }
     63    }
     64    public ILookupParameter<DoubleValue> MoveInstallationQualityParameter {
     65      get { return (ILookupParameter<DoubleValue>)Parameters["MoveInstallationQuality"]; }
     66    }
     67    public ILookupParameter<DoubleValue> MoveOverbookedCapacityParameter {
     68      get { return (ILookupParameter<DoubleValue>)Parameters["MoveOverbookedCapacity"]; }
     69    }
     70    public ILookupParameter<NMove> MoveParameter {
     71      get { return (ILookupParameter<NMove>)Parameters["Move"]; }
     72    }
    3773    public ILookupParameter<IntegerVector> AssignmentParameter {
    3874      get { return (ILookupParameter<IntegerVector>)Parameters["Assignment"]; }
    3975    }
    40     public ILookupParameter<NMove> MoveParameter {
    41       get { return (ILookupParameter<NMove>)Parameters["Move"]; }
     76    ILookupParameter<DoubleValue> ISingleObjectiveMoveEvaluator.QualityParameter {
     77      get { return QualityParameter; }
     78    }
     79    ILookupParameter<DoubleValue> IQualityAwareGQAPOperator.QualityParameter {
     80      get { return QualityParameter; }
    4281    }
    4382    public ILookupParameter<DoubleValue> QualityParameter {
     
    5392      get { return (ILookupParameter<DoubleValue>)Parameters["OverbookedCapacity"]; }
    5493    }
    55     public ILookupParameter<DoubleValue> MoveQualityParameter {
    56       get { return (ILookupParameter<DoubleValue>)Parameters["MoveQuality"]; }
    57     }
    58     public ILookupParameter<DoubleValue> MoveFlowDistanceQualityParameter {
    59       get { return (ILookupParameter<DoubleValue>)Parameters["MoveFlowDistanceQuality"]; }
    60     }
    61     public ILookupParameter<DoubleValue> MoveInstallationQualityParameter {
    62       get { return (ILookupParameter<DoubleValue>)Parameters["MoveInstallationQuality"]; }
    63     }
    64     public ILookupParameter<DoubleValue> MoveOverbookedCapacityParameter {
    65       get { return (ILookupParameter<DoubleValue>)Parameters["MoveOverbookedCapacity"]; }
    66     }
    6794    public IValueLookupParameter<DoubleValue> TransportationCostsParameter {
    6895      get { return (IValueLookupParameter<DoubleValue>)Parameters["TransportationCosts"]; }
     
    86113      get { return (ILookupParameter<DoubleArray>)Parameters["Capacities"]; }
    87114    }
     115    #endregion
    88116
    89117    [StorableConstructor]
     
    92120    public GQAPNMoveEvaluator()
    93121      : base() {
    94       Parameters.Add(new LookupParameter<IntegerVector>("Assignment", "The equipment-location assignment vector."));
    95       Parameters.Add(new LookupParameter<NMove>("Move", "The move to perform."));
    96       Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The solution quality."));
    97       Parameters.Add(new LookupParameter<DoubleValue>("FlowDistanceQuality", "The quality regarding the flow-distance criteria."));
    98       Parameters.Add(new LookupParameter<DoubleValue>("InstallationQuality", "The quality regarding the installation costs."));
    99       Parameters.Add(new LookupParameter<DoubleValue>("OverbookedCapacity", "The sum of the overbooked capacities relative to the capacity of each location."));
    100       Parameters.Add(new LookupParameter<DoubleValue>("MoveQuality", "The quality of the move if it would be applied."));
    101       Parameters.Add(new LookupParameter<DoubleValue>("MoveFlowDistanceQuality", "The quality of the move regarding the flow-distance criteria."));
    102       Parameters.Add(new LookupParameter<DoubleValue>("MoveInstallationQuality", "The quality of the move regarding the installation costs."));
    103       Parameters.Add(new LookupParameter<DoubleValue>("MoveOverbookedCapacity", "The sum of the overbooked capacities of the move relative to the capacity of each location."));
    104       Parameters.Add(new ValueLookupParameter<DoubleValue>("OverbookedCapacityPenalty", "The multiplier for the constraint violation when added to the quality."));
    105       Parameters.Add(new ValueLookupParameter<DoubleValue>("TransportationCosts", "The transportation cost represents the flow-unit per distance-unit cost factor. This value can also be set to 1 if these costs are factored into the weights or distance matrix already."));
    106       Parameters.Add(new LookupParameter<DoubleMatrix>("Weights", "The weights matrix describes the flows between the equipments."));
    107       Parameters.Add(new LookupParameter<DoubleMatrix>("Distances", "The distances matrix describes the distances between the locations at which the equipment can be installed."));
    108       Parameters.Add(new LookupParameter<DoubleMatrix>("InstallationCosts", "The installation costs matrix describes the installation costs of installing equipment i at location j"));
    109       Parameters.Add(new LookupParameter<DoubleArray>("Demands", "The demands vector describes the space requirements of the equipments."));
    110       Parameters.Add(new LookupParameter<DoubleArray>("Capacities", "The capacities vector describes the available space at the locations."));
     122      Parameters.Add(new LookupParameter<IntegerVector>("Assignment", GQAPSolutionCreator.AssignmentDescription));
     123      Parameters.Add(new LookupParameter<NMove>("Move", GQAPNMoveGenerator.MoveDescription));
     124      Parameters.Add(new LookupParameter<BoolValue>("Maximization", GeneralizedQuadraticAssignmentProblem.MaximizationDescription));
     125      Parameters.Add(new LookupParameter<DoubleValue>("Quality", GQAPEvaluator.QualityDescription));
     126      Parameters.Add(new LookupParameter<DoubleValue>("FlowDistanceQuality", GQAPEvaluator.FlowDistanceQualityDescription));
     127      Parameters.Add(new LookupParameter<DoubleValue>("InstallationQuality", GQAPEvaluator.InstallationQualityDescription));
     128      Parameters.Add(new LookupParameter<DoubleValue>("OverbookedCapacity", GQAPEvaluator.OverbookedCapacityDescription));
     129      Parameters.Add(new LookupParameter<DoubleValue>("MoveQuality", MoveQualityDescription));
     130      Parameters.Add(new LookupParameter<DoubleValue>("MoveFlowDistanceQuality", MoveFlowDistanceQualityDescription));
     131      Parameters.Add(new LookupParameter<DoubleValue>("MoveInstallationQuality", MoveInstallationQualityDescription));
     132      Parameters.Add(new LookupParameter<DoubleValue>("MoveOverbookedCapacity", MoveOverbookedCapacityDescription));
     133      Parameters.Add(new ValueLookupParameter<DoubleValue>("OverbookedCapacityPenalty", GeneralizedQuadraticAssignmentProblem.OverbookedCapacityPenaltyDescription));
     134      Parameters.Add(new ValueLookupParameter<DoubleValue>("TransportationCosts", GeneralizedQuadraticAssignmentProblem.TransportationCostsDescription));
     135      Parameters.Add(new LookupParameter<DoubleMatrix>("Weights", GeneralizedQuadraticAssignmentProblem.WeightsDescription));
     136      Parameters.Add(new LookupParameter<DoubleMatrix>("Distances", GeneralizedQuadraticAssignmentProblem.DistancesDescription));
     137      Parameters.Add(new LookupParameter<DoubleMatrix>("InstallationCosts", GeneralizedQuadraticAssignmentProblem.InstallationCostsDescription));
     138      Parameters.Add(new LookupParameter<DoubleArray>("Demands", GeneralizedQuadraticAssignmentProblem.DemandsDescription));
     139      Parameters.Add(new LookupParameter<DoubleArray>("Capacities", GeneralizedQuadraticAssignmentProblem.CapacitiesDescription));
    111140    }
    112141
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/GeneralizedQuadraticAssignmentProblem.cs

    r7418 r7419  
    3737  [StorableClass]
    3838  public sealed class GeneralizedQuadraticAssignmentProblem : SingleObjectiveHeuristicOptimizationProblem<IGQAPEvaluator, IGQAPSolutionCreator>, IStorableContent {
     39
    3940    public override Image ItemImage {
    4041      get { return HeuristicLab.Common.Resources.VSImageLibrary.Type; }
     
    4243
    4344    public string Filename { get; set; }
     45
     46    #region Parameter Descriptions
     47    public static readonly string MaximizationDescription = "False if the fitness function should be minimized (default) or otherwise True if it should be maximized.";
     48    public static readonly string WeightsDescription = "The weights matrix describes the flows between the equipments.";
     49    public static readonly string DistancesDescription = "The distances matrix describes the distances between the locations at which the equipment can be installed.";
     50    public static readonly string InstallationCostsDescription = "The installation costs matrix describes the installation costs of installing equipment i at location j";
     51    public static readonly string DemandsDescription = "The demands vector describes the space requirements of the equipments.";
     52    public static readonly string CapacitiesDescription = "The capacities vector describes the available space at the locations.";
     53    public static readonly string TransportationCostsDescription = "The transportation cost represents the flow-unit per distance-unit cost factor. This value can also be set to 1 if these costs are factored into the weights matrix already.";
     54    public static readonly string OverbookedCapacityPenaltyDescription = "The multiplier for the constraint violation when added to the quality.";
     55    public static readonly string BestKnownSolutionDescription = "The best known solution (if available)";
     56    public static readonly string EquipmentNamesDescription = "Optional: A list of names that describes the equipments.";
     57    public static readonly string LocationNamesDescription = "Optional: A list of names that describes the locations.";
     58    #endregion
    4459
    4560    #region Parameter Properties
     
    130145    public GeneralizedQuadraticAssignmentProblem()
    131146      : base(new GQAPEvaluator(), new RandomSolutionCreator()) {
    132       Parameters.Add(new ValueParameter<DoubleMatrix>("Weights", "The weights matrix describes the flows between the equipments.", new DoubleMatrix()));
    133       Parameters.Add(new ValueParameter<DoubleMatrix>("Distances", "The distances matrix describes the distances between the locations at which the equipment can be installed.", new DoubleMatrix()));
    134       Parameters.Add(new ValueParameter<DoubleMatrix>("InstallationCosts", "The installation costs matrix describes the installation costs of installing equipment i at location j", new DoubleMatrix()));
    135       Parameters.Add(new FixedValueParameter<DoubleValue>("TransportationCosts", "The transportation cost represents the flow-unit per distance-unit cost factor. This value can also be set to 1 if these costs are factored into the weights matrix already.", new DoubleValue(1)));
    136       Parameters.Add(new FixedValueParameter<DoubleValue>("OverbookedCapacityPenalty", "The multiplier for the constraint violation when added to the quality.", new DoubleValue(1000)));
    137       Parameters.Add(new ValueParameter<DoubleArray>("Demands", "The demands vector describes the space requirements of the equipments.", new DoubleArray()));
    138       Parameters.Add(new ValueParameter<DoubleArray>("Capacities", "The capacities vector describes the available space at the locations.", new DoubleArray()));
    139       Parameters.Add(new OptionalValueParameter<IItem>("BestKnownSolution", "The best known solution (if available)", null));
    140       Parameters.Add(new OptionalValueParameter<StringArray>("EquipmentNames", "Optional: A list of names that describes the equipments.", null, false));
    141       Parameters.Add(new OptionalValueParameter<StringArray>("LocationNames", "Optional: A list of names that describes the locations.", null, false));
     147      Parameters.Add(new ValueParameter<DoubleMatrix>("Weights", WeightsDescription, new DoubleMatrix()));
     148      Parameters.Add(new ValueParameter<DoubleMatrix>("Distances", DistancesDescription, new DoubleMatrix()));
     149      Parameters.Add(new ValueParameter<DoubleMatrix>("InstallationCosts", InstallationCostsDescription, new DoubleMatrix()));
     150      Parameters.Add(new FixedValueParameter<DoubleValue>("TransportationCosts", TransportationCostsDescription, new DoubleValue(1)));
     151      Parameters.Add(new FixedValueParameter<DoubleValue>("OverbookedCapacityPenalty", OverbookedCapacityPenaltyDescription, new DoubleValue(1000)));
     152      Parameters.Add(new ValueParameter<DoubleArray>("Demands", DemandsDescription, new DoubleArray()));
     153      Parameters.Add(new ValueParameter<DoubleArray>("Capacities", CapacitiesDescription, new DoubleArray()));
     154      Parameters.Add(new OptionalValueParameter<IItem>("BestKnownSolution", BestKnownSolutionDescription, null));
     155      Parameters.Add(new OptionalValueParameter<StringArray>("EquipmentNames", EquipmentNamesDescription, null, false));
     156      Parameters.Add(new OptionalValueParameter<StringArray>("LocationNames", LocationNamesDescription, null, false));
    142157
    143158      WeightsParameter.ReactOnValueToStringChangedAndValueItemImageChanged = false;
     
    223238
    224239    private void Parameterize() {
    225       Evaluator.WeightsParameter.ActualName = WeightsParameter.Name;
    226       Evaluator.DistancesParameter.ActualName = DistancesParameter.Name;
    227       Evaluator.InstallationCostsParameter.ActualName = InstallationCostsParameter.Name;
    228       Evaluator.TransportationCostsParameter.ActualName = TransportationCostsParameter.Name;
    229       Evaluator.DemandsParameter.ActualName = DemandsParameter.Name;
    230       Evaluator.CapacitiesParameter.ActualName = CapacitiesParameter.Name;
    231       Evaluator.AssignmentParameter.ActualName = SolutionCreator.AssignmentParameter.ActualName;
    232 
    233       SolutionCreator.DemandsParameter.ActualName = DemandsParameter.Name;
    234       SolutionCreator.CapacitiesParameter.ActualName = CapacitiesParameter.Name;
    235 
    236       foreach (var op in Operators.OfType<IEquipmentAwareGQAPOperator>()) {
     240
     241      var operators = Operators.Union(new IOperator[] { SolutionCreator, Evaluator }).ToArray();
     242
     243      foreach (var op in operators.OfType<IAssignmentAwareGQAPOperator>()) {
     244        op.AssignmentParameter.ActualName = SolutionCreator.AssignmentParameter.ActualName;
     245      }
     246      foreach (var op in operators.OfType<IAssignmentsAwareGQAPOperator>()) {
     247        op.AssignmentParameter.ActualName = SolutionCreator.AssignmentParameter.ActualName;
     248      }
     249      foreach (var op in operators.OfType<IBestKnownQualityAwareGQAPOperator>()) {
     250        op.BestKnownQualityParameter.ActualName = BestKnownQualityParameter.Name;
     251      }
     252      foreach (var op in operators.OfType<IBestKnownSolutionAwareGQAPOperator>()) {
     253        op.BestKnownSolutionParameter.ActualName = BestKnownSolutionParameter.Name;
     254      }
     255      foreach (var op in operators.OfType<ICapacitiesAwareGQAPOperator>()) {
     256        op.CapacitiesParameter.ActualName = CapacitiesParameter.Name;
     257      }
     258      foreach (var op in operators.OfType<IDemandsAwareGQAPOperator>()) {
    237259        op.DemandsParameter.ActualName = DemandsParameter.Name;
    238260      }
    239       foreach (var op in Operators.OfType<IGQAPCrossover>()) {
     261      foreach (var op in operators.OfType<IDistancesAwareGQAPOperator>()) {
     262        op.DistancesParameter.ActualName = DistancesParameter.Name;
     263      }
     264      foreach (var op in operators.OfType<IEquipmentNamesAwareGQAPOperator>()) {
     265        op.EquipmentNamesParameter.ActualName = EquipmentNamesParameter.Name;
     266      }
     267      foreach (var op in operators.OfType<IGQAPCrossover>()) {
    240268        op.ParentsParameter.ActualName = SolutionCreator.AssignmentParameter.ActualName;
    241269        op.ChildParameter.ActualName = SolutionCreator.AssignmentParameter.ActualName;
    242270      }
    243       foreach (var op in Operators.OfType<IGQAPEvaluationOperator>()) {
    244         op.AssignmentParameter.ActualName = SolutionCreator.AssignmentParameter.ActualName;
    245         op.TransportationCostsParameter.ActualName = TransportationCostsParameter.Name;
     271      foreach (var op in operators.OfType<IInstallationCostsAwareGQAPOperator>()) {
     272        op.InstallationCostsParameter.ActualName = InstallationCostsParameter.Name;
     273      }
     274      foreach (var op in operators.OfType<ILocationNamesAwareGQAPOperator>()) {
     275        op.LocationNamesParameter.ActualName = LocationNamesParameter.Name;
     276      }
     277      var moveEvaluator = operators.OfType<IGQAPMoveEvaluator>().FirstOrDefault();
     278      foreach (var op in operators.OfType<IGQAPMoveEvaluator>()) { // synchronize all move evaluators
     279        if (moveEvaluator != null) {
     280          op.MoveQualityParameter.ActualName = moveEvaluator.MoveQualityParameter.ActualName;
     281          op.MoveFlowDistanceQualityParameter.ActualName = moveEvaluator.MoveFlowDistanceQualityParameter.ActualName;
     282          op.MoveInstallationQualityParameter.ActualName = moveEvaluator.MoveInstallationQualityParameter.ActualName;
     283          op.MoveOverbookedCapacityParameter.ActualName = moveEvaluator.MoveOverbookedCapacityParameter.ActualName;
     284        }
     285      }
     286      foreach (var op in operators.OfType<IMoveQualityAwareGQAPOperator>()) {
     287        if (moveEvaluator != null) {
     288          op.MoveQualityParameter.ActualName = moveEvaluator.MoveQualityParameter.ActualName;
     289          op.MoveFlowDistanceQualityParameter.ActualName = moveEvaluator.MoveFlowDistanceQualityParameter.ActualName;
     290          op.MoveInstallationQualityParameter.ActualName = moveEvaluator.MoveInstallationQualityParameter.ActualName;
     291          op.MoveOverbookedCapacityParameter.ActualName = moveEvaluator.MoveOverbookedCapacityParameter.ActualName;
     292        }
     293        op.MaximizationParameter.ActualName = MaximizationParameter.Name;
     294      }
     295      foreach (var op in operators.OfType<IOverbookedCapacityPenaltyAwareGQAPOperator>()) {
    246296        op.OverbookedCapacityPenaltyParameter.ActualName = OverbookedCapacityPenaltyParameter.Name;
    247         op.WeightsParameter.ActualName = WeightsParameter.Name;
    248         op.DistancesParameter.ActualName = DistancesParameter.Name;
    249         op.InstallationCostsParameter.ActualName = InstallationCostsParameter.Name;
    250         op.DemandsParameter.ActualName = DemandsParameter.Name;
    251         op.CapacitiesParameter.ActualName = CapacitiesParameter.Name;
    252       }
    253       foreach (var op in Operators.OfType<IGQAPLocalImprovementOperator>()) {
    254         op.AssignmentParameter.ActualName = SolutionCreator.AssignmentParameter.ActualName;
     297      }
     298      foreach (var op in operators.OfType<IQualitiesAwareGQAPOperator>()) {
    255299        op.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
    256300        op.FlowDistanceQualityParameter.ActualName = Evaluator.FlowDistanceQualityParameter.ActualName;
    257301        op.InstallationQualityParameter.ActualName = Evaluator.InstallationQualityParameter.ActualName;
    258302        op.OverbookedCapacityParameter.ActualName = Evaluator.OverbookedCapacityParameter.ActualName;
     303        op.MaximizationParameter.ActualName = MaximizationParameter.Name;
     304      }
     305      foreach (var op in operators.OfType<IQualityAwareGQAPOperator>()) {
     306        op.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
     307        op.FlowDistanceQualityParameter.ActualName = Evaluator.FlowDistanceQualityParameter.ActualName;
     308        op.InstallationQualityParameter.ActualName = Evaluator.InstallationQualityParameter.ActualName;
     309        op.OverbookedCapacityParameter.ActualName = Evaluator.OverbookedCapacityParameter.ActualName;
     310        op.MaximizationParameter.ActualName = MaximizationParameter.Name;
     311      }
     312      foreach (var op in operators.OfType<ITransportationCostsAwareGQAPOperator>()) {
    259313        op.TransportationCostsParameter.ActualName = TransportationCostsParameter.Name;
    260         op.OverbookedCapacityPenaltyParameter.ActualName = OverbookedCapacityPenaltyParameter.Name;
     314      }
     315      foreach (var op in operators.OfType<IWeightsAwareGQAPOperator>()) {
    261316        op.WeightsParameter.ActualName = WeightsParameter.Name;
    262         op.DistancesParameter.ActualName = DistancesParameter.Name;
    263         op.InstallationCostsParameter.ActualName = InstallationCostsParameter.Name;
    264         op.DemandsParameter.ActualName = DemandsParameter.Name;
    265         op.CapacitiesParameter.ActualName = CapacitiesParameter.Name;
    266       }
    267       foreach (var op in Operators.OfType<IGQAPManipulator>()) {
    268         op.AssignmentParameter.ActualName = SolutionCreator.AssignmentParameter.ActualName;
    269       }
    270       foreach (var op in Operators.OfType<IGQAPMerger>()) {
    271         op.AssignmentParameter.ActualName = SolutionCreator.AssignmentParameter.ActualName;
    272         op.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
    273         op.MaximizationParameter.ActualName = MaximizationParameter.Name;
    274       }
    275       foreach (var op in Operators.OfType<IGQAPMoveOperator>()) {
    276         op.AssignmentParameter.ActualName = SolutionCreator.AssignmentParameter.ActualName;
    277       }
    278       foreach (var op in Operators.OfType<ILocationAwareGQAPOperator>()) {
    279         op.CapacitiesParameter.ActualName = CapacitiesParameter.Name;
    280       }
    281 
    282       foreach (var op in Operators.OfType<IIntegerVectorCrossover>()) {
     317      }
     318
     319      foreach (var op in operators.OfType<IIntegerVectorCrossover>()) {
    283320        op.ParentsParameter.ActualName = SolutionCreator.AssignmentParameter.ActualName;
    284321        op.ChildParameter.ActualName = SolutionCreator.AssignmentParameter.ActualName;
    285322      }
    286       foreach (var op in Operators.OfType<IIntegerVectorManipulator>()) {
     323      foreach (var op in operators.OfType<IIntegerVectorManipulator>()) {
    287324        op.IntegerVectorParameter.ActualName = SolutionCreator.AssignmentParameter.ActualName;
    288       }
    289 
    290       if (BestSolutionAnalyzer != null) {
    291         BestSolutionAnalyzer.MaximizationParameter.ActualName = MaximizationParameter.Name;
    292         BestSolutionAnalyzer.DistancesParameter.ActualName = DistancesParameter.Name;
    293         BestSolutionAnalyzer.WeightsParameter.ActualName = WeightsParameter.Name;
    294         BestSolutionAnalyzer.InstallationCostsParameter.ActualName = InstallationCostsParameter.Name;
    295         BestSolutionAnalyzer.DemandsParameter.ActualName = DemandsParameter.Name;
    296         BestSolutionAnalyzer.CapacitiesParameter.ActualName = CapacitiesParameter.Name;
    297         BestSolutionAnalyzer.TransportationCostsParameter.ActualName = TransportationCostsParameter.Name;
    298         BestSolutionAnalyzer.OverbookedCapacityPenaltyParameter.ActualName = OverbookedCapacityPenaltyParameter.Name;
    299         BestSolutionAnalyzer.AssignmentParameter.ActualName = SolutionCreator.AssignmentParameter.ActualName;
    300         BestSolutionAnalyzer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
    301         BestSolutionAnalyzer.FlowDistanceQualityParameter.ActualName = Evaluator.FlowDistanceQualityParameter.ActualName;
    302         BestSolutionAnalyzer.InstallationQualityParameter.ActualName = Evaluator.InstallationQualityParameter.ActualName;
    303         BestSolutionAnalyzer.OverbookedCapacityParameter.ActualName = Evaluator.OverbookedCapacityParameter.ActualName;
    304         BestSolutionAnalyzer.ResultsParameter.ActualName = "Results";
    305         BestSolutionAnalyzer.BestKnownQualityParameter.ActualName = BestKnownQualityParameter.Name;
    306         BestSolutionAnalyzer.BestKnownSolutionParameter.ActualName = BestKnownSolutionParameter.Name;
    307         BestSolutionAnalyzer.EquipmentNamesParameter.ActualName = EquipmentNamesParameter.Name;
    308         BestSolutionAnalyzer.LocationNamesParameter.ActualName = LocationNamesParameter.Name;
    309       }
    310       if (SolutionArchiveAnalyzer != null) {
    311         SolutionArchiveAnalyzer.MaximizationParameter.ActualName = MaximizationParameter.Name;
    312         SolutionArchiveAnalyzer.DistancesParameter.ActualName = DistancesParameter.Name;
    313         SolutionArchiveAnalyzer.WeightsParameter.ActualName = WeightsParameter.Name;
    314         SolutionArchiveAnalyzer.InstallationCostsParameter.ActualName = InstallationCostsParameter.Name;
    315         SolutionArchiveAnalyzer.DemandsParameter.ActualName = DemandsParameter.Name;
    316         SolutionArchiveAnalyzer.CapacitiesParameter.ActualName = CapacitiesParameter.Name;
    317         SolutionArchiveAnalyzer.TransportationCostsParameter.ActualName = TransportationCostsParameter.Name;
    318         SolutionArchiveAnalyzer.OverbookedCapacityPenaltyParameter.ActualName = OverbookedCapacityPenaltyParameter.Name;
    319         SolutionArchiveAnalyzer.AssignmentParameter.ActualName = SolutionCreator.AssignmentParameter.ActualName;
    320         SolutionArchiveAnalyzer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
    321         SolutionArchiveAnalyzer.FlowDistanceQualityParameter.ActualName = Evaluator.FlowDistanceQualityParameter.ActualName;
    322         SolutionArchiveAnalyzer.InstallationQualityParameter.ActualName = Evaluator.InstallationQualityParameter.ActualName;
    323         SolutionArchiveAnalyzer.OverbookedCapacityParameter.ActualName = Evaluator.OverbookedCapacityParameter.ActualName;
    324         SolutionArchiveAnalyzer.ResultsParameter.ActualName = "Results";
    325         SolutionArchiveAnalyzer.BestKnownQualityParameter.ActualName = BestKnownQualityParameter.Name;
    326         SolutionArchiveAnalyzer.BestKnownSolutionParameter.ActualName = BestKnownSolutionParameter.Name;
    327         SolutionArchiveAnalyzer.EquipmentNamesParameter.ActualName = EquipmentNamesParameter.Name;
    328         SolutionArchiveAnalyzer.LocationNamesParameter.ActualName = LocationNamesParameter.Name;
    329325      }
    330326    }
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/HeuristicLab.Problems.GeneralizedQuadraticAssignment-3.3.csproj

    r7418 r7419  
    9999    <Compile Include="GQAPIntegerVectorProximityCalculator.cs" />
    100100    <Compile Include="GQAPSolution.cs" />
    101     <Compile Include="Interfaces\IGQAPMerger.cs" />
     101    <Compile Include="Interfaces\IQualitiesAwareGQAPOperator.cs" />
     102    <Compile Include="Interfaces\IAssignmentsAwareGQAPOperator.cs" />
     103    <Compile Include="Interfaces\IBestKnownQualityAwareGQAPOperator.cs" />
     104    <Compile Include="Interfaces\IBestKnownSolutionAwareGQAPOperator.cs" />
     105    <Compile Include="Interfaces\ILocationNamesAwareGQAPOperator.cs" />
     106    <Compile Include="Interfaces\IEquipmentNamesAwareGQAPOperator.cs" />
     107    <Compile Include="Interfaces\IMoveQualityAwareGQAPOperator.cs" />
     108    <Compile Include="Interfaces\IGQAPEvaluator.cs" />
     109    <Compile Include="Interfaces\IQualityAwareGQAPOperator.cs" />
     110    <Compile Include="Interfaces\IOverbookedCapacityPenaltyAwareGQAPOperator.cs" />
     111    <Compile Include="Interfaces\ITransportationCostsAwareGQAPOperator.cs" />
     112    <Compile Include="Interfaces\IInstallationCostsAwareGQAPOperator.cs" />
     113    <Compile Include="Interfaces\IDistancesAwareGQAPOperator.cs" />
     114    <Compile Include="Interfaces\IWeightsAwareGQAPOperator.cs" />
     115    <Compile Include="Interfaces\IAssignmentAwareGQAPOperator.cs" />
    102116    <Compile Include="Interfaces\IGQAPNMoveEvaluator.cs" />
    103     <Compile Include="Interfaces\IEquipmentAwareGQAPOperator.cs" />
     117    <Compile Include="Interfaces\IDemandsAwareGQAPOperator.cs" />
    104118    <Compile Include="Interfaces\IGQAPCrossover.cs" />
    105     <Compile Include="Interfaces\IGQAPEvaluationOperator.cs" />
    106     <Compile Include="Interfaces\IGQAPEvaluator.cs" />
    107119    <Compile Include="Interfaces\IGQAPLocalImprovementOperator.cs" />
    108     <Compile Include="Interfaces\IGQAPManipulator.cs" />
    109120    <Compile Include="Interfaces\IGQAPMoveEvaluator.cs" />
    110121    <Compile Include="Interfaces\IGQAPMoveOperator.cs" />
     
    112123    <Compile Include="Interfaces\IGQAPOperator.cs" />
    113124    <Compile Include="Interfaces\IGQAPSolutionCreator.cs" />
    114     <Compile Include="Interfaces\ILocationAwareGQAPOperator.cs" />
     125    <Compile Include="Interfaces\ICapacitiesAwareGQAPOperator.cs" />
    115126    <Compile Include="Moves\NMove.cs" />
    116127    <Compile Include="Moves\GQAPMoveGenerator.cs" />
     
    120131    <Compile Include="Moves\StochasticNMoveSingleMoveGenerator.cs" />
    121132    <Compile Include="Operators\ApproximateLocalSearch.cs" />
     133    <Compile Include="Operators\GQAPPathRelinking.cs" />
    122134    <Compile Include="Operators\GQAPStochasticSolutionCreator.cs" />
    123135    <Compile Include="Operators\DemandEquivalentSwapEquipmentManipluator.cs" />
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Interfaces/IGQAPEvaluator.cs

    r7412 r7419  
    2525
    2626namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment {
    27   public interface IGQAPEvaluator : IGQAPEvaluationOperator, ISingleObjectiveEvaluator {
     27  public interface IGQAPEvaluator : ISingleObjectiveEvaluator {
     28    ILookupParameter<BoolValue> MaximizationParameter { get; }
    2829    ILookupParameter<DoubleValue> FlowDistanceQualityParameter { get; }
    2930    ILookupParameter<DoubleValue> InstallationQualityParameter { get; }
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Interfaces/IGQAPLocalImprovementOperator.cs

    r7412 r7419  
    2222using HeuristicLab.Core;
    2323using HeuristicLab.Data;
    24 using HeuristicLab.Encodings.IntegerVectorEncoding;
    2524using HeuristicLab.Optimization;
    2625
    2726namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment {
    28   public interface IGQAPLocalImprovementOperator : IGQAPOperator, ILocalImprovementOperator {
    29     ILookupParameter<DoubleValue> QualityParameter { get; }
    30     ILookupParameter<DoubleValue> FlowDistanceQualityParameter { get; }
    31     ILookupParameter<DoubleValue> InstallationQualityParameter { get; }
    32     ILookupParameter<DoubleValue> OverbookedCapacityParameter { get; }
     27  public interface IGQAPLocalImprovementOperator : ILocalImprovementOperator {
    3328    IValueLookupParameter<IntValue> MaximumCandidateListSizeParameter { get; }
    34     IValueLookupParameter<IntValue> MaximumSampleSizeParameter { get; }
    35     ILookupParameter<IntegerVector> AssignmentParameter { get; }
    36     ILookupParameter<DoubleMatrix> WeightsParameter { get; }
    37     ILookupParameter<DoubleMatrix> DistancesParameter { get; }
    38     ILookupParameter<DoubleMatrix> InstallationCostsParameter { get; }
    39     ILookupParameter<DoubleArray> DemandsParameter { get; }
    40     ILookupParameter<DoubleArray> CapacitiesParameter { get; }
    41     IValueLookupParameter<DoubleValue> TransportationCostsParameter { get; }
    42     IValueLookupParameter<DoubleValue> OverbookedCapacityPenaltyParameter { get; }
    4329  }
    4430}
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Interfaces/IGQAPMoveEvaluator.cs

    r7412 r7419  
    2525
    2626namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment {
    27   public interface IGQAPMoveEvaluator : IGQAPEvaluationOperator, ISingleObjectiveMoveEvaluator {
    28     ILookupParameter<DoubleValue> FlowDistanceQualityParameter { get; }
    29     ILookupParameter<DoubleValue> InstallationQualityParameter { get; }
    30     ILookupParameter<DoubleValue> OverbookedCapacityParameter { get; }
     27  public interface IGQAPMoveEvaluator : IGQAPMoveOperator, ISingleObjectiveMoveEvaluator {
     28    ILookupParameter<BoolValue> MaximizationParameter { get; }
     29    ILookupParameter<DoubleValue> MoveFlowDistanceQualityParameter { get; }
     30    ILookupParameter<DoubleValue> MoveInstallationQualityParameter { get; }
     31    ILookupParameter<DoubleValue> MoveOverbookedCapacityParameter { get; }
    3132  }
    3233}
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Interfaces/IGQAPMoveOperator.cs

    r7407 r7419  
    2020#endregion
    2121
    22 using HeuristicLab.Core;
    23 using HeuristicLab.Encodings.IntegerVectorEncoding;
    2422using HeuristicLab.Optimization;
    2523
    2624namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment {
    27   public interface IGQAPMoveOperator : IGQAPOperator, IMoveOperator {
    28     ILookupParameter<IntegerVector> AssignmentParameter { get; }
    29   }
     25  public interface IGQAPMoveOperator : IMoveOperator { }
    3026}
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Interfaces/IGQAPSolutionCreator.cs

    r7373 r7419  
    2525
    2626namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment {
    27   public interface IGQAPSolutionCreator : IGQAPOperator, ISolutionCreator, ILocationAwareGQAPOperator, IEquipmentAwareGQAPOperator {
     27  public interface IGQAPSolutionCreator : ISolutionCreator {
    2828    ILookupParameter<IntegerVector> AssignmentParameter { get; }
    2929  }
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Moves/GQAPMoveGenerator.cs

    r7413 r7419  
    3131  [Item("GQAPMoveGenerator", "Base class for move generators for the Generalized Quadratic Assignment Problem.")]
    3232  [StorableClass]
    33   public abstract class GQAPMoveGenerator : SingleSuccessorOperator, IMoveGenerator, IGQAPMoveOperator {
     33  public abstract class GQAPMoveGenerator : SingleSuccessorOperator, IAssignmentAwareGQAPOperator, IMoveGenerator, IGQAPMoveOperator {
    3434
    3535    public ILookupParameter<IntegerVector> AssignmentParameter {
     
    4242    public GQAPMoveGenerator()
    4343      : base() {
    44       Parameters.Add(new LookupParameter<IntegerVector>("Assignment", "The current equipment-location assignment."));
     44      Parameters.Add(new LookupParameter<IntegerVector>("Assignment", GQAPSolutionCreator.AssignmentDescription));
    4545    }
    4646  }
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Moves/GQAPNMoveGenerator.cs

    r7413 r7419  
    3434  public abstract class GQAPNMoveGenerator : GQAPMoveGenerator, IGQAPNMoveOperator {
    3535
     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
    3640    public ILookupParameter<NMove> MoveParameter {
    3741      get { return (ILookupParameter<NMove>)Parameters["Move"]; }
     
    4650    public GQAPNMoveGenerator()
    4751      : base() {
    48       Parameters.Add(new LookupParameter<NMove>("Move", "The move to generate."));
     52      Parameters.Add(new LookupParameter<NMove>("Move", MoveDescription));
    4953      Parameters.Add(new ValueLookupParameter<IntValue>("N", "The maximum number of equipment(s) that should be moved.", new IntValue(2)));
    5054    }
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Moves/NMoveMaker.cs

    r7413 r7419  
    3232  [Item("NMoveMaker", "Performs an n-move.")]
    3333  [StorableClass]
    34   public class NMoveMaker : SingleSuccessorOperator, IGQAPNMoveOperator, IMoveMaker {
     34  public class NMoveMaker : SingleSuccessorOperator, IAssignmentAwareGQAPOperator, IQualityAwareGQAPOperator, IMoveQualityAwareGQAPOperator, IGQAPNMoveOperator, IMoveMaker {
    3535
    3636    public ILookupParameter<IntegerVector> AssignmentParameter {
     
    3939    public ILookupParameter<NMove> MoveParameter {
    4040      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"]; }
    4150    }
    4251    public ILookupParameter<DoubleValue> QualityParameter {
     
    7079    public NMoveMaker()
    7180      : 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));
    8292    }
    8393
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Moves/StochasticNMoveMultiMoveGenerator.cs

    r7413 r7419  
    3232  [Item("Stochastic n-move MultiMoveGenerator", "Randomly samples a number of n-moves.")]
    3333  [StorableClass]
    34   public class StochasticNMoveMultiMoveGenerator : GQAPNMoveGenerator, ILocationAwareGQAPOperator, IMultiMoveGenerator, IStochasticOperator {
     34  public class StochasticNMoveMultiMoveGenerator : GQAPNMoveGenerator, ICapacitiesAwareGQAPOperator, IStochasticOperator, IMultiMoveGenerator {
    3535
     36    public ILookupParameter<DoubleArray> CapacitiesParameter {
     37      get { return (ILookupParameter<DoubleArray>)Parameters["Capacities"]; }
     38    }
    3639    public ILookupParameter<IRandom> RandomParameter {
    3740      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
    38     }
    39     public ILookupParameter<DoubleArray> CapacitiesParameter {
    40       get { return (ILookupParameter<DoubleArray>)Parameters["Capacities"]; }
    4141    }
    4242    public IValueLookupParameter<IntValue> SampleSizeParameter {
     
    5050      : base() {
    5151      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));
    5353      Parameters.Add(new ValueLookupParameter<IntValue>("SampleSize", "The number of moves to generate."));
    5454    }
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Moves/StochasticNMoveSingleMoveGenerator.cs

    r7413 r7419  
    3232  [Item("Stochastic n-move SingleMoveGenerator", "Randomly samples a single n-move.")]
    3333  [StorableClass]
    34   public class StochasticNMoveSingleMoveGenerator : GQAPNMoveGenerator, ILocationAwareGQAPOperator, ISingleMoveGenerator, IStochasticOperator {
     34  public class StochasticNMoveSingleMoveGenerator : GQAPNMoveGenerator, ICapacitiesAwareGQAPOperator, IStochasticOperator, ISingleMoveGenerator {
    3535
     36    public ILookupParameter<DoubleArray> CapacitiesParameter {
     37      get { return (ILookupParameter<DoubleArray>)Parameters["Capacities"]; }
     38    }
    3639    public ILookupParameter<IRandom> RandomParameter {
    3740      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
    38     }
    39     public ILookupParameter<DoubleArray> CapacitiesParameter {
    40       get { return (ILookupParameter<DoubleArray>)Parameters["Capacities"]; }
    4141    }
    4242
     
    4747      : base() {
    4848      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));
    5050    }
    5151
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/ApproximateLocalSearch.cs

    r7412 r7419  
    3333
    3434namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment.Operators {
    35   [Item("ApproximateLocalSearch", @"The approximate local search is 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.
    36 
    37 The implementation differs slightly from Mateus et al. in that the maximumIterations parameter defines a cap on the number of steps that the local search can perform. While the maxSampleSize parameter corresponds to the maxItr parameter defined by Mateus et al.")]
     35  [Item("ApproximateLocalSearch", "The approximate local search is 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.")]
    3836  [StorableClass]
    39   public class ApproximateLocalSearch : SingleSuccessorOperator, IGQAPLocalImprovementOperator, IStochasticOperator {
     37  public class ApproximateLocalSearch : SingleSuccessorOperator, IDemandsAwareGQAPOperator, ICapacitiesAwareGQAPOperator,
     38    IWeightsAwareGQAPOperator, IDistancesAwareGQAPOperator, IInstallationCostsAwareGQAPOperator,
     39    ITransportationCostsAwareGQAPOperator, IOverbookedCapacityPenaltyAwareGQAPOperator,
     40    IAssignmentAwareGQAPOperator, IQualityAwareGQAPOperator, IGQAPLocalImprovementOperator, IStochasticOperator {
    4041    public IProblem Problem { get; set; }
    4142    public Type ProblemType {
     
    4344    }
    4445
     46    public ILookupParameter<DoubleArray> DemandsParameter {
     47      get { return (ILookupParameter<DoubleArray>)Parameters["Demands"]; }
     48    }
     49    public ILookupParameter<DoubleArray> CapacitiesParameter {
     50      get { return (ILookupParameter<DoubleArray>)Parameters["Capacities"]; }
     51    }
     52    public ILookupParameter<DoubleMatrix> WeightsParameter {
     53      get { return (ILookupParameter<DoubleMatrix>)Parameters["Weights"]; }
     54    }
     55    public ILookupParameter<DoubleMatrix> DistancesParameter {
     56      get { return (ILookupParameter<DoubleMatrix>)Parameters["Distances"]; }
     57    }
     58    public ILookupParameter<DoubleMatrix> InstallationCostsParameter {
     59      get { return (ILookupParameter<DoubleMatrix>)Parameters["InstallationCosts"]; }
     60    }
     61    public IValueLookupParameter<DoubleValue> TransportationCostsParameter {
     62      get { return (IValueLookupParameter<DoubleValue>)Parameters["TransportationCosts"]; }
     63    }
     64    public IValueLookupParameter<DoubleValue> OverbookedCapacityPenaltyParameter {
     65      get { return (IValueLookupParameter<DoubleValue>)Parameters["OverbookedCapacityPenalty"]; }
     66    }
     67    public ILookupParameter<IntegerVector> AssignmentParameter {
     68      get { return (ILookupParameter<IntegerVector>)Parameters["Assignment"]; }
     69    }
     70    public ILookupParameter<BoolValue> MaximizationParameter {
     71      get { return (ILookupParameter<BoolValue>)Parameters["Maximization"]; }
     72    }
     73    public ILookupParameter<DoubleValue> QualityParameter {
     74      get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
     75    }
     76    public ILookupParameter<DoubleValue> FlowDistanceQualityParameter {
     77      get { return (ILookupParameter<DoubleValue>)Parameters["FlowDistanceQuality"]; }
     78    }
     79    public ILookupParameter<DoubleValue> InstallationQualityParameter {
     80      get { return (ILookupParameter<DoubleValue>)Parameters["InstallationQuality"]; }
     81    }
     82    public ILookupParameter<DoubleValue> OverbookedCapacityParameter {
     83      get { return (ILookupParameter<DoubleValue>)Parameters["OverbookedCapacity"]; }
     84    }
     85    public IValueLookupParameter<IntValue> MaximumIterationsParameter {
     86      get { return (IValueLookupParameter<IntValue>)Parameters["MaximumIterations"]; }
     87    }
     88    public ILookupParameter<IntValue> EvaluatedSolutionsParameter {
     89      get { return (ILookupParameter<IntValue>)Parameters["EvaluatedSolutions"]; }
     90    }
    4591    public ILookupParameter<IRandom> RandomParameter {
    4692      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
    4793    }
    48     public IValueLookupParameter<IntValue> MaximumIterationsParameter {
    49       get { return (IValueLookupParameter<IntValue>)Parameters["MaximumIterations"]; }
    50     }
    51     public ILookupParameter<IntValue> EvaluatedSolutionsParameter {
    52       get { return (ILookupParameter<IntValue>)Parameters["EvaluatedSolutions"]; }
    53     }
    54     public ILookupParameter<DoubleValue> QualityParameter {
    55       get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
    56     }
    57     public ILookupParameter<DoubleValue> FlowDistanceQualityParameter {
    58       get { return (ILookupParameter<DoubleValue>)Parameters["FlowDistanceQuality"]; }
    59     }
    60     public ILookupParameter<DoubleValue> InstallationQualityParameter {
    61       get { return (ILookupParameter<DoubleValue>)Parameters["InstallationQuality"]; }
    62     }
    63     public ILookupParameter<DoubleValue> OverbookedCapacityParameter {
    64       get { return (ILookupParameter<DoubleValue>)Parameters["OverbookedCapacity"]; }
     94    public IValueLookupParameter<IntValue> MaximumCandidateListSizeParameter {
     95      get { return (IValueLookupParameter<IntValue>)Parameters["MaximumCandidateListSize"]; }
     96    }
     97    public IValueLookupParameter<PercentValue> OneMoveProbabilityParameter {
     98      get { return (IValueLookupParameter<PercentValue>)Parameters["OneMoveProbability"]; }
    6599    }
    66100    public ILookupParameter<ResultCollection> ResultsParameter {
    67101      get { return (ILookupParameter<ResultCollection>)Parameters["Results"]; }
    68     }
    69     public IValueLookupParameter<IntValue> MaximumCandidateListSizeParameter {
    70       get { return (IValueLookupParameter<IntValue>)Parameters["MaximumCandidateListSize"]; }
    71     }
    72     public IValueLookupParameter<IntValue> MaximumSampleSizeParameter {
    73       get { return (IValueLookupParameter<IntValue>)Parameters["MaximumSampleSize"]; }
    74     }
    75     public ILookupParameter<IntegerVector> AssignmentParameter {
    76       get { return (ILookupParameter<IntegerVector>)Parameters["Assignment"]; }
    77     }
    78     public ILookupParameter<DoubleMatrix> WeightsParameter {
    79       get { return (ILookupParameter<DoubleMatrix>)Parameters["Weights"]; }
    80     }
    81     public ILookupParameter<DoubleMatrix> DistancesParameter {
    82       get { return (ILookupParameter<DoubleMatrix>)Parameters["Distances"]; }
    83     }
    84     public ILookupParameter<DoubleMatrix> InstallationCostsParameter {
    85       get { return (ILookupParameter<DoubleMatrix>)Parameters["InstallationCosts"]; }
    86     }
    87     public ILookupParameter<DoubleArray> DemandsParameter {
    88       get { return (ILookupParameter<DoubleArray>)Parameters["Demands"]; }
    89     }
    90     public ILookupParameter<DoubleArray> CapacitiesParameter {
    91       get { return (ILookupParameter<DoubleArray>)Parameters["Capacities"]; }
    92     }
    93     public IValueLookupParameter<DoubleValue> TransportationCostsParameter {
    94       get { return (IValueLookupParameter<DoubleValue>)Parameters["TransportationCosts"]; }
    95     }
    96     public IValueLookupParameter<DoubleValue> OverbookedCapacityPenaltyParameter {
    97       get { return (IValueLookupParameter<DoubleValue>)Parameters["OverbookedCapacityPenalty"]; }
    98     }
    99     public IValueLookupParameter<PercentValue> OneMoveProbabilityParameter {
    100       get { return (IValueLookupParameter<PercentValue>)Parameters["OneMoveProbability"]; }
    101102    }
    102103
     
    106107    public ApproximateLocalSearch()
    107108      : base() {
    108       Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator to use."));
     109      Parameters.Add(new LookupParameter<DoubleArray>("Demands", GeneralizedQuadraticAssignmentProblem.DemandsDescription));
     110      Parameters.Add(new LookupParameter<DoubleArray>("Capacities", GeneralizedQuadraticAssignmentProblem.CapacitiesDescription));
     111      Parameters.Add(new LookupParameter<DoubleMatrix>("Weights", GeneralizedQuadraticAssignmentProblem.WeightsDescription));
     112      Parameters.Add(new LookupParameter<DoubleMatrix>("Distances", GeneralizedQuadraticAssignmentProblem.DistancesDescription));
     113      Parameters.Add(new LookupParameter<DoubleMatrix>("InstallationCosts", GeneralizedQuadraticAssignmentProblem.InstallationCostsDescription));
     114      Parameters.Add(new ValueLookupParameter<DoubleValue>("TransportationCosts", GeneralizedQuadraticAssignmentProblem.TransportationCostsDescription));
     115      Parameters.Add(new ValueLookupParameter<DoubleValue>("OverbookedCapacityPenalty", GeneralizedQuadraticAssignmentProblem.OverbookedCapacityPenaltyDescription));
     116      Parameters.Add(new LookupParameter<IntegerVector>("Assignment", GQAPSolutionCreator.AssignmentDescription));
     117      Parameters.Add(new LookupParameter<BoolValue>("Maximization", GeneralizedQuadraticAssignmentProblem.MaximizationDescription));
     118      Parameters.Add(new LookupParameter<DoubleValue>("Quality", GQAPEvaluator.QualityDescription));
     119      Parameters.Add(new LookupParameter<DoubleValue>("FlowDistanceQuality", GQAPEvaluator.FlowDistanceQualityDescription));
     120      Parameters.Add(new LookupParameter<DoubleValue>("InstallationQuality", GQAPEvaluator.InstallationQualityDescription));
     121      Parameters.Add(new LookupParameter<DoubleValue>("OverbookedCapacity", GQAPEvaluator.OverbookedCapacityDescription));
    109122      Parameters.Add(new ValueLookupParameter<IntValue>("MaximumIterations", "The maximum number of iterations that should be performed."));
    110123      Parameters.Add(new LookupParameter<IntValue>("EvaluatedSolutions", "The number of evaluated solution equivalents."));
    111       Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The solution quality."));
    112       Parameters.Add(new LookupParameter<DoubleValue>("FlowDistanceQuality", "The quality regarding the flow-distance criteria."));
    113       Parameters.Add(new LookupParameter<DoubleValue>("InstallationQuality", "The quality regarding the installation costs."));
    114       Parameters.Add(new LookupParameter<DoubleValue>("OverbookedCapacity", "The sum of the overbooked capacities relative to the capacity of each location."));
     124      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator to use."));
     125      Parameters.Add(new ValueLookupParameter<IntValue>("MaximumCandidateListSize", "The maximum number of candidates that should be found in each step.", new IntValue(10)));
     126      Parameters.Add(new ValueLookupParameter<PercentValue>("OneMoveProbability", "The probability for performing a 1-move, which is the opposite of performing a 2-move.", new PercentValue(.5)));
    115127      Parameters.Add(new LookupParameter<ResultCollection>("Results", "The result collection that stores the results."));
    116       Parameters.Add(new ValueLookupParameter<IntValue>("MaximumCandidateListSize", "The maximum number of candidates that should be found in each step.", new IntValue(10)));
    117       Parameters.Add(new ValueLookupParameter<IntValue>("MaximumSampleSize", "The maximum number of candidates that should be sampled in each step.", new IntValue(100)));
    118       Parameters.Add(new LookupParameter<IntegerVector>("Assignment", "The equipment-location assignment vector."));
    119       Parameters.Add(new LookupParameter<DoubleMatrix>("Weights", "The weights matrix describes the flows between the equipments."));
    120       Parameters.Add(new LookupParameter<DoubleMatrix>("Distances", "The distances matrix describes the distances between the locations at which the equipment can be installed."));
    121       Parameters.Add(new LookupParameter<DoubleMatrix>("InstallationCosts", "The installation costs matrix describes the installation costs of installing equipment i at location j."));
    122       Parameters.Add(new LookupParameter<DoubleArray>("Demands", "The demands vector describes the space requirements of the equipments."));
    123       Parameters.Add(new LookupParameter<DoubleArray>("Capacities", "The capacities vector describes the available space at the locations."));
    124       Parameters.Add(new ValueLookupParameter<DoubleValue>("TransportationCosts", "The transportation cost represents the flow-unit per distance-unit cost factor. This value can also be set to 1 if these costs are factored into the weights matrix already."));
    125       Parameters.Add(new ValueLookupParameter<DoubleValue>("OverbookedCapacityPenalty", "The multiplier for the constraint violation when added to the quality."));
    126       Parameters.Add(new ValueLookupParameter<PercentValue>("OneMoveProbability", "The probability for performing a 1-move, which is the opposite of performing a 2-move.", new PercentValue(.5)));
    127128    }
    128129
     
    143144    /// <param name="overbookedCapacity">The sum of the overbooked capacities relative to the capacity of each location.</param>
    144145    /// <param name="maxCLS">The maximum number of candidates that should be found in each step.</param>
    145     /// <param name="maxSampleSize">The maximum number of candidates that should be sampled in each step.</param>
    146     /// <param name="maximumIterations">The maximum number of iterations that should be performed.</param>
     146    /// <param name="maximumIterations">The maximum number of iterations that should be performed each time the candidate list is generated.</param>
    147147    /// <param name="weights">The weights matrix describes the flows between the equipments.</param>
    148148    /// <param name="distances">The distances matrix describes the distances between the locations at which the equipment can be installed.</param>
     
    155155    public static void Apply(IRandom random, IntegerVector assignment,
    156156      DoubleValue quality, DoubleValue flowDistanceQuality, DoubleValue installationQuality, DoubleValue overbookedCapacity,
    157       IntValue maxCLS, IntValue maxSampleSize, IntValue maximumIterations,
     157      IntValue maxCLS, IntValue maximumIterations,
    158158      DoubleMatrix weights, DoubleMatrix distances, DoubleMatrix installationCosts, DoubleArray demands, DoubleArray capacities,
    159159      DoubleValue transportationCosts, DoubleValue overbookedCapacityPenalty, PercentValue oneMoveProbability) {
    160160
    161       for (int i = 0; i < maximumIterations.Value; i++) {
     161      while (true) {
    162162        int count = 0;
    163163        var CLS = new List<Tuple<NMove, double, double, double, double>>();
     
    180180          }
    181181          count++;
    182         } while (CLS.Count < maxCLS.Value && count < maxSampleSize.Value);
     182        } while (CLS.Count < maxCLS.Value && count < maximumIterations.Value);
    183183
    184184        if (CLS.Count == 0)
     
    211211        OverbookedCapacityParameter.ActualValue,
    212212        MaximumCandidateListSizeParameter.ActualValue,
    213         MaximumSampleSizeParameter.ActualValue,
    214213        MaximumIterationsParameter.ActualValue,
    215214        WeightsParameter.ActualValue, DistancesParameter.ActualValue,
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/DemandEquivalentSwapEquipmentManipluator.cs

    r7407 r7419  
    3535  [Item("DemandEquivalentSwapEquipmentManipluator", "Swaps equipment X from location A with as much equipments from location B that the demand of X is less than or equal to the demand of the swapped equipments in B.")]
    3636  [StorableClass]
    37   public class DemandEquivalentSwapEquipmentManipluator : GQAPManipulator, ILocationAwareGQAPOperator, IEquipmentAwareGQAPOperator {
     37  public class DemandEquivalentSwapEquipmentManipluator : GQAPManipulator, IDemandsAwareGQAPOperator, ICapacitiesAwareGQAPOperator {
    3838
     39    public ILookupParameter<DoubleArray> DemandsParameter {
     40      get { return (ILookupParameter<DoubleArray>)Parameters["Demands"]; }
     41    }
    3942    public ILookupParameter<DoubleArray> CapacitiesParameter {
    4043      get { return (ILookupParameter<DoubleArray>)Parameters["Capacities"]; }
    41     }
    42     public ILookupParameter<DoubleArray> DemandsParameter {
    43       get { return (ILookupParameter<DoubleArray>)Parameters["Demands"]; }
    4444    }
    4545
     
    4949    public DemandEquivalentSwapEquipmentManipluator()
    5050      : base() {
    51       Parameters.Add(new LookupParameter<DoubleArray>("Capacities", "The capacities vector describes the available space at the locations."));
    52       Parameters.Add(new LookupParameter<DoubleArray>("Demands", "The demands vector describes the space requirements of the equipments."));
     51      Parameters.Add(new LookupParameter<DoubleArray>("Demands", GeneralizedQuadraticAssignmentProblem.DemandsDescription));
     52      Parameters.Add(new LookupParameter<DoubleArray>("Capacities", GeneralizedQuadraticAssignmentProblem.CapacitiesDescription));
    5353    }
    5454
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/DiscreteLocationCrossover.cs

    r7413 r7419  
    3333  [Item("DiscreteLocationCrossover", "Combines the assignment to locations from various parents.")]
    3434  [StorableClass]
    35   public class DiscreteLocationCrossover : GQAPCrossover, ILocationAwareGQAPOperator {
     35  public class DiscreteLocationCrossover : GQAPCrossover, ICapacitiesAwareGQAPOperator {
    3636
    3737    public ILookupParameter<DoubleArray> CapacitiesParameter {
     
    4545    public DiscreteLocationCrossover()
    4646      : base() {
    47       Parameters.Add(new LookupParameter<DoubleArray>("Capacities", "The capacities vector describes the available space at the locations."));
     47      Parameters.Add(new LookupParameter<DoubleArray>("Capacities", GeneralizedQuadraticAssignmentProblem.CapacitiesDescription));
    4848    }
    4949
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/GQAPCrossover.cs

    r7319 r7419  
    3636      get { return false; }
    3737    }
    38     public ILookupParameter<IRandom> RandomParameter {
    39       get { return (LookupParameter<IRandom>)Parameters["Random"]; }
    40     }
     38
    4139    public IScopeTreeLookupParameter<IntegerVector> ParentsParameter {
    4240      get { return (ScopeTreeLookupParameter<IntegerVector>)Parameters["Parents"]; }
     
    4442    public ILookupParameter<IntegerVector> ChildParameter {
    4543      get { return (ILookupParameter<IntegerVector>)Parameters["Child"]; }
     44    }
     45    public ILookupParameter<IRandom> RandomParameter {
     46      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
    4647    }
    4748
     
    5152    protected GQAPCrossover()
    5253      : base() {
    53       Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic crossover operators."));
    5454      Parameters.Add(new ScopeTreeLookupParameter<IntegerVector>("Parents", "The parent vectors which should be crossed.", "Assignment"));
    5555      Parameters.Add(new LookupParameter<IntegerVector>("Child", "The child vector resulting from the crossover.", "Assignment"));
     56      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic crossover operators."));
    5657    }
    5758
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/GQAPManipulator.cs

    r7418 r7419  
    3131  [Item("GQAPManipulator", "A base class for operators that manipulate assignment vectors of the GeneralizedQuadraticAssignment problems.")]
    3232  [StorableClass]
    33   public abstract class GQAPManipulator : SingleSuccessorOperator, IGQAPManipulator, IStochasticOperator {
     33  public abstract class GQAPManipulator : SingleSuccessorOperator, IAssignmentAwareGQAPOperator, IManipulator, IStochasticOperator {
    3434    public override bool CanChangeName {
    3535      get { return false; }
    3636    }
     37
     38    public ILookupParameter<IntegerVector> AssignmentParameter {
     39      get { return (ILookupParameter<IntegerVector>)Parameters["Assignment"]; }
     40    }
    3741    public ILookupParameter<IRandom> RandomParameter {
    3842      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
    39     }
    40     public ILookupParameter<IntegerVector> AssignmentParameter {
    41       get { return (ILookupParameter<IntegerVector>)Parameters["IntegerVector"]; }
    4243    }
    4344
     
    4748    protected GQAPManipulator()
    4849      : base() {
     50      Parameters.Add(new LookupParameter<IntegerVector>("Assignment", GQAPSolutionCreator.AssignmentDescription));
    4951      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators."));
    50       Parameters.Add(new LookupParameter<IntegerVector>("IntegerVector", "The assignment vector which should be manipulated."));
    5152    }
    5253
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/GQAPSolutionCreator.cs

    r7373 r7419  
    3131  [Item("GQAPSolutionCreator", "Base class for solution creators of the Generalized Quadratic Assignment Problem.")]
    3232  [StorableClass]
    33   public abstract class GQAPSolutionCreator : SingleSuccessorOperator, IGQAPSolutionCreator {
     33  public abstract class GQAPSolutionCreator : SingleSuccessorOperator, IDemandsAwareGQAPOperator, ICapacitiesAwareGQAPOperator, IGQAPSolutionCreator {
     34
     35    #region Parameter Descriptions
     36    public static readonly string AssignmentDescription = "The vector that encodes the assignment.";
     37    #endregion
    3438
    3539    public ILookupParameter<IntegerVector> AssignmentParameter {
    3640      get { return (ILookupParameter<IntegerVector>)Parameters["Assignment"]; }
    3741    }
     42    public ILookupParameter<DoubleArray> DemandsParameter {
     43      get { return (ILookupParameter<DoubleArray>)Parameters["Demands"]; }
     44    }
    3845    public ILookupParameter<DoubleArray> CapacitiesParameter {
    3946      get { return (ILookupParameter<DoubleArray>)Parameters["Capacities"]; }
    40     }
    41     public ILookupParameter<DoubleArray> DemandsParameter {
    42       get { return (ILookupParameter<DoubleArray>)Parameters["Demands"]; }
    4347    }
    4448
     
    4953    public GQAPSolutionCreator()
    5054      : base() {
    51       Parameters.Add(new LookupParameter<IntegerVector>("Assignment", "Creates an assignment for the Generalized Quadratic Assignment Problem."));
    52       Parameters.Add(new LookupParameter<DoubleArray>("Capacities", "The capacities vector describes the available space at the locations."));
    53       Parameters.Add(new LookupParameter<DoubleArray>("Demands", "The demands vector describes the space requirements of the equipments."));
     55      Parameters.Add(new LookupParameter<IntegerVector>("Assignment", AssignmentDescription));
     56      Parameters.Add(new LookupParameter<DoubleArray>("Demands", GeneralizedQuadraticAssignmentProblem.DemandsDescription));
     57      Parameters.Add(new LookupParameter<DoubleArray>("Capacities", GeneralizedQuadraticAssignmentProblem.CapacitiesDescription));
    5458    }
    5559
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/NMoveShakingOperator.cs

    r7418 r7419  
    3232  [Item("NMoveShakingOperator", "Performs a number of shaking operations that increase in strength.")]
    3333  [StorableClass]
    34   public class NMoveShakingOperator : SingleSuccessorOperator, ILocationAwareGQAPOperator, IGQAPOperator, IMultiNeighborhoodShakingOperator, IStochasticOperator {
     34  public class NMoveShakingOperator : SingleSuccessorOperator, IAssignmentAwareGQAPOperator, ICapacitiesAwareGQAPOperator, IMultiNeighborhoodShakingOperator, IStochasticOperator {
    3535
    36     public ILookupParameter<IRandom> RandomParameter {
    37       get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
    38     }
    3936    public ILookupParameter<IntegerVector> AssignmentParameter {
    4037      get { return (ILookupParameter<IntegerVector>)Parameters["Assignment"]; }
     38    }
     39    public ILookupParameter<DoubleArray> CapacitiesParameter {
     40      get { return (ILookupParameter<DoubleArray>)Parameters["Capacities"]; }
    4141    }
    4242    public IValueLookupParameter<IntValue> CurrentNeighborhoodIndexParameter {
     
    4646      get { return (ILookupParameter<IntValue>)Parameters["NeighborhoodCount"]; }
    4747    }
    48     public ILookupParameter<DoubleArray> CapacitiesParameter {
    49       get { return (ILookupParameter<DoubleArray>)Parameters["Capacities"]; }
     48    public ILookupParameter<IRandom> RandomParameter {
     49      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
    5050    }
    5151
     
    5454    protected NMoveShakingOperator(NMoveShakingOperator original, Cloner cloner) : base(original, cloner) { }
    5555    public NMoveShakingOperator() {
    56       Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator to use."));
    57       Parameters.Add(new LookupParameter<IntegerVector>("Assignment", "The equipment-location assignment vector."));
     56      Parameters.Add(new LookupParameter<IntegerVector>("Assignment", GQAPSolutionCreator.AssignmentDescription));
     57      Parameters.Add(new LookupParameter<DoubleArray>("Capacities", GeneralizedQuadraticAssignmentProblem.CapacitiesDescription));
    5858      Parameters.Add(new ValueLookupParameter<IntValue>("CurrentNeighborhoodIndex", "The index of the operator that should be applied (k)."));
    5959      Parameters.Add(new LookupParameter<IntValue>("NeighborhoodCount", "The number of operators that are available."));
    60       Parameters.Add(new LookupParameter<DoubleArray>("Capacities", "The capacities vector describes the available space at the locations."));
     60      Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator to use."));
    6161    }
    6262
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/QualitySimilarityMerger.cs

    r7412 r7419  
    2929using HeuristicLab.Parameters;
    3030using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     31using HeuristicLab.Problems.GeneralizedQuadraticAssignment.Common;
    3132
    3233namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment.Operators {
    3334  [Item("QualitySimilarityMerger", "Merges two populations by using quality and similarity information to maintain a population of high quality, but also diverse solutions.")]
    3435  [StorableClass]
    35   public class QualitySimilarityMerger : SingleSuccessorOperator, IGQAPMerger {
     36  public class QualitySimilarityMerger : SingleSuccessorOperator, IAssignmentAwareGQAPOperator, IQualityAwareGQAPOperator, IMerger {
    3637    public ILookupParameter<IntegerVector> AssignmentParameter {
    3738      get { return (ILookupParameter<IntegerVector>)Parameters["Assignment"]; }
     39    }
     40    public ILookupParameter<BoolValue> MaximizationParameter {
     41      get { return (ILookupParameter<BoolValue>)Parameters["Maximization"]; }
    3842    }
    3943    public ILookupParameter<DoubleValue> QualityParameter {
    4044      get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
    4145    }
     46    public ILookupParameter<DoubleValue> FlowDistanceQualityParameter {
     47      get { return (ILookupParameter<DoubleValue>)Parameters["FlowDistanceQuality"]; }
     48    }
     49    public ILookupParameter<DoubleValue> InstallationQualityParameter {
     50      get { return (ILookupParameter<DoubleValue>)Parameters["InstallationQuality"]; }
     51    }
     52    public ILookupParameter<DoubleValue> OverbookedCapacityParameter {
     53      get { return (ILookupParameter<DoubleValue>)Parameters["OverbookedCapacity"]; }
     54    }
    4255    public ILookupParameter<IntValue> PopulationSizeParameter {
    4356      get { return (ILookupParameter<IntValue>)Parameters["PopulationSize"]; }
    44     }
    45     public IValueLookupParameter<BoolValue> MaximizationParameter {
    46       get { return (IValueLookupParameter<BoolValue>)Parameters["Maximization"]; }
    4757    }
    4858
     
    5262    public QualitySimilarityMerger()
    5363      : base() {
    54       Parameters.Add(new LookupParameter<IntegerVector>("Assignment", "The equipment-location assignment."));
    55       Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of a solution."));
     64      Parameters.Add(new LookupParameter<IntegerVector>("Assignment", GQAPSolutionCreator.AssignmentDescription));
     65      Parameters.Add(new LookupParameter<BoolValue>("Maximization", GeneralizedQuadraticAssignmentProblem.MaximizationDescription));
     66      Parameters.Add(new LookupParameter<DoubleValue>("Quality", GQAPEvaluator.QualityDescription));
     67      Parameters.Add(new LookupParameter<DoubleValue>("FlowDistanceQuality", GQAPEvaluator.FlowDistanceQualityDescription));
     68      Parameters.Add(new LookupParameter<DoubleValue>("InstallationQuality", GQAPEvaluator.InstallationQualityDescription));
     69      Parameters.Add(new LookupParameter<DoubleValue>("OverbookedCapacity", GQAPEvaluator.OverbookedCapacityDescription));
    5670      Parameters.Add(new LookupParameter<IntValue>("PopulationSize", "The size of the population that should not be surpassed."));
    57       Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "True if the problem is to be maximized, false otherwise."));
    5871    }
    5972
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/RelocateEquipmentManipluator.cs

    r7407 r7419  
    3535  [Item("RelocateEquipmentManipluator", "Relocates a random equipment from an overstuffed location to a random one with space or a random equipment if constraints are satisfied.")]
    3636  [StorableClass]
    37   public class RelocateEquipmentManipluator : GQAPManipulator, ILocationAwareGQAPOperator, IEquipmentAwareGQAPOperator {
     37  public class RelocateEquipmentManipluator : GQAPManipulator, IDemandsAwareGQAPOperator, ICapacitiesAwareGQAPOperator {
    3838
    3939    public ILookupParameter<DoubleArray> CapacitiesParameter {
     
    4949    public RelocateEquipmentManipluator()
    5050      : base() {
    51       Parameters.Add(new LookupParameter<DoubleArray>("Capacities", "The capacities vector describes the available space at the locations."));
    52       Parameters.Add(new LookupParameter<DoubleArray>("Demands", "The demands vector describes the space requirements of the equipments."));
     51      Parameters.Add(new LookupParameter<DoubleArray>("Demands", GeneralizedQuadraticAssignmentProblem.DemandsDescription));
     52      Parameters.Add(new LookupParameter<DoubleArray>("Capacities", GeneralizedQuadraticAssignmentProblem.CapacitiesDescription));
    5353    }
    5454
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/SwapLocationManipulator.cs

    r7319 r7419  
    3333  [Item("SwapLocationManipluator", "Swaps two locations by exchanging all equipments between the locations.")]
    3434  [StorableClass]
    35   public class SwapLocationManipluator : GQAPManipulator, ILocationAwareGQAPOperator {
     35  public class SwapLocationManipluator : GQAPManipulator, ICapacitiesAwareGQAPOperator {
    3636
    3737    public ILookupParameter<DoubleArray> CapacitiesParameter {
     
    4444    public SwapLocationManipluator()
    4545      : base() {
    46       Parameters.Add(new LookupParameter<DoubleArray>("Capacities", "The capacities vector describes the available space at the locations."));
     46      Parameters.Add(new LookupParameter<DoubleArray>("Capacities", GeneralizedQuadraticAssignmentProblem.CapacitiesDescription));
    4747    }
    4848
Note: See TracChangeset for help on using the changeset viewer.