Free cookie consent management tool by TermsFeed Policy Generator

Changeset 12109


Ignore:
Timestamp:
03/03/15 14:00:38 (10 years ago)
Author:
bburlacu
Message:

#2276: Merged trunk changes.

Location:
branches/HeuristicLab.DatasetRefactor/sources
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.DatasetRefactor/sources

  • branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Algorithms.RAPGA/3.3/RAPGA.cs

    r12105 r12109  
    206206      }
    207207      if (Parameters.ContainsKey("SimilarityCalculator")) {
     208#pragma warning disable 0618
    208209        var oldParameter = (IConstrainedValueParameter<ISingleObjectiveSolutionSimilarityCalculator>)Parameters["SimilarityCalculator"];
     210#pragma warning restore 0618
    209211        Parameters.Remove(oldParameter);
    210212        var newParameter = new ConstrainedValueParameter<ISolutionSimilarityCalculator>("SimilarityCalculator", "The operator used to calculate the similarity between two solutions.", new ItemSet<ISolutionSimilarityCalculator>(oldParameter.ValidValues));
     
    508510        SimilarityCalculatorParameter.ValidValues.Add(similarityCalculator);
    509511
     512      if (!SimilarityCalculatorParameter.ValidValues.Any()) {
     513        SimilarityCalculatorParameter.ValidValues.Add(new QualitySimilarityCalculator { QualityVariableName = Problem.Evaluator.QualityParameter.ActualName });
     514        SimilarityCalculatorParameter.ValidValues.Add(new NoSimilarityCalculator());
     515      }
     516
    510517      if (oldSimilarityCalculator != null) {
    511518        ISolutionSimilarityCalculator similarityCalculator = SimilarityCalculatorParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldSimilarityCalculator.GetType());
  • branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Algorithms.ScatterSearch/3.3/ScatterSearch.cs

    r12105 r12109  
    163163      #region Backwards compatible code, remove with 3.4
    164164      if (Parameters.ContainsKey("SimilarityCalculator")) {
     165#pragma warning disable 0618
    165166        var oldParameter = (IConstrainedValueParameter<ISingleObjectiveSolutionSimilarityCalculator>)Parameters["SimilarityCalculator"];
     167#pragma warning restore 0618
    166168        Parameters.Remove(oldParameter);
    167169        var newParameter = new ConstrainedValueParameter<ISolutionSimilarityCalculator>("SimilarityCalculator", "The operator used to calculate the similarity between two solutions.", new ItemSet<ISolutionSimilarityCalculator>(oldParameter.ValidValues));
     
    408410        SimilarityCalculatorParameter.ValidValues.Add(similarityCalculator);
    409411
     412      if (!SimilarityCalculatorParameter.ValidValues.Any()) {
     413        SimilarityCalculatorParameter.ValidValues.Add(new QualitySimilarityCalculator { QualityVariableName = Problem.Evaluator.QualityParameter.ActualName });
     414        SimilarityCalculatorParameter.ValidValues.Add(new NoSimilarityCalculator());
     415      }
     416
    410417      if (oldSimilarityCalculator != null) {
    411418        ISolutionSimilarityCalculator similarityCalculator = SimilarityCalculatorParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldSimilarityCalculator.GetType());
  • branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Clients.Hive.Slave.WindowsService/3.3/Program.cs

    r12031 r12109  
    2929    private static void Main(string[] args) {
    3030      // Install as service, see http://stackoverflow.com/a/12703878
    31       if (Environment.UserInteractive) {
    32         try {
    33           string parameter = string.Concat(args);
    34           switch (parameter) {
    35             case "--install":
    36               ManagedInstallerClass.InstallHelper(new[] { Assembly.GetExecutingAssembly().Location });
    37               break;
    38             case "--uninstall":
    39               ManagedInstallerClass.InstallHelper(new[] { "/u", Assembly.GetExecutingAssembly().Location });
    40               break;
    41           }
     31      bool installDone = false;
     32      try {
     33        string parameter = string.Concat(args);
     34        switch (parameter) {
     35          case "--install":
     36            installDone = true;
     37            ManagedInstallerClass.InstallHelper(new[] { Assembly.GetExecutingAssembly().Location });
     38            break;
     39          case "--uninstall":
     40            installDone = true;
     41            ManagedInstallerClass.InstallHelper(new[] { "/u", Assembly.GetExecutingAssembly().Location });
     42            break;
    4243        }
    43         catch (Exception ex) {
    44           Console.WriteLine("Error on (un)install of Hive Slave service: " + Environment.NewLine + ex);
    45         }
    46       } else {
     44      }
     45      catch (Exception ex) {
     46        Console.WriteLine("Error on (un)install of Hive Slave service: " + Environment.NewLine + ex);
     47      }
     48
     49      if (!installDone) {
    4750        ServiceBase[] ServicesToRun;
    4851        ServicesToRun = new ServiceBase[]
  • branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Optimization.Operators/3.3/SingleObjectiveSolutionSimilarityCalculator.cs

    r12105 r12109  
    3131  [Item("SimilarityCalculator", "A base class for items that perform similarity calculation between two solutions.")]
    3232  [StorableClass]
     33#pragma warning disable 0618
    3334  public abstract class SingleObjectiveSolutionSimilarityCalculator : SolutionSimilarityCalculator, ISingleObjectiveSolutionSimilarityCalculator {
     35#pragma warning restore 0618
    3436    [StorableConstructor]
    3537    protected SingleObjectiveSolutionSimilarityCalculator(bool deserializing) : base(deserializing) { }
  • branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.DataAnalysis.Symbolic

  • branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification

  • branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveMeanSquaredErrorEvaluator.cs

    r12031 r12109  
    2828using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2929
    30 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification {
     30namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.SingleObjective {
    3131  [Item("Mean squared error Evaluator", "Calculates the mean squared error of a symbolic classification solution.")]
    3232  [StorableClass]
  • branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveProblem.cs

    r12105 r12109  
    2525using HeuristicLab.Parameters;
    2626using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     27using HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.SingleObjective;
    2728
    2829namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification {
  • branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Creators/MultiSymbolicDataAnalysisExpressionCreator.cs

    r12105 r12109  
    3434using HeuristicLab.PluginInfrastructure;
    3535
    36 namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
     36namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Creators {
    3737  public class MultiSymbolicDataAnalysisExpressionCreator : StochasticMultiBranch<ISymbolicDataAnalysisSolutionCreator>,
    3838    ISymbolicDataAnalysisSolutionCreator,
Note: See TracChangeset for help on using the changeset viewer.