Changeset 7419 for branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Analyzers
- Timestamp:
- 01/27/12 13:24:36 (13 years ago)
- 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 37 37 [Item("Best GeneralizedQAP Solution Analyzer", "An operator for analyzing the best solution of Generalized Quadratic Assignment Problems.")] 38 38 [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 { 40 44 41 45 public bool EnabledByDefault { … … 43 47 } 44 48 45 public LookupParameter<BoolValue> MaximizationParameter {46 get { return ( LookupParameter<BoolValue>)Parameters["Maximization"]; }49 public IScopeTreeLookupParameter<IntegerVector> AssignmentParameter { 50 get { return (IScopeTreeLookupParameter<IntegerVector>)Parameters["Assignment"]; } 47 51 } 48 public LookupParameter<DoubleMatrix> DistancesParameter {49 get { return ( LookupParameter<DoubleMatrix>)Parameters["Distances"]; }52 public ILookupParameter<BoolValue> MaximizationParameter { 53 get { return (ILookupParameter<BoolValue>)Parameters["Maximization"]; } 50 54 } 51 public LookupParameter<DoubleMatrix> WeightsParameter {52 get { return ( LookupParameter<DoubleMatrix>)Parameters["Weights"]; }55 public IScopeTreeLookupParameter<DoubleValue> QualityParameter { 56 get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; } 53 57 } 54 public LookupParameter<DoubleMatrix> InstallationCostsParameter {55 get { return ( LookupParameter<DoubleMatrix>)Parameters["InstallationCosts"]; }58 public IScopeTreeLookupParameter<DoubleValue> FlowDistanceQualityParameter { 59 get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters["FlowDistanceQuality"]; } 56 60 } 57 public LookupParameter<DoubleArray> DemandsParameter {58 get { return ( LookupParameter<DoubleArray>)Parameters["Demands"]; }61 public IScopeTreeLookupParameter<DoubleValue> InstallationQualityParameter { 62 get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters["InstallationQuality"]; } 59 63 } 60 public LookupParameter<DoubleArray> CapacitiesParameter {61 get { return ( LookupParameter<DoubleArray>)Parameters["Capacities"]; }64 public IScopeTreeLookupParameter<DoubleValue> OverbookedCapacityParameter { 65 get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters["OverbookedCapacity"]; } 62 66 } 63 public LookupParameter<DoubleValue> TransportationCostsParameter {64 get { return ( LookupParameter<DoubleValue>)Parameters["TransportationCosts"]; }67 public ILookupParameter<DoubleMatrix> DistancesParameter { 68 get { return (ILookupParameter<DoubleMatrix>)Parameters["Distances"]; } 65 69 } 66 public LookupParameter<DoubleValue> OverbookedCapacityPenaltyParameter {67 get { return ( LookupParameter<DoubleValue>)Parameters["OverbookedCapacityPenalty"]; }70 public ILookupParameter<DoubleMatrix> WeightsParameter { 71 get { return (ILookupParameter<DoubleMatrix>)Parameters["Weights"]; } 68 72 } 69 public ScopeTreeLookupParameter<IntegerVector> AssignmentParameter {70 get { return ( ScopeTreeLookupParameter<IntegerVector>)Parameters["Assignment"]; }73 public ILookupParameter<DoubleMatrix> InstallationCostsParameter { 74 get { return (ILookupParameter<DoubleMatrix>)Parameters["InstallationCosts"]; } 71 75 } 72 public ScopeTreeLookupParameter<DoubleValue> QualityParameter {73 get { return ( ScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; }76 public ILookupParameter<DoubleArray> DemandsParameter { 77 get { return (ILookupParameter<DoubleArray>)Parameters["Demands"]; } 74 78 } 75 public ScopeTreeLookupParameter<DoubleValue> FlowDistanceQualityParameter {76 get { return ( ScopeTreeLookupParameter<DoubleValue>)Parameters["FlowDistanceQuality"]; }79 public ILookupParameter<DoubleArray> CapacitiesParameter { 80 get { return (ILookupParameter<DoubleArray>)Parameters["Capacities"]; } 77 81 } 78 public ScopeTreeLookupParameter<DoubleValue> InstallationQualityParameter {79 get { return ( ScopeTreeLookupParameter<DoubleValue>)Parameters["InstallationQuality"]; }82 public IValueLookupParameter<DoubleValue> TransportationCostsParameter { 83 get { return (IValueLookupParameter<DoubleValue>)Parameters["TransportationCosts"]; } 80 84 } 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"]; } 95 87 } 96 88 public ILookupParameter<StringArray> EquipmentNamesParameter { … … 99 91 public ILookupParameter<StringArray> LocationNamesParameter { 100 92 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"]; } 101 105 } 102 106 … … 115 119 Parameters.Add(new LookupParameter<DoubleArray>("Demands", "The demands of the equipments.")); 116 120 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.")); 119 123 Parameters.Add(new ScopeTreeLookupParameter<IntegerVector>("Assignment", "The GQAP solutions from which the best solution should be analyzed.")); 120 124 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 35 35 [Item("GeneralizedQAP Solution Archive Analyzer", "An operator for analyzing the archive of found solutions for the GQAP.")] 36 36 [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 { 38 42 39 43 public bool EnabledByDefault { 40 get { return true; }44 get { return false; } 41 45 } 42 46 43 public LookupParameter<BoolValue> MaximizationParameter {44 get { return ( LookupParameter<BoolValue>)Parameters["Maximization"]; }47 public IScopeTreeLookupParameter<IntegerVector> AssignmentParameter { 48 get { return (IScopeTreeLookupParameter<IntegerVector>)Parameters["Assignment"]; } 45 49 } 46 public LookupParameter<DoubleMatrix> DistancesParameter {47 get { return ( LookupParameter<DoubleMatrix>)Parameters["Distances"]; }50 public ILookupParameter<BoolValue> MaximizationParameter { 51 get { return (ILookupParameter<BoolValue>)Parameters["Maximization"]; } 48 52 } 49 public LookupParameter<DoubleMatrix> WeightsParameter {50 get { return ( LookupParameter<DoubleMatrix>)Parameters["Weights"]; }53 public IScopeTreeLookupParameter<DoubleValue> QualityParameter { 54 get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; } 51 55 } 52 public LookupParameter<DoubleMatrix> InstallationCostsParameter {53 get { return ( LookupParameter<DoubleMatrix>)Parameters["InstallationCosts"]; }56 public IScopeTreeLookupParameter<DoubleValue> FlowDistanceQualityParameter { 57 get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters["FlowDistanceQuality"]; } 54 58 } 55 public LookupParameter<DoubleArray> DemandsParameter {56 get { return ( LookupParameter<DoubleArray>)Parameters["Demands"]; }59 public IScopeTreeLookupParameter<DoubleValue> InstallationQualityParameter { 60 get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters["InstallationQuality"]; } 57 61 } 58 public LookupParameter<DoubleArray> CapacitiesParameter {59 get { return ( LookupParameter<DoubleArray>)Parameters["Capacities"]; }62 public IScopeTreeLookupParameter<DoubleValue> OverbookedCapacityParameter { 63 get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters["OverbookedCapacity"]; } 60 64 } 61 public LookupParameter<DoubleValue> TransportationCostsParameter {62 get { return ( LookupParameter<DoubleValue>)Parameters["TransportationCosts"]; }65 public ILookupParameter<DoubleMatrix> DistancesParameter { 66 get { return (ILookupParameter<DoubleMatrix>)Parameters["Distances"]; } 63 67 } 64 public LookupParameter<DoubleValue> OverbookedCapacityPenaltyParameter {65 get { return ( LookupParameter<DoubleValue>)Parameters["OverbookedCapacityPenalty"]; }68 public ILookupParameter<DoubleMatrix> WeightsParameter { 69 get { return (ILookupParameter<DoubleMatrix>)Parameters["Weights"]; } 66 70 } 67 public ScopeTreeLookupParameter<IntegerVector> AssignmentParameter {68 get { return ( ScopeTreeLookupParameter<IntegerVector>)Parameters["Assignment"]; }71 public ILookupParameter<DoubleMatrix> InstallationCostsParameter { 72 get { return (ILookupParameter<DoubleMatrix>)Parameters["InstallationCosts"]; } 69 73 } 70 public ScopeTreeLookupParameter<DoubleValue> QualityParameter {71 get { return ( ScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; }74 public ILookupParameter<DoubleArray> DemandsParameter { 75 get { return (ILookupParameter<DoubleArray>)Parameters["Demands"]; } 72 76 } 73 public ScopeTreeLookupParameter<DoubleValue> FlowDistanceQualityParameter {74 get { return ( ScopeTreeLookupParameter<DoubleValue>)Parameters["FlowDistanceQuality"]; }77 public ILookupParameter<DoubleArray> CapacitiesParameter { 78 get { return (ILookupParameter<DoubleArray>)Parameters["Capacities"]; } 75 79 } 76 public ScopeTreeLookupParameter<DoubleValue> InstallationQualityParameter {77 get { return ( ScopeTreeLookupParameter<DoubleValue>)Parameters["InstallationQuality"]; }80 public IValueLookupParameter<DoubleValue> TransportationCostsParameter { 81 get { return (IValueLookupParameter<DoubleValue>)Parameters["TransportationCosts"]; } 78 82 } 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"]; } 93 85 } 94 86 public ILookupParameter<StringArray> EquipmentNamesParameter { … … 97 89 public ILookupParameter<StringArray> LocationNamesParameter { 98 90 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"]; } 99 103 } 100 104 … … 113 117 Parameters.Add(new LookupParameter<DoubleArray>("Demands", "The demands of the equipments.")); 114 118 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.")); 117 121 Parameters.Add(new ScopeTreeLookupParameter<IntegerVector>("Assignment", "The GQAP solutions from which the best solution should be analyzed.")); 118 122 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.