Free cookie consent management tool by TermsFeed Policy Generator

Changeset 6540


Ignore:
Timestamp:
07/07/11 16:20:22 (13 years ago)
Author:
abeham
Message:

#1469

  • fixed backwards compatibility methods
Location:
trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/Analyzers/BestQAPSolutionAnalyzer.cs

    r6525 r6540  
    9393      #region Backwards compatible code, remove with 3.4
    9494      if (!Parameters.ContainsKey("BestKnownSolutions")) {
    95         Parameters.Add(new LookupParameter<ItemList<Permutation>>("BestKnownSolutions", "The best known solutions of this QAP instance."));
     95        Parameters.Add(new LookupParameter<ItemSet<Permutation>>("BestKnownSolutions", "The best known solutions of this QAP instance."));
     96      } else if (Parameters["BestKnownSolutions"].GetType().Equals(typeof(LookupParameter<ItemList<Permutation>>))) {
     97        string actualName = (Parameters["BestKnownSolutions"] as LookupParameter<ItemList<Permutation>>).ActualName;
     98        Parameters.Remove("BestKnownSolutions");
     99        Parameters.Add(new LookupParameter<ItemSet<Permutation>>("BestKnownSolutions", "The best known solutions of this QAP instance.", actualName));
    96100      }
    97101      #endregion
  • trunk/sources/HeuristicLab.Problems.QuadraticAssignment/3.3/QuadraticAssignmentProblem.cs

    r6525 r6540  
    156156      } else if (Parameters["BestKnownSolutions"].GetType().Equals(typeof(OptionalValueParameter<ItemList<Permutation>>))) {
    157157        ItemList<Permutation> list = ((OptionalValueParameter<ItemList<Permutation>>)Parameters["BestKnownSolutions"]).Value;
     158        Parameters.Remove("BestKnownSolutions");
    158159        Parameters.Add(new OptionalValueParameter<ItemSet<Permutation>>("BestKnownSolutions", "The list of best known solutions which is updated whenever a new better solution is found or may be the optimal solution if it is known beforehand.", new ItemSet<Permutation>(list)));
    159160      }
Note: See TracChangeset for help on using the changeset viewer.