Free cookie consent management tool by TermsFeed Policy Generator

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/Analyzers
Files:
2 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."));
Note: See TracChangeset for help on using the changeset viewer.