Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/15/19 13:36:51 (6 years ago)
Author:
abeham
Message:

#2457: merged trunk into branch

Location:
branches/2457_ExpertSystem/HeuristicLab.Optimization
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/2457_ExpertSystem/HeuristicLab.Optimization

  • branches/2457_ExpertSystem/HeuristicLab.Optimization/3.3/Algorithms/Algorithm.cs

    r16075 r16956  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    3030using HeuristicLab.Core;
    3131using HeuristicLab.Data;
    32 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     32using HEAL.Attic;
    3333
    3434namespace HeuristicLab.Optimization {
     
    3737  /// </summary>
    3838  [Item("Algorithm", "A base class for algorithms.")]
    39   [StorableClass]
     39  [StorableType("7879C550-E8C2-4121-84C3-DADB06BD5C96")]
    4040  public abstract class Algorithm : ParameterizedNamedItem, IAlgorithm {
    4141    public static new Image StaticItemImage {
     
    171171    }
    172172    [StorableConstructor]
    173     protected Algorithm(bool deserializing) : base(deserializing) { }
     173    protected Algorithm(StorableConstructorFlag _) : base(_) { }
    174174    [StorableHook(HookType.AfterDeserialization)]
    175175    private void AfterDeserialization() {
  • branches/2457_ExpertSystem/HeuristicLab.Optimization/3.3/Algorithms/BasicAlgorithm.cs

    r16075 r16956  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2424using HeuristicLab.Common;
    2525using HeuristicLab.Core;
    26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     26using HEAL.Attic;
    2727
    2828namespace HeuristicLab.Optimization {
    29   [StorableClass]
     29  [StorableType("EFBEE5EB-B15B-4FBB-A210-C4E36898B89D")]
    3030  public abstract class BasicAlgorithm : Algorithm, IStorableContent {
    3131
     
    3636
    3737    public abstract bool SupportsPause { get; }
     38    public virtual bool SupportsStop {
     39      get { return true; }
     40    }
    3841
    3942    [Storable]
     
    5255
    5356    [StorableConstructor]
    54     protected BasicAlgorithm(bool deserializing) : base(deserializing) { }
     57    protected BasicAlgorithm(StorableConstructorFlag _) : base(_) { }
    5558    protected BasicAlgorithm(BasicAlgorithm original, Cloner cloner)
    5659      : base(original, cloner) {
     
    106109      // CancellationToken.ThrowIfCancellationRequested() must be called from within the Run method, otherwise stop does nothing
    107110      // alternatively check the IsCancellationRequested property of the cancellation token
     111      if (!SupportsStop)
     112        throw new NotSupportedException("Stop is not supported by this algorithm.");
     113
    108114      base.Stop();
    109115      if (ExecutionState == ExecutionState.Paused) OnStopped();
  • branches/2457_ExpertSystem/HeuristicLab.Optimization/3.3/Algorithms/EngineAlgorithm.cs

    r16075 r16956  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2424using HeuristicLab.Common;
    2525using HeuristicLab.Core;
    26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     26using HEAL.Attic;
    2727using HeuristicLab.PluginInfrastructure;
    2828
     
    3232  /// </summary>
    3333  [Item("EngineAlgorithm", "A base class for algorithms which use an engine for execution.")]
    34   [StorableClass]
     34  [StorableType("C3D2307F-9B15-4D3B-900E-616B58268ED6")]
    3535  public abstract class EngineAlgorithm : Algorithm {
    3636    [Storable]
     
    113113    }
    114114    [StorableConstructor]
    115     protected EngineAlgorithm(bool deserializing) : base(deserializing) { }
     115    protected EngineAlgorithm(StorableConstructorFlag _) : base(_) { }
    116116    [StorableHook(HookType.AfterDeserialization)]
    117117    private void AfterDeserialization() {
  • branches/2457_ExpertSystem/HeuristicLab.Optimization/3.3/Algorithms/HeuristicOptimizationAlgorithm.cs

    r16075 r16956  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2323using HeuristicLab.Common;
    2424using HeuristicLab.Core;
    25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using HEAL.Attic;
    2626
    2727namespace HeuristicLab.Optimization {
     
    3030  /// </summary>
    3131  [Item("Heuristic Optimization Algorithm", "A base class for heuristic optimization algorithms.")]
    32   [StorableClass]
     32  [StorableType("13388EBE-E463-4A64-BCE4-77A631CB5DA0")]
    3333  public abstract class HeuristicOptimizationAlgorithm : Algorithm {
    3434    public new IHeuristicOptimizationProblem Problem {
     
    4444
    4545    [StorableConstructor]
    46     protected HeuristicOptimizationAlgorithm(bool deserializing) : base(deserializing) { }
     46    protected HeuristicOptimizationAlgorithm(StorableConstructorFlag _) : base(_) { }
    4747    protected HeuristicOptimizationAlgorithm(HeuristicOptimizationAlgorithm original, Cloner cloner) : base(original, cloner) { }
    4848
  • branches/2457_ExpertSystem/HeuristicLab.Optimization/3.3/Algorithms/HeuristicOptimizationEngineAlgorithm.cs

    r16075 r16956  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2323using HeuristicLab.Common;
    2424using HeuristicLab.Core;
    25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using HEAL.Attic;
    2626
    2727namespace HeuristicLab.Optimization {
     
    3030  /// </summary>
    3131  [Item("Heuristic Optimization Enigne Algorithm", "A base class for heuristic optimization algorithms using an execution engine.")]
    32   [StorableClass]
     32  [StorableType("A741CA8C-D4DC-4917-8F71-95EA31C97890")]
    3333  public abstract class HeuristicOptimizationEngineAlgorithm : EngineAlgorithm {
    3434    public new IHeuristicOptimizationProblem Problem {
     
    4444
    4545    [StorableConstructor]
    46     protected HeuristicOptimizationEngineAlgorithm(bool deserializing) : base(deserializing) { }
     46    protected HeuristicOptimizationEngineAlgorithm(StorableConstructorFlag _) : base(_) { }
    4747    protected HeuristicOptimizationEngineAlgorithm(HeuristicOptimizationEngineAlgorithm original, Cloner cloner) : base(original, cloner) { }
    4848
  • branches/2457_ExpertSystem/HeuristicLab.Optimization/3.3/Algorithms/UserDefinedAlgorithm.cs

    r16075 r16956  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2323using HeuristicLab.Common;
    2424using HeuristicLab.Core;
    25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using HEAL.Attic;
    2626
    2727namespace HeuristicLab.Optimization {
     
    3131  [Item("User-Defined Algorithm", "An algorithm which can be defined by the user.")]
    3232  [Creatable(CreatableAttribute.Categories.Algorithms, Priority = 100)]
    33   [StorableClass]
     33  [StorableType("8D1C0ED9-F732-4DE3-8F6C-125DFF9E8D5E")]
    3434  public sealed class UserDefinedAlgorithm : EngineAlgorithm, IParameterizedItem, IStorableContent {
    3535    public string Filename { get; set; }
     
    7171    public UserDefinedAlgorithm(string name, string description) : base(name, description) { }
    7272    [StorableConstructor]
    73     private UserDefinedAlgorithm(bool deserializing) : base(deserializing) { }
     73    private UserDefinedAlgorithm(StorableConstructorFlag _) : base(_) { }
    7474    private UserDefinedAlgorithm(UserDefinedAlgorithm original, Cloner cloner)
    7575      : base(original, cloner) {
Note: See TracChangeset for help on using the changeset viewer.