Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/07/16 21:29:00 (8 years ago)
Author:
abeham
Message:

#2457: worked on expert system

Location:
branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3
Files:
2 edited
1 moved

Legend:

Unmodified
Added
Removed
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/ExpertSystem.cs

    r13649 r13663  
    4141using SingleObjectiveOKBProblem = HeuristicLab.Clients.OKB.RunCreation.SingleObjectiveOKBProblem;
    4242
    43 namespace HeuristicLab.OptimizationExpertSystem {
     43namespace HeuristicLab.OptimizationExpertSystem.Common {
    4444  [Item("Expert-System", "Currently in experimental phase, an expert system that makes algorithm suggestions based on fitness landscape analysis features and an optimization knowledge base.")]
    4545  [StorableClass]
     
    123123    }
    124124
     125    [Storable(Name = "solutionPool")]
     126    private ItemList<IScope> oldBackwardsCompatible;
     127    [Storable(Name = "newSolutionPool")]
     128    private CheckedItemList<IScope> solutionPool;
     129    public CheckedItemList<IScope> SolutionPool {
     130      get { return solutionPool; }
     131      set {
     132        if (solutionPool == value) return;
     133        solutionPool = value;
     134        OnPropertyChanged("SolutionPool");
     135      }
     136    }
     137   
    125138    [Storable]
    126139    private BidirectionalLookup<long, IRun> algorithmId2RunMapping;
     
    155168        algorithmId2AlgorithmInstanceMapping.Add(kvp.Key, cloner.Clone(kvp.Value));
    156169      }
     170      currentResult = cloner.Clone(original.currentResult);
     171      solutionPool = cloner.Clone(original.solutionPool);
    157172      currentInstance = cloner.Clone(original.currentInstance);
    158173      RegisterEventHandlers();
     
    167182      problemInstances = new RunCollection();
    168183      problem = new SingleObjectiveOKBProblem();
     184      solutionPool = new CheckedItemList<IScope>();
    169185      algorithmId2RunMapping = new BidirectionalLookup<long, IRun>();
    170186      algorithmId2AlgorithmInstanceMapping = new BidirectionalDictionary<long, IAlgorithm>();
     
    183199    private void AfterDeserialization() {
    184200      readOnlySuggestedInstances = suggestedInstances.AsReadOnly();
     201      // BackwardsCompatibility3.3
     202      #region Backwards compatible code, remove with trunk integration
     203      if (oldBackwardsCompatible != null) solutionPool = new CheckedItemList<IScope>(solutionPool);
     204      else if (solutionPool == null) solutionPool = new CheckedItemList<IScope>();
     205      #endregion
    185206      RegisterEventHandlers();
    186207    }
     
    395416        alg.ExceptionOccurred -= AlgorithmOnExceptionOccurred;
    396417        alg.ExecutionTimeChanged -= AlgorithmOnExecutionTimeChanged;
     418        foreach (var solution in alg.Results.Where(x => x.Name.ToLower().Contains("solution")).Select(x => x.Value).OfType<IScope>()) {
     419          solutionPool.Add(solution);
     420        }
     421        Runs.Add(alg.Runs.Last());
    397422        if (algWh != null) algWh.Set();
    398423      }
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/HeuristicLab.OptimizationExpertSystem.Common-3.3.csproj

    r13662 r13663  
    88    <OutputType>Library</OutputType>
    99    <AppDesignerFolder>Properties</AppDesignerFolder>
    10     <RootNamespace>HeuristicLab.OptimizationExpertSystem</RootNamespace>
    11     <AssemblyName>HeuristicLab.OptimizationExpertSystem-3.3</AssemblyName>
     10    <RootNamespace>HeuristicLab.OptimizationExpertSystem.Common</RootNamespace>
     11    <AssemblyName>HeuristicLab.OptimizationExpertSystem.Common-3.3</AssemblyName>
    1212    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
    1313    <FileAlignment>512</FileAlignment>
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Plugin.cs.frame

    r12847 r13663  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2222using HeuristicLab.PluginInfrastructure;
    2323
    24 namespace HeuristicLab.OptimizationExpertSystem {
     24namespace HeuristicLab.OptimizationExpertSystem.Common {
    2525  /// <summary>
    2626  /// Plugin class for HeuristicLab.OptimizationExpertSystem plugin.
    2727  /// </summary>
    28   [Plugin("HeuristicLab.OptimizationExpertSystem", "3.3.12.$WCREV$")]
    29   [PluginFile("HeuristicLab.OptimizationExpertSystem-3.3.dll", PluginFileType.Assembly)]
     28  [Plugin("HeuristicLab.OptimizationExpertSystem.Common", "3.3.12.$WCREV$")]
     29  [PluginFile("HeuristicLab.OptimizationExpertSystem.Common-3.3.dll", PluginFileType.Assembly)]
    3030  [PluginDependency("HeuristicLab.Analysis", "3.3")]
    3131  [PluginDependency("HeuristicLab.Collections", "3.3")]
Note: See TracChangeset for help on using the changeset viewer.