- Timestamp:
- 02/03/12 10:11:07 (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
r7438 r7444 97 97 get { return (ILookupParameter<DoubleValue>)Parameters["BestKnownQuality"]; } 98 98 } 99 public ILookupParameter< IntegerVector> BestKnownSolutionParameter {100 get { return (ILookupParameter< IntegerVector>)Parameters["BestKnownSolution"]; }99 public ILookupParameter<GQAPSolution> BestKnownSolutionParameter { 100 get { return (ILookupParameter<GQAPSolution>)Parameters["BestKnownSolution"]; } 101 101 } 102 102 public ILookupParameter<GQAPAssignmentArchive> BestKnownSolutionsParameter { … … 135 135 Parameters.Add(new LookupParameter<StringArray>("LocationNames", GeneralizedQuadraticAssignmentProblem.LocationNamesDescription)); 136 136 Parameters.Add(new LookupParameter<DoubleValue>("BestKnownQuality", GeneralizedQuadraticAssignmentProblem.BestKnownQualityDescription)); 137 Parameters.Add(new LookupParameter< IntegerVector>("BestKnownSolution", GeneralizedQuadraticAssignmentProblem.BestKnownSolutionDescription));137 Parameters.Add(new LookupParameter<GQAPSolution>("BestKnownSolution", GeneralizedQuadraticAssignmentProblem.BestKnownSolutionDescription)); 138 138 Parameters.Add(new LookupParameter<GQAPAssignmentArchive>("BestKnownSolutions", GeneralizedQuadraticAssignmentProblem.BestKnownSolutionsDescription)); 139 139 Parameters.Add(new LookupParameter<GQAPAssignment>("BestSolution", "The best GQAP solution found so far.")); … … 168 168 if (bestKnownQuality == null || HasSolutionImproved(bestKnownQuality.Value, qualities[bestIndex].Value, maximization)) { 169 169 BestKnownQualityParameter.ActualValue = new DoubleValue(qualities[bestIndex].Value); 170 BestKnownSolutionParameter.ActualValue = (IntegerVector)assignments[bestIndex].Clone();170 BestKnownSolutionParameter.ActualValue = new GQAPSolution((IntegerVector)assignments[bestIndex].Clone(), qualities[bestIndex], flowDistanceQualities[bestIndex], installationQualities[bestIndex], overbookedCapacities[bestIndex]); 171 171 } 172 172 -
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Analyzers/GQAPSolutionArchiveAnalyzer.cs
r7438 r7444 40 40 IDemandsAwareGQAPOperator, ICapacitiesAwareGQAPOperator, ITransportationCostsAwareGQAPOperator, 41 41 IOverbookedCapacityPenaltyAwareGQAPOperator, IEquipmentNamesAwareGQAPOperator, ILocationNamesAwareGQAPOperator, 42 I BestKnownQualityAwareGQAPOperator, IBestKnownSolutionAwareGQAPOperator, IAnalyzer {42 IAnalyzer { 43 43 44 44 public bool EnabledByDefault { … … 91 91 get { return (ILookupParameter<StringArray>)Parameters["LocationNames"]; } 92 92 } 93 public ILookupParameter<DoubleValue> BestKnownQualityParameter {94 get { return (ILookupParameter<DoubleValue>)Parameters["BestKnownQuality"]; }95 }96 public ILookupParameter<IntegerVector> BestKnownSolutionParameter {97 get { return (ILookupParameter<IntegerVector>)Parameters["BestKnownSolution"]; }98 }99 93 public IValueLookupParameter<ResultCollection> ResultsParameter { 100 94 get { return (IValueLookupParameter<ResultCollection>)Parameters["Results"]; } … … 124 118 Parameters.Add(new LookupParameter<StringArray>("EquipmentNames", GeneralizedQuadraticAssignmentProblem.EquipmentNamesDescription)); 125 119 Parameters.Add(new LookupParameter<StringArray>("LocationNames", GeneralizedQuadraticAssignmentProblem.LocationNamesDescription)); 126 Parameters.Add(new LookupParameter<DoubleValue>("BestKnownQuality", GeneralizedQuadraticAssignmentProblem.BestKnownQualityDescription));127 Parameters.Add(new LookupParameter<IntegerVector>("BestKnownSolution", GeneralizedQuadraticAssignmentProblem.BestKnownSolutionDescription));128 120 Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The result collection where the best GQAP solution should be stored.")); 129 121 } … … 146 138 var results = ResultsParameter.ActualValue; 147 139 var maximization = MaximizationParameter.ActualValue.Value; 148 var bestKnownQuality = BestKnownQualityParameter.ActualValue;149 140 150 141 GQAPAssignmentArchive archive = results.ContainsKey("Solution Archive") ? results["Solution Archive"].Value as GQAPAssignmentArchive : null;
Note: See TracChangeset
for help on using the changeset viewer.