Changeset 12106
- Timestamp:
- 03/03/15 11:56:58 (10 years ago)
- Location:
- trunk/sources
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.RAPGA/3.3/RAPGA.cs
r12102 r12106 206 206 } 207 207 if (Parameters.ContainsKey("SimilarityCalculator")) { 208 #pragma warning disable 0618 208 209 var oldParameter = (IConstrainedValueParameter<ISingleObjectiveSolutionSimilarityCalculator>)Parameters["SimilarityCalculator"]; 210 #pragma warning restore 0618 209 211 Parameters.Remove(oldParameter); 210 212 var newParameter = new ConstrainedValueParameter<ISolutionSimilarityCalculator>("SimilarityCalculator", "The operator used to calculate the similarity between two solutions.", new ItemSet<ISolutionSimilarityCalculator>(oldParameter.ValidValues)); … … 508 510 SimilarityCalculatorParameter.ValidValues.Add(similarityCalculator); 509 511 512 if (!SimilarityCalculatorParameter.ValidValues.Any()) { 513 SimilarityCalculatorParameter.ValidValues.Add(new QualitySimilarityCalculator { QualityVariableName = Problem.Evaluator.QualityParameter.ActualName }); 514 SimilarityCalculatorParameter.ValidValues.Add(new NoSimilarityCalculator()); 515 } 516 510 517 if (oldSimilarityCalculator != null) { 511 518 ISolutionSimilarityCalculator similarityCalculator = SimilarityCalculatorParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldSimilarityCalculator.GetType()); -
trunk/sources/HeuristicLab.Algorithms.ScatterSearch/3.3/ScatterSearch.cs
r12102 r12106 163 163 #region Backwards compatible code, remove with 3.4 164 164 if (Parameters.ContainsKey("SimilarityCalculator")) { 165 #pragma warning disable 0618 165 166 var oldParameter = (IConstrainedValueParameter<ISingleObjectiveSolutionSimilarityCalculator>)Parameters["SimilarityCalculator"]; 167 #pragma warning restore 0618 166 168 Parameters.Remove(oldParameter); 167 169 var newParameter = new ConstrainedValueParameter<ISolutionSimilarityCalculator>("SimilarityCalculator", "The operator used to calculate the similarity between two solutions.", new ItemSet<ISolutionSimilarityCalculator>(oldParameter.ValidValues)); … … 408 410 SimilarityCalculatorParameter.ValidValues.Add(similarityCalculator); 409 411 412 if (!SimilarityCalculatorParameter.ValidValues.Any()) { 413 SimilarityCalculatorParameter.ValidValues.Add(new QualitySimilarityCalculator { QualityVariableName = Problem.Evaluator.QualityParameter.ActualName }); 414 SimilarityCalculatorParameter.ValidValues.Add(new NoSimilarityCalculator()); 415 } 416 410 417 if (oldSimilarityCalculator != null) { 411 418 ISolutionSimilarityCalculator similarityCalculator = SimilarityCalculatorParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldSimilarityCalculator.GetType()); -
trunk/sources/HeuristicLab.Optimization.Operators/3.3/SingleObjectiveSolutionSimilarityCalculator.cs
r12085 r12106 31 31 [Item("SimilarityCalculator", "A base class for items that perform similarity calculation between two solutions.")] 32 32 [StorableClass] 33 #pragma warning disable 0618 33 34 public abstract class SingleObjectiveSolutionSimilarityCalculator : SolutionSimilarityCalculator, ISingleObjectiveSolutionSimilarityCalculator { 35 #pragma warning restore 0618 34 36 [StorableConstructor] 35 37 protected SingleObjectiveSolutionSimilarityCalculator(bool deserializing) : base(deserializing) { }
Note: See TracChangeset
for help on using the changeset viewer.