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:
6 edited

Legend:

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

  • branches/2457_ExpertSystem/HeuristicLab.Optimization/3.3/Problems/HeuristicOptimizationProblem.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.Core;
    2525using HeuristicLab.Parameters;
    26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     26using HEAL.Attic;
    2727
    2828namespace HeuristicLab.Optimization {
    2929  [Item("Heuristic Optimization Problem", "Represents the base class for a heuristic optimization problem.")]
    30   [StorableClass]
     30  [StorableType("DE0478BA-3797-4AC3-9A89-3734D2643823")]
    3131  public abstract class HeuristicOptimizationProblem<T, U> : Problem, IHeuristicOptimizationProblem
    3232    where T : class,IEvaluator
     
    3636
    3737    [StorableConstructor]
    38     protected HeuristicOptimizationProblem(bool deserializing) : base(deserializing) { }
     38    protected HeuristicOptimizationProblem(StorableConstructorFlag _) : base(_) { }
    3939    protected HeuristicOptimizationProblem(HeuristicOptimizationProblem<T, U> original, Cloner cloner)
    4040      : base(original, cloner) {
  • branches/2457_ExpertSystem/HeuristicLab.Optimization/3.3/Problems/MultiObjectiveHeuristicOptimizationProblem.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.Data;
    2525using HeuristicLab.Parameters;
    26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     26using HEAL.Attic;
    2727
    2828namespace HeuristicLab.Optimization {
    2929  [Item("Multi-Objective Heuristic Optimization Problem", "A base class for multi-objective heuristic optimization problems.")]
    30   [StorableClass]
     30  [StorableType("C46643E3-7144-4884-A30A-5329BD80DC4E")]
    3131  public abstract class MultiObjectiveHeuristicOptimizationProblem<T, U> : HeuristicOptimizationProblem<T, U>, IMultiObjectiveHeuristicOptimizationProblem
    3232    where T : class, IMultiObjectiveEvaluator
     
    3535
    3636    [StorableConstructor]
    37     protected MultiObjectiveHeuristicOptimizationProblem(bool deserializing) : base(deserializing) { }
     37    protected MultiObjectiveHeuristicOptimizationProblem(StorableConstructorFlag _) : base(_) { }
    3838    protected MultiObjectiveHeuristicOptimizationProblem(MultiObjectiveHeuristicOptimizationProblem<T, U> original, Cloner cloner) : base(original, cloner) { }
    3939    protected MultiObjectiveHeuristicOptimizationProblem()
  • branches/2457_ExpertSystem/HeuristicLab.Optimization/3.3/Problems/Problem.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 System.Collections.Generic;
    2424using System.Drawing;
     25using HEAL.Attic;
    2526using HeuristicLab.Collections;
    2627using HeuristicLab.Common;
     
    2829using HeuristicLab.Data;
    2930using HeuristicLab.Parameters;
    30 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3131
    3232namespace HeuristicLab.Optimization {
    3333  [Item("Problem", "Represents the base class for a problem.")]
    34   [StorableClass]
     34  [StorableType("6DC97432-9BD1-4304-802A-1FC48A0E0468")]
    3535  public abstract class Problem : ParameterizedNamedItem, IProblem {
    3636    private const string OperatorsParameterName = "Operators";
     
    4444
    4545    [StorableConstructor]
    46     protected Problem(bool deserializing) : base(deserializing) { }
     46    protected Problem(StorableConstructorFlag _) : base(_) { }
    4747    protected Problem(Problem original, Cloner cloner)
    4848      : base(original, cloner) {
     
    5252    protected Problem()
    5353      : base() {
    54       Parameters.Add(new FixedValueParameter<ItemCollection<IItem>>(OperatorsParameterName, "The operators and items that the problem provides to the algorithms.", new ItemCollection<IItem>(), false));
     54      Parameters.Add(new FixedValueParameter<ItemCollection<IItem>>(OperatorsParameterName, "The operators and items that the problem provides to the algorithms.", new ItemCollection<IItem>()) { GetsCollected = false });
    5555      OperatorsParameter.Hidden = true;
    5656      RegisterEventHandlers();
     
    6666        if (operators != null) {
    6767          Parameters.Remove(OperatorsParameterName);
    68           Parameters.Add(new FixedValueParameter<ItemCollection<IItem>>(OperatorsParameterName, "The operators and items that the problem provides to the algorithms.", new ItemCollection<IItem>(operators), false));
     68          Parameters.Add(new FixedValueParameter<ItemCollection<IItem>>(OperatorsParameterName, "The operators and items that the problem provides to the algorithms.", new ItemCollection<IItem>(operators)) { GetsCollected = false });
    6969          OperatorsParameter.Hidden = true;
    7070        }
     
    8484    // BackwardsCompatibility3.3
    8585    #region Backwards compatible code, remove with 3.4
    86     [Storable(Name = "Operators", AllowOneWay = true)]
     86    [Storable(OldName = "Operators")]
    8787    private IEnumerable<IOperator> StorableOperators {
    8888      set {
     
    9595        //necessary to convert old experiments files where no parameter was used for saving the operators
    9696        if (!Parameters.ContainsKey(OperatorsParameterName)) {
    97           Parameters.Add(new FixedValueParameter<ItemCollection<IItem>>(OperatorsParameterName, "The operators and items that the problem provides to the algorithms.", new ItemCollection<IItem>(), false));
     97          Parameters.Add(new FixedValueParameter<ItemCollection<IItem>>(OperatorsParameterName, "The operators and items that the problem provides to the algorithms.", new ItemCollection<IItem>()) { GetsCollected = false });
    9898          OperatorsParameter.Hidden = true;
    9999        }
     
    107107        #region Backwards compatible code, remove with 3.4
    108108        if (!Parameters.ContainsKey(OperatorsParameterName)) {
    109           Parameters.Add(new FixedValueParameter<ItemCollection<IItem>>(OperatorsParameterName, "The operators and items that the problem provides to the algorithms.", new ItemCollection<IItem>(), false));
     109          Parameters.Add(new FixedValueParameter<ItemCollection<IItem>>(OperatorsParameterName, "The operators and items that the problem provides to the algorithms.", new ItemCollection<IItem>()) { GetsCollected = false });
    110110          OperatorsParameter.Hidden = true;
    111111        }
  • branches/2457_ExpertSystem/HeuristicLab.Optimization/3.3/Problems/SingleObjectiveHeuristicOptimizationProblem.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.Data;
    2525using HeuristicLab.Parameters;
    26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     26using HEAL.Attic;
    2727
    2828namespace HeuristicLab.Optimization {
    2929  [Item("Single-Objective Heuristic OptimizationProblem", "A base class for single-objective heuristic optimization problems.")]
    30   [StorableClass]
     30  [StorableType("DFD5588E-6AB2-4712-9083-A405EF21226F")]
    3131  public abstract class SingleObjectiveHeuristicOptimizationProblem<T, U> : HeuristicOptimizationProblem<T, U>, ISingleObjectiveHeuristicOptimizationProblem
    3232    where T : class, ISingleObjectiveEvaluator
     
    3636
    3737    [StorableConstructor]
    38     protected SingleObjectiveHeuristicOptimizationProblem(bool deserializing) : base(deserializing) { }
     38    protected SingleObjectiveHeuristicOptimizationProblem(StorableConstructorFlag _) : base(_) { }
    3939    protected SingleObjectiveHeuristicOptimizationProblem(SingleObjectiveHeuristicOptimizationProblem<T, U> original, Cloner cloner) : base(original, cloner) { }
    4040    protected SingleObjectiveHeuristicOptimizationProblem()
  • branches/2457_ExpertSystem/HeuristicLab.Optimization/3.3/Problems/UserDefinedProblem.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.
     
    2525using System.Linq;
    2626using System.Threading;
     27using HEAL.Attic;
    2728using HeuristicLab.Collections;
    2829using HeuristicLab.Common;
     
    3031using HeuristicLab.Data;
    3132using HeuristicLab.Parameters;
    32 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3333using HeuristicLab.PluginInfrastructure;
    3434
     
    3939  [Item("User-Defined Problem", "A problem which can be defined by the user.")]
    4040  [Creatable(CreatableAttribute.Categories.Problems, Priority = 120)]
    41   [StorableClass]
     41  [StorableType("9F18A098-A8B8-4F70-93CF-79FF1496AC8A")]
    4242  public sealed class UserDefinedProblem : ParameterizedNamedItem, ISingleObjectiveHeuristicOptimizationProblem, IStorableContent {
    4343    public string Filename { get; set; }
     
    122122
    123123    [StorableConstructor]
    124     private UserDefinedProblem(bool deserializing) : base(deserializing) { }
     124    private UserDefinedProblem(StorableConstructorFlag _) : base(_) { }
    125125    [StorableHook(HookType.AfterDeserialization)]
    126126    private void AfterDeserialization() {
     
    130130        ItemList<IOperator> tmp = ((ValueParameter<ItemList<IOperator>>)Parameters["Operators"]).Value;
    131131        Parameters.Remove("Operators");
    132         Parameters.Add(new ValueParameter<ItemList<IItem>>("Operators", "The operators and items that the problem provides to the algorithms.", new ItemList<IItem>(tmp), false));
     132        Parameters.Add(new ValueParameter<ItemList<IItem>>("Operators", "The operators and items that the problem provides to the algorithms.", new ItemList<IItem>(tmp)) { GetsCollected = false });
    133133      }
    134134      #endregion
     
    235235
    236236    [Item("EmptyUserDefinedProblemEvaluator", "A dummy evaluator that will throw an exception when executed.")]
    237     [StorableClass]
     237    [StorableType("E27E4145-6D44-4A9D-B15A-B0E0528ECD0D")]
    238238    [NonDiscoverableType]
    239239    private sealed class EmptyUserDefinedProblemEvaluator : ParameterizedNamedItem, ISingleObjectiveEvaluator {
    240240
    241241      [StorableConstructor]
    242       private EmptyUserDefinedProblemEvaluator(bool deserializing) : base(deserializing) { }
     242      private EmptyUserDefinedProblemEvaluator(StorableConstructorFlag _) : base(_) { }
    243243      private EmptyUserDefinedProblemEvaluator(EmptyUserDefinedProblemEvaluator original, Cloner cloner)
    244244        : base(original, cloner) {
Note: See TracChangeset for help on using the changeset viewer.