Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/11/20 13:36:02 (5 years ago)
Author:
bburlacu
Message:

#1772: Merge trunk changes and fix all errors and compilation warnings.

Location:
branches/1772_HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • branches/1772_HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Analyzers/EvolutionTrackingAnalyzer.cs

    r13482 r17434  
    2020#endregion
    2121
     22using HEAL.Attic;
    2223using HeuristicLab.Common;
    2324using HeuristicLab.Core;
     
    3031namespace HeuristicLab.EvolutionTracking {
    3132  [Item("EvolutionTrackingAnalyzer", "Base class for analyzers that use the genealogy graph")]
    32   [StorableClass]
     33  [StorableType("272F8098-CFD0-473C-AFC4-A5F3A51BC154")]
    3334  public abstract class EvolutionTrackingAnalyzer : SingleSuccessorOperator, IAnalyzer {
    3435    #region parameter names
     
    9293
    9394    [StorableConstructor]
    94     protected EvolutionTrackingAnalyzer(bool deserializing) : base(deserializing) { }
     95    protected EvolutionTrackingAnalyzer(StorableConstructorFlag _) : base(_) { }
    9596  }
    9697
    9798  [Item("EvolutionTrackingAnalyzer", "Base class for analyzers that use the genealogy graph")]
    98   [StorableClass]
     99  [StorableType("B48D6E89-3D0F-4F38-BC23-FE648E43421F")]
    99100  public class EvolutionTrackingAnalyzer<T> : EvolutionTrackingAnalyzer where T : class, IItem {
    100101    public EvolutionTrackingAnalyzer() { }
     
    107108
    108109    [StorableConstructor]
    109     protected EvolutionTrackingAnalyzer(bool deserializing) : base(deserializing) { }
     110    protected EvolutionTrackingAnalyzer(StorableConstructorFlag _) : base(_) { }
    110111
    111112    public new IGenealogyGraph<T> PopulationGraph {
  • branches/1772_HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Analyzers/GenealogyAnalyzer.cs

    r13495 r17434  
    2222using System.Collections.Generic;
    2323using System.Linq;
     24using HEAL.Attic;
    2425using HeuristicLab.Common;
    2526using HeuristicLab.Core;
    2627using HeuristicLab.Data;
     28using HeuristicLab.EvolutionTracking;
    2729using HeuristicLab.Operators;
    2830using HeuristicLab.Optimization;
    2931using HeuristicLab.Parameters;
    30 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    31 
    32 namespace HeuristicLab.EvolutionTracking {
    33   [StorableClass]
    34   [Item("GenealogyAnalyzer", "An analyzer which performs the necessary instrumentation to record the evolution of a genetic algorithm.")]
    35   public abstract class GenealogyAnalyzer<T> : SingleSuccessorOperator, IAnalyzer
    36   where T : class, IItem {
    37     #region parameter names
    38     private const string GenerationsParameterName = "Generations";
    39     private const string ResultsParameterName = "Results";
    40     private const string PopulationGraphParameterName = "PopulationGraph";
    41     public const string QualityParameterName = "Quality";
    42     public const string PopulationParameterName = "SymbolicExpressionTree";
    43 
    44     private const string CrossoverParameterName = "Crossover";
    45     private const string ManipulatorParameterName = "Mutator";
    46     private const string SolutionCreatorParameterName = "SolutionCreator";
    47 
    48     private const string BeforeCrossoverOperatorParameterName = "BeforeCrossoverOperator";
    49     private const string AfterCrossoverOperatorParameterName = "AfterCrossoverOperator";
    50 
    51     private const string BeforeManipulatorOperatorParameterName = "BeforeManipulatorOperator";
    52     private const string AfterManipulatorOperatorParameterName = "AfterManipulatorOperator";
    53 
    54     private const string EnableCrossoverTrackingParameterName = "EnableCrossoverTracking";
    55     private const string EnableManipulatorTrackingParameterName = "EnableManipulatorTracking";
    56     private const string EnableSolutionCreatorTrackingParameterName = "EnableSolutionCreatorTracking"; // should always be enabled. maybe superfluous
    57     private const string TrimOlderGenerationsParameterName = "TrimOlderGenerations";
    58     #endregion parameter names
    59 
    60     #region parameter properties
    61 
    62     public IFixedValueParameter<BoolValue> TrimOlderGenerationsParameter {
    63       get { return (IFixedValueParameter<BoolValue>)Parameters[TrimOlderGenerationsParameterName]; }
    64     }
    65 
    66     public IScopeTreeLookupParameter<DoubleValue> QualityParameter {
    67       get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters[QualityParameterName]; }
    68     }
    69 
    70     public IScopeTreeLookupParameter<T> PopulationParameter {
    71       get { return (IScopeTreeLookupParameter<T>)Parameters[PopulationParameterName]; }
    72     }
    73 
    74     public IValueParameter<ICrossoverOperator<T>> BeforeCrossoverOperatorParameter {
    75       get { return (IValueParameter<ICrossoverOperator<T>>)Parameters[BeforeCrossoverOperatorParameterName]; }
    76     }
    77 
    78     public IValueParameter<ICrossoverOperator<T>> AfterCrossoverOperatorParameter {
    79       get { return (IValueParameter<ICrossoverOperator<T>>)Parameters[AfterCrossoverOperatorParameterName]; }
    80     }
    81 
    82     public IValueParameter<IManipulatorOperator<T>> BeforeManipulatorOperatorParameter {
    83       get { return (IValueParameter<IManipulatorOperator<T>>)Parameters[BeforeManipulatorOperatorParameterName]; }
    84     }
    85 
    86     public IValueParameter<IManipulatorOperator<T>> AfterManipulatorOperatorParameter {
    87       get { return (IValueParameter<IManipulatorOperator<T>>)Parameters[AfterManipulatorOperatorParameterName]; }
    88     }
    89 
    90     public ILookupParameter<ResultCollection> ResultsParameter {
    91       get { return (ILookupParameter<ResultCollection>)Parameters[ResultsParameterName]; }
    92     }
    93 
    94     public ILookupParameter<IntValue> GenerationsParameter {
    95       get { return (ILookupParameter<IntValue>)Parameters[GenerationsParameterName]; }
    96     }
    97 
    98     public IValueParameter<BoolValue> EnableCrossoverTrackingParameter {
    99       get { return (IValueParameter<BoolValue>)Parameters[EnableCrossoverTrackingParameterName]; }
    100     }
    101 
    102     public IValueParameter<BoolValue> EnableManipulatorTrackingParameter {
    103       get { return (IValueParameter<BoolValue>)Parameters[EnableManipulatorTrackingParameterName]; }
    104     }
    105 
    106     public IValueParameter<BoolValue> EnableSolutionCreatorTrackingParameter {
    107       get { return (IValueParameter<BoolValue>)Parameters[EnableSolutionCreatorTrackingParameterName]; }
    108     }
    109 
    110     public ILookupParameter<ICrossover> CrossoverParameter {
    111       get { return (ILookupParameter<ICrossover>)Parameters[CrossoverParameterName]; }
    112     }
    113 
    114     public ILookupParameter<IManipulator> ManipulatorParameter {
    115       get { return (ILookupParameter<IManipulator>)Parameters[ManipulatorParameterName]; }
    116     }
    117 
    118     public ILookupParameter<ISolutionCreator> SolutionCreatorParameter {
    119       get { return (ILookupParameter<ISolutionCreator>)Parameters[SolutionCreatorParameterName]; }
    120     }
    121     #endregion parameter properties
    122 
    123     #region properties
    124     public ICrossoverOperator<T> BeforeCrossoverOperator {
    125       get { return BeforeCrossoverOperatorParameter.Value; }
    126     }
    127 
    128     public ICrossoverOperator<T> AfterCrossoverOperator {
    129       get { return AfterCrossoverOperatorParameter.Value; }
    130     }
    131 
    132     public IManipulatorOperator<T> BeforeManipulatorOperator {
    133       get { return BeforeManipulatorOperatorParameter.Value; }
    134     }
    135 
    136     public IManipulatorOperator<T> AfterManipulatorOperator {
    137       get { return AfterManipulatorOperatorParameter.Value; }
    138     }
    139 
    140     public BoolValue EnableCrossoverTracking {
    141       get { return EnableCrossoverTrackingParameter.Value; }
    142     }
    143 
    144     public BoolValue EnableManipulatorTracking {
    145       get { return EnableManipulatorTrackingParameter.Value; }
    146     }
    147 
    148     public BoolValue EnableSolutionCreatorTracking {
    149       get { return EnableSolutionCreatorTrackingParameter.Value; }
    150     }
    151 
    152     public bool TrimOlderGenerations {
    153       get { return TrimOlderGenerationsParameter.Value.Value; }
    154     }
    155     #endregion properties
    156 
    157     protected GenealogyAnalyzer() {
    158       #region add parameters
    159       // the instrumented operators
     32
     33[Item("GenealogyAnalyzer", "An analyzer which performs the necessary instrumentation to record the evolution of a genetic algorithm.")]
     34[StorableType("04001C52-025C-4555-8812-AC3FA26A2B2F")]
     35public abstract class GenealogyAnalyzer<T> : SingleSuccessorOperator, IAnalyzer
     36where T : class, IItem
     37{
     38  #region parameter names
     39  private const string GenerationsParameterName = "Generations";
     40  private const string ResultsParameterName = "Results";
     41  private const string PopulationGraphParameterName = "PopulationGraph";
     42  public const string QualityParameterName = "Quality";
     43  public const string PopulationParameterName = "SymbolicExpressionTree";
     44
     45  private const string CrossoverParameterName = "Crossover";
     46  private const string ManipulatorParameterName = "Mutator";
     47  private const string SolutionCreatorParameterName = "SolutionCreator";
     48
     49  private const string BeforeCrossoverOperatorParameterName = "BeforeCrossoverOperator";
     50  private const string AfterCrossoverOperatorParameterName = "AfterCrossoverOperator";
     51
     52  private const string BeforeManipulatorOperatorParameterName = "BeforeManipulatorOperator";
     53  private const string AfterManipulatorOperatorParameterName = "AfterManipulatorOperator";
     54
     55  private const string EnableCrossoverTrackingParameterName = "EnableCrossoverTracking";
     56  private const string EnableManipulatorTrackingParameterName = "EnableManipulatorTracking";
     57  private const string EnableSolutionCreatorTrackingParameterName = "EnableSolutionCreatorTracking"; // should always be enabled. maybe superfluous
     58  private const string TrimOlderGenerationsParameterName = "TrimOlderGenerations";
     59  #endregion parameter names
     60
     61  #region parameter properties
     62
     63  public IFixedValueParameter<BoolValue> TrimOlderGenerationsParameter {
     64    get { return (IFixedValueParameter<BoolValue>)Parameters[TrimOlderGenerationsParameterName]; }
     65  }
     66
     67  public IScopeTreeLookupParameter<DoubleValue> QualityParameter {
     68    get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters[QualityParameterName]; }
     69  }
     70
     71  public IScopeTreeLookupParameter<T> PopulationParameter {
     72    get { return (IScopeTreeLookupParameter<T>)Parameters[PopulationParameterName]; }
     73  }
     74
     75  public IValueParameter<ICrossoverOperator<T>> BeforeCrossoverOperatorParameter {
     76    get { return (IValueParameter<ICrossoverOperator<T>>)Parameters[BeforeCrossoverOperatorParameterName]; }
     77  }
     78
     79  public IValueParameter<ICrossoverOperator<T>> AfterCrossoverOperatorParameter {
     80    get { return (IValueParameter<ICrossoverOperator<T>>)Parameters[AfterCrossoverOperatorParameterName]; }
     81  }
     82
     83  public IValueParameter<IManipulatorOperator<T>> BeforeManipulatorOperatorParameter {
     84    get { return (IValueParameter<IManipulatorOperator<T>>)Parameters[BeforeManipulatorOperatorParameterName]; }
     85  }
     86
     87  public IValueParameter<IManipulatorOperator<T>> AfterManipulatorOperatorParameter {
     88    get { return (IValueParameter<IManipulatorOperator<T>>)Parameters[AfterManipulatorOperatorParameterName]; }
     89  }
     90
     91  public ILookupParameter<ResultCollection> ResultsParameter {
     92    get { return (ILookupParameter<ResultCollection>)Parameters[ResultsParameterName]; }
     93  }
     94
     95  public ILookupParameter<IntValue> GenerationsParameter {
     96    get { return (ILookupParameter<IntValue>)Parameters[GenerationsParameterName]; }
     97  }
     98
     99  public IValueParameter<BoolValue> EnableCrossoverTrackingParameter {
     100    get { return (IValueParameter<BoolValue>)Parameters[EnableCrossoverTrackingParameterName]; }
     101  }
     102
     103  public IValueParameter<BoolValue> EnableManipulatorTrackingParameter {
     104    get { return (IValueParameter<BoolValue>)Parameters[EnableManipulatorTrackingParameterName]; }
     105  }
     106
     107  public IValueParameter<BoolValue> EnableSolutionCreatorTrackingParameter {
     108    get { return (IValueParameter<BoolValue>)Parameters[EnableSolutionCreatorTrackingParameterName]; }
     109  }
     110
     111  public ILookupParameter<ICrossover> CrossoverParameter {
     112    get { return (ILookupParameter<ICrossover>)Parameters[CrossoverParameterName]; }
     113  }
     114
     115  public ILookupParameter<IManipulator> ManipulatorParameter {
     116    get { return (ILookupParameter<IManipulator>)Parameters[ManipulatorParameterName]; }
     117  }
     118
     119  public ILookupParameter<ISolutionCreator> SolutionCreatorParameter {
     120    get { return (ILookupParameter<ISolutionCreator>)Parameters[SolutionCreatorParameterName]; }
     121  }
     122  #endregion parameter properties
     123
     124  #region properties
     125  public ICrossoverOperator<T> BeforeCrossoverOperator {
     126    get { return BeforeCrossoverOperatorParameter.Value; }
     127  }
     128
     129  public ICrossoverOperator<T> AfterCrossoverOperator {
     130    get { return AfterCrossoverOperatorParameter.Value; }
     131  }
     132
     133  public IManipulatorOperator<T> BeforeManipulatorOperator {
     134    get { return BeforeManipulatorOperatorParameter.Value; }
     135  }
     136
     137  public IManipulatorOperator<T> AfterManipulatorOperator {
     138    get { return AfterManipulatorOperatorParameter.Value; }
     139  }
     140
     141  public BoolValue EnableCrossoverTracking {
     142    get { return EnableCrossoverTrackingParameter.Value; }
     143  }
     144
     145  public BoolValue EnableManipulatorTracking {
     146    get { return EnableManipulatorTrackingParameter.Value; }
     147  }
     148
     149  public BoolValue EnableSolutionCreatorTracking {
     150    get { return EnableSolutionCreatorTrackingParameter.Value; }
     151  }
     152
     153  public bool TrimOlderGenerations {
     154    get { return TrimOlderGenerationsParameter.Value.Value; }
     155  }
     156  #endregion properties
     157
     158  protected GenealogyAnalyzer() {
     159    #region add parameters
     160    // the instrumented operators
     161    Parameters.Add(new LookupParameter<ICrossover>(CrossoverParameterName, "The crossover operator."));
     162    Parameters.Add(new LookupParameter<IManipulator>(ManipulatorParameterName, "The manipulator operator."));
     163    Parameters.Add(new LookupParameter<ISolutionCreator>(SolutionCreatorParameterName, "The solution creator operator."));
     164    // the analyzer parameters
     165    Parameters.Add(new ValueParameter<BoolValue>(EnableCrossoverTrackingParameterName, new BoolValue(true)));
     166    Parameters.Add(new ValueParameter<BoolValue>(EnableManipulatorTrackingParameterName, new BoolValue(true)));
     167    Parameters.Add(new ValueParameter<BoolValue>(EnableSolutionCreatorTrackingParameterName, new BoolValue(true)));
     168    // parameters required by the analyzer to do its work
     169    Parameters.Add(new LookupParameter<IntValue>(GenerationsParameterName, "The number of generations so far."));
     170    Parameters.Add(new LookupParameter<ResultCollection>(ResultsParameterName));
     171    Parameters.Add(new ScopeTreeLookupParameter<T>(PopulationParameterName, "The population of individuals."));
     172    Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>(QualityParameterName, "The individual qualities."));
     173    Parameters.Add(new ValueParameter<ICrossoverOperator<T>>(BeforeCrossoverOperatorParameterName));
     174    Parameters.Add(new ValueParameter<ICrossoverOperator<T>>(AfterCrossoverOperatorParameterName));
     175    Parameters.Add(new ValueParameter<IManipulatorOperator<T>>(BeforeManipulatorOperatorParameterName));
     176    Parameters.Add(new ValueParameter<IManipulatorOperator<T>>(AfterManipulatorOperatorParameterName));
     177    Parameters.Add(new FixedValueParameter<BoolValue>(TrimOlderGenerationsParameterName, "Remove all the generations older than the last generation from the genealoy graph to save memory."));
     178    #endregion add parameters
     179  }
     180
     181  protected GenealogyAnalyzer(GenealogyAnalyzer<T> original, Cloner cloner)
     182    : base(original, cloner) {
     183  }
     184
     185  [StorableConstructor]
     186  protected GenealogyAnalyzer(StorableConstructorFlag _) : base(_) { }
     187
     188  [StorableHook(HookType.AfterDeserialization)]
     189  private void AfterDeserialization() {
     190    // the instrumented operators
     191    if (!Parameters.ContainsKey(CrossoverParameterName))
    160192      Parameters.Add(new LookupParameter<ICrossover>(CrossoverParameterName, "The crossover operator."));
     193    if (!Parameters.ContainsKey(ManipulatorParameterName))
    161194      Parameters.Add(new LookupParameter<IManipulator>(ManipulatorParameterName, "The manipulator operator."));
     195    if (!Parameters.ContainsKey(SolutionCreatorParameterName))
    162196      Parameters.Add(new LookupParameter<ISolutionCreator>(SolutionCreatorParameterName, "The solution creator operator."));
    163       // the analyzer parameters
     197    // the analyzer parameters
     198    if (!Parameters.ContainsKey(EnableCrossoverTrackingParameterName))
    164199      Parameters.Add(new ValueParameter<BoolValue>(EnableCrossoverTrackingParameterName, new BoolValue(true)));
     200    if (!Parameters.ContainsKey(EnableManipulatorTrackingParameterName))
    165201      Parameters.Add(new ValueParameter<BoolValue>(EnableManipulatorTrackingParameterName, new BoolValue(true)));
     202    if (!Parameters.ContainsKey(EnableSolutionCreatorTrackingParameterName))
    166203      Parameters.Add(new ValueParameter<BoolValue>(EnableSolutionCreatorTrackingParameterName, new BoolValue(true)));
    167       // parameters required by the analyzer to do its work
     204    // parameters required by the analyzer to do its work
     205    if (!Parameters.ContainsKey(GenerationsParameterName))
    168206      Parameters.Add(new LookupParameter<IntValue>(GenerationsParameterName, "The number of generations so far."));
     207    if (!Parameters.ContainsKey(ResultsParameterName))
    169208      Parameters.Add(new LookupParameter<ResultCollection>(ResultsParameterName));
     209    if (!Parameters.ContainsKey(PopulationParameterName)) {
    170210      Parameters.Add(new ScopeTreeLookupParameter<T>(PopulationParameterName, "The population of individuals."));
     211    }
     212    if (!Parameters.ContainsKey(QualityParameterName)) {
    171213      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>(QualityParameterName, "The individual qualities."));
    172       Parameters.Add(new ValueParameter<ICrossoverOperator<T>>(BeforeCrossoverOperatorParameterName));
    173       Parameters.Add(new ValueParameter<ICrossoverOperator<T>>(AfterCrossoverOperatorParameterName));
    174       Parameters.Add(new ValueParameter<IManipulatorOperator<T>>(BeforeManipulatorOperatorParameterName));
    175       Parameters.Add(new ValueParameter<IManipulatorOperator<T>>(AfterManipulatorOperatorParameterName));
     214    }
     215    if (!Parameters.ContainsKey(TrimOlderGenerationsParameterName))
    176216      Parameters.Add(new FixedValueParameter<BoolValue>(TrimOlderGenerationsParameterName, "Remove all the generations older than the last generation from the genealoy graph to save memory."));
    177       #endregion add parameters
    178     }
    179 
    180     protected GenealogyAnalyzer(GenealogyAnalyzer<T> original, Cloner cloner)
    181       : base(original, cloner) {
    182     }
    183 
    184     [StorableConstructor]
    185     protected GenealogyAnalyzer(bool deserializing) : base(deserializing) { }
    186 
    187     [StorableHook(HookType.AfterDeserialization)]
    188     private void AfterDeserialization() {
    189       // the instrumented operators
    190       if (!Parameters.ContainsKey(CrossoverParameterName))
    191         Parameters.Add(new LookupParameter<ICrossover>(CrossoverParameterName, "The crossover operator."));
    192       if (!Parameters.ContainsKey(ManipulatorParameterName))
    193         Parameters.Add(new LookupParameter<IManipulator>(ManipulatorParameterName, "The manipulator operator."));
    194       if (!Parameters.ContainsKey(SolutionCreatorParameterName))
    195         Parameters.Add(new LookupParameter<ISolutionCreator>(SolutionCreatorParameterName, "The solution creator operator."));
    196       // the analyzer parameters
    197       if (!Parameters.ContainsKey(EnableCrossoverTrackingParameterName))
    198         Parameters.Add(new ValueParameter<BoolValue>(EnableCrossoverTrackingParameterName, new BoolValue(true)));
    199       if (!Parameters.ContainsKey(EnableManipulatorTrackingParameterName))
    200         Parameters.Add(new ValueParameter<BoolValue>(EnableManipulatorTrackingParameterName, new BoolValue(true)));
    201       if (!Parameters.ContainsKey(EnableSolutionCreatorTrackingParameterName))
    202         Parameters.Add(new ValueParameter<BoolValue>(EnableSolutionCreatorTrackingParameterName, new BoolValue(true)));
    203       // parameters required by the analyzer to do its work
    204       if (!Parameters.ContainsKey(GenerationsParameterName))
    205         Parameters.Add(new LookupParameter<IntValue>(GenerationsParameterName, "The number of generations so far."));
    206       if (!Parameters.ContainsKey(ResultsParameterName))
    207         Parameters.Add(new LookupParameter<ResultCollection>(ResultsParameterName));
    208       if (!Parameters.ContainsKey(PopulationParameterName)) {
    209         Parameters.Add(new ScopeTreeLookupParameter<T>(PopulationParameterName, "The population of individuals."));
    210       }
    211       if (!Parameters.ContainsKey(QualityParameterName)) {
    212         Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>(QualityParameterName, "The individual qualities."));
    213       }
    214       if (!Parameters.ContainsKey(TrimOlderGenerationsParameterName))
    215         Parameters.Add(new FixedValueParameter<BoolValue>(TrimOlderGenerationsParameterName, "Remove all the generations older than the last generation from the genealoy graph to save memory."));
    216     }
    217 
    218     public bool EnabledByDefault {
    219       get { return false; }
    220     }
    221 
    222     private void ConfigureTrackingOperators() {
    223       // at the beginning we add the before/after operators to the instrumented operators
    224       var crossover = CrossoverParameter.ActualValue;
    225       if (crossover != null) {
    226         var instrumentedCrossover = (InstrumentedOperator)crossover;
    227         instrumentedCrossover.AfterExecutionOperators.Clear();
    228         instrumentedCrossover.BeforeExecutionOperators.Clear();
    229 
    230         if (EnableCrossoverTracking.Value) {
    231           if (BeforeCrossoverOperator != null) {
    232             instrumentedCrossover.BeforeExecutionOperators.Add(BeforeCrossoverOperator);
    233           }
    234           if (AfterCrossoverOperator != null) {
    235             instrumentedCrossover.AfterExecutionOperators.Add(AfterCrossoverOperator);
    236           }
    237         }
    238       }
    239       var manipulator = ManipulatorParameter.ActualValue;
    240       if (manipulator != null) {
    241         var instrumentedManipulator = (InstrumentedOperator)manipulator;
    242         instrumentedManipulator.AfterExecutionOperators.Clear();
    243         instrumentedManipulator.BeforeExecutionOperators.Clear();
    244 
    245         if (EnableManipulatorTracking.Value) {
    246           if (BeforeManipulatorOperator != null) {
    247             instrumentedManipulator.BeforeExecutionOperators.Add(BeforeManipulatorOperator);
    248           }
    249           if (AfterManipulatorOperator != null) {
    250             instrumentedManipulator.AfterExecutionOperators.Add(AfterManipulatorOperator);
    251           }
    252         }
    253       }
    254     }
    255 
    256     protected abstract void EvaluateIntermediateChildren();
    257 
    258     public override IOperation Apply() {
    259       IGenealogyGraph<T> genealogyGraph;
    260       var results = ResultsParameter.ActualValue;
    261       if (!results.ContainsKey(PopulationGraphParameterName)) {
    262         genealogyGraph = new GenealogyGraph<T>();
    263         results.Add(new Result(PopulationGraphParameterName, genealogyGraph));
    264       } else {
    265         genealogyGraph = (IGenealogyGraph<T>)results[PopulationGraphParameterName].Value;
    266       }
    267 
    268       var population = PopulationParameter.ActualValue;
    269       var qualities = QualityParameter.ActualValue;
    270 
    271       int generation = GenerationsParameter.ActualValue.Value;
    272       if (generation == 0) {
    273         ConfigureTrackingOperators();
    274 
    275         for (int i = 0; i < population.Length; ++i) {
    276           var individual = population[i];
    277           var vertex = new GenealogyGraphNode<T>(individual) { Rank = generation };
    278           genealogyGraph.AddVertex(vertex);
    279           // save the vertex id in the individual scope (so that we can identify graph indices)
    280           ExecutionContext.Scope.SubScopes[i].Variables.Add(new Variable("Id", new StringValue(vertex.Id)));
    281         }
    282       } else {
    283         int index = 0;
    284         T elite = null;
    285         // identify previous elite individual
    286         for (int i = 0; i < population.Length; ++i) {
    287           if (genealogyGraph.GetByContent(population[i]).Rank.Equals(generation - 1)) {
    288             elite = population[i];
    289             index = i;
    290             break;
    291           }
    292         }
    293         // add current elite and connect with previous
    294         #region add elite in the graph and connect it with the previous elite
    295         if (elite != null) {
    296           var prevVertex = genealogyGraph.GetByContent(elite);
    297           prevVertex.IsElite = true; // mark elites in the graph retroactively
    298           var v = (IGenealogyGraphNode<T>)prevVertex.Clone();
    299           v.Rank = generation;
    300           v.IsElite = false;
    301           population[index] = v.Data;
    302           genealogyGraph.AddVertex(v);
    303           genealogyGraph.AddArc(prevVertex, v);
    304           // inject the graph node unique id to the scope
    305           ExecutionContext.Scope.SubScopes[index].Variables[BeforeManipulatorOperator.ChildParameter.ActualName].Value = v.Data;
    306           ExecutionContext.Scope.SubScopes[index].Variables["Id"].Value = new StringValue(v.Id);
    307         }
    308         #endregion add elite in the graph and connect it with the previous elite
    309       }
    310       // update qualities
     217  }
     218
     219  public bool EnabledByDefault {
     220    get { return false; }
     221  }
     222
     223  private void ConfigureTrackingOperators() {
     224    // at the beginning we add the before/after operators to the instrumented operators
     225    var crossover = CrossoverParameter.ActualValue;
     226    if (crossover != null) {
     227      var instrumentedCrossover = (InstrumentedOperator)crossover;
     228      instrumentedCrossover.AfterExecutionOperators.Clear();
     229      instrumentedCrossover.BeforeExecutionOperators.Clear();
     230
     231      if (EnableCrossoverTracking.Value) {
     232        if (BeforeCrossoverOperator != null) {
     233          instrumentedCrossover.BeforeExecutionOperators.Add(BeforeCrossoverOperator);
     234        }
     235        if (AfterCrossoverOperator != null) {
     236          instrumentedCrossover.AfterExecutionOperators.Add(AfterCrossoverOperator);
     237        }
     238      }
     239    }
     240    var manipulator = ManipulatorParameter.ActualValue;
     241    if (manipulator != null) {
     242      var instrumentedManipulator = (InstrumentedOperator)manipulator;
     243      instrumentedManipulator.AfterExecutionOperators.Clear();
     244      instrumentedManipulator.BeforeExecutionOperators.Clear();
     245
     246      if (EnableManipulatorTracking.Value) {
     247        if (BeforeManipulatorOperator != null) {
     248          instrumentedManipulator.BeforeExecutionOperators.Add(BeforeManipulatorOperator);
     249        }
     250        if (AfterManipulatorOperator != null) {
     251          instrumentedManipulator.AfterExecutionOperators.Add(AfterManipulatorOperator);
     252        }
     253      }
     254    }
     255  }
     256
     257  protected abstract void EvaluateIntermediateChildren();
     258
     259  public override IOperation Apply() {
     260    IGenealogyGraph<T> genealogyGraph;
     261    var results = ResultsParameter.ActualValue;
     262    if (!results.ContainsKey(PopulationGraphParameterName)) {
     263      genealogyGraph = new GenealogyGraph<T>();
     264      results.Add(new Result(PopulationGraphParameterName, genealogyGraph));
     265    } else {
     266      genealogyGraph = (IGenealogyGraph<T>)results[PopulationGraphParameterName].Value;
     267    }
     268
     269    var population = PopulationParameter.ActualValue;
     270    var qualities = QualityParameter.ActualValue;
     271
     272    int generation = GenerationsParameter.ActualValue.Value;
     273    if (generation == 0) {
     274      ConfigureTrackingOperators();
     275
    311276      for (int i = 0; i < population.Length; ++i) {
    312         var vertex = genealogyGraph.GetByContent(population[i]);
    313         vertex.Quality = qualities[i].Value;
    314       }
    315       // update qualities for intermediate vertices
    316       EvaluateIntermediateChildren();
    317 
    318       // remove extra graph nodes (added by the instrumented operators in the case of offspring selection)
    319       var pop = new HashSet<T>(population);
    320       var discarded = genealogyGraph.GetByRank(generation).Where(x => !pop.Contains(x.Data)).ToList();
    321       for (int i = 0; i < discarded.Count; ++i) {
    322         var v = discarded[i];
    323         if (v.InDegree == 1) {
    324           var p = v.Parents.First();
    325           if (p.Rank.Equals(generation - 0.5))
    326             // the individual was a product of mutation. since it wasn't selected, we must remove both it and its parent
    327             // ("intermediate" vertex result of crossover)
    328             discarded.Add(v.Parents.First());
    329         }
    330       }
    331       genealogyGraph.RemoveVertices(discarded);
    332 
    333       //trim
    334       if (TrimOlderGenerations) {
    335         var vertices = genealogyGraph.Vertices.Where(x => x.Rank < generation - 1).ToList(); // select all ranks older than the previous generation
    336         genealogyGraph.RemoveVertices(vertices);
    337       }
    338 
    339       return base.Apply();
    340     }
     277        var individual = population[i];
     278        var vertex = new GenealogyGraphNode<T>(individual) { Rank = generation };
     279        genealogyGraph.AddVertex(vertex);
     280        // save the vertex id in the individual scope (so that we can identify graph indices)
     281        ExecutionContext.Scope.SubScopes[i].Variables.Add(new Variable("Id", new StringValue(vertex.Id)));
     282      }
     283    } else {
     284      int index = 0;
     285      T elite = null;
     286      // identify previous elite individual
     287      for (int i = 0; i < population.Length; ++i) {
     288        if (genealogyGraph.GetByContent(population[i]).Rank.Equals(generation - 1)) {
     289          elite = population[i];
     290          index = i;
     291          break;
     292        }
     293      }
     294      // add current elite and connect with previous
     295      #region add elite in the graph and connect it with the previous elite
     296      if (elite != null) {
     297        var prevVertex = genealogyGraph.GetByContent(elite);
     298        prevVertex.IsElite = true; // mark elites in the graph retroactively
     299        var v = (IGenealogyGraphNode<T>)prevVertex.Clone();
     300        v.Rank = generation;
     301        v.IsElite = false;
     302        population[index] = v.Data;
     303        genealogyGraph.AddVertex(v);
     304        genealogyGraph.AddArc(prevVertex, v);
     305        // inject the graph node unique id to the scope
     306        ExecutionContext.Scope.SubScopes[index].Variables[BeforeManipulatorOperator.ChildParameter.ActualName].Value = v.Data;
     307        ExecutionContext.Scope.SubScopes[index].Variables["Id"].Value = new StringValue(v.Id);
     308      }
     309      #endregion add elite in the graph and connect it with the previous elite
     310    }
     311    // update qualities
     312    for (int i = 0; i < population.Length; ++i) {
     313      var vertex = genealogyGraph.GetByContent(population[i]);
     314      vertex.Quality = qualities[i].Value;
     315    }
     316    // update qualities for intermediate vertices
     317    EvaluateIntermediateChildren();
     318
     319    // remove extra graph nodes (added by the instrumented operators in the case of offspring selection)
     320    var pop = new HashSet<T>(population);
     321    var discarded = genealogyGraph.GetByRank(generation).Where(x => !pop.Contains(x.Data)).ToList();
     322    for (int i = 0; i < discarded.Count; ++i) {
     323      var v = discarded[i];
     324      if (v.InDegree == 1) {
     325        var p = v.Parents.First();
     326        if (p.Rank.Equals(generation - 0.5))
     327          // the individual was a product of mutation. since it wasn't selected, we must remove both it and its parent
     328          // ("intermediate" vertex result of crossover)
     329          discarded.Add(v.Parents.First());
     330      }
     331    }
     332    genealogyGraph.RemoveVertices(discarded);
     333
     334    //trim
     335    if (TrimOlderGenerations) {
     336      var vertices = genealogyGraph.Vertices.Where(x => x.Rank < generation - 1).ToList(); // select all ranks older than the previous generation
     337      genealogyGraph.RemoveVertices(vertices);
     338    }
     339
     340    return base.Apply();
    341341  }
    342342}
  • branches/1772_HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Analyzers/SelectionSchemeAnalyzer.cs

    r12894 r17434  
    2121
    2222using System.Linq;
     23using HEAL.Attic;
    2324using HeuristicLab.Analysis;
    2425using HeuristicLab.Common;
     
    2930using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3031
    31 namespace HeuristicLab.EvolutionTracking {
     32namespace HeuristicLab.EvolutionTracking
     33{
    3234  [Item("SelectionSchemeAnalyzer", "An analyzer which gives information about the relative amount of individuals that get selected each generation")]
    33   [StorableClass]
    34   public class SelectionSchemeAnalyzer : EvolutionTrackingAnalyzer {
     35  [StorableType("96FBBBE5-059C-4EA7-A633-0D2CBD7F58BE")]
     36  public class SelectionSchemeAnalyzer : EvolutionTrackingAnalyzer
     37  {
    3538    private const string StoreHistoryParameterName = "StoreHistory";
    3639
     
    4750
    4851    [StorableConstructor]
    49     protected SelectionSchemeAnalyzer(bool deserializing) : base(deserializing) { }
     52    protected SelectionSchemeAnalyzer(StorableConstructorFlag _) : base(_) { }
    5053
    5154    protected SelectionSchemeAnalyzer(SelectionSchemeAnalyzer original, Cloner cloner) : base(original, cloner) { }
  • branches/1772_HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Fragment.cs

    r11928 r17434  
    1 using HeuristicLab.Common;
     1using HEAL.Attic;
     2using HeuristicLab.Common;
    23using HeuristicLab.Core;
    34using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    45
    56namespace HeuristicLab.EvolutionTracking {
    6   [StorableClass]
    77  [Item("Fragment", "A fragment is an object that represents a piece of inherited genetic information.")]
     8  [StorableType("21BE7538-052E-451E-A0A3-CD8CBF51B051")]
    89  public class Fragment : Item, IFragment {
    910    [Storable]
     
    2021    }
    2122    [StorableConstructor]
    22     protected Fragment(bool deserializable) : base(deserializable) { }
     23    protected Fragment(StorableConstructorFlag _) : base(_) { }
    2324
    2425    protected Fragment(Fragment original, Cloner cloner)
     
    3637  }
    3738
    38   [StorableClass]
    3939  [Item("Fragment", "A fragment is an object that represents a piece of inherited genetic information.")]
     40  [StorableType("19346017-6C9E-41BF-BCD2-00B1FE82F2FA")]
    4041  public class Fragment<T> : Fragment, IFragment<T> where T : class {
    4142    public new T Root {
     
    5354
    5455    [StorableConstructor]
    55     protected Fragment(bool deserializable) : base(deserializable) { }
     56    protected Fragment(StorableConstructorFlag _) : base(_) { }
    5657
    5758    public Fragment() { }
  • branches/1772_HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/GenealogyGraph/GenealogyGraph.cs

    r12966 r17434  
    2626using System.Linq;
    2727using System.Text;
     28using HEAL.Attic;
    2829using HeuristicLab.Common;
    2930using HeuristicLab.Core;
    3031using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3132
    32 namespace HeuristicLab.EvolutionTracking {
    33   [StorableClass]
     33namespace HeuristicLab.EvolutionTracking
     34{
    3435  [Item("GenealogyGraph", "A class representing a genealogy graph")]
    35   public class GenealogyGraph : DirectedGraph, IGenealogyGraph {
     36  [StorableType("66DCA305-87F7-41D8-91CF-68415B1809A8")]
     37  public class GenealogyGraph : DirectedGraph, IGenealogyGraph
     38  {
    3639    private Dictionary<object, IGenealogyGraphNode> contentMap;
    3740    private Dictionary<string, IGenealogyGraphNode> idMap;
     
    7174
    7275    [StorableConstructor]
    73     protected GenealogyGraph(bool deserializing)
    74       : base(deserializing) {
    75     }
     76    protected GenealogyGraph(StorableConstructorFlag _) : base(_) { }
    7677    [StorableHook(HookType.AfterDeserialization)]
    7778    private void AfterDeserialization() {
     
    191192
    192193  [Item("GenealogyGraph", "A genealogy graph in which the vertex data is of type T")]
    193   [StorableClass]
    194   public class GenealogyGraph<T> : GenealogyGraph, IGenealogyGraph<T> where T : class, IItem {
     194  [StorableType("3F5043F7-2538-4B76-BA12-062A4CEF5A1A")]
     195  public class GenealogyGraph<T> : GenealogyGraph, IGenealogyGraph<T> where T : class, IItem
     196  {
    195197    public GenealogyGraph() { }
    196198    private GenealogyGraph(GenealogyGraph original, Cloner cloner)
  • branches/1772_HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/GenealogyGraph/GenealogyGraphArc.cs

    r11925 r17434  
    2020#endregion
    2121
     22using HEAL.Attic;
    2223using HeuristicLab.Common;
    2324using HeuristicLab.Core;
     
    2526
    2627namespace HeuristicLab.EvolutionTracking {
    27   [StorableClass]
    2828  [Item("GenealogyGraphArc", "A graph arc connecting two GenealogyGraphNodes and holding some data.")]
     29  [StorableType("011C69C6-7E84-4AB0-8DBB-9A5BB69D9484")]
    2930  public class GenealogyGraphArc : Arc<IDeepCloneable>, IGenealogyGraphArc {
    3031    [StorableConstructor]
    31     protected GenealogyGraphArc(bool deserializing) : base(deserializing) { }
     32    protected GenealogyGraphArc(StorableConstructorFlag _) : base(_) { }
    3233    protected GenealogyGraphArc(GenealogyGraphArc original, Cloner cloner)
    3334      : base(original, cloner) { }
     
    5051  }
    5152
    52   [StorableClass]
    5353  [Item("GenealogyGraphArc", "")]
     54  [StorableType("47612662-7C98-44F8-94D0-132B425889F5")]
    5455  public class GenealogyGraphArc<T> : GenealogyGraphArc where T : class,IItem {
    5556    [StorableConstructor]
    56     protected GenealogyGraphArc(bool deserializing) : base(deserializing) { }
     57    protected GenealogyGraphArc(StorableConstructorFlag _) : base(_) { }
    5758
    5859    protected GenealogyGraphArc(GenealogyGraphArc original, Cloner cloner)
  • branches/1772_HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/GenealogyGraph/GenealogyGraphNode.cs

    r15757 r17434  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using HEAL.Attic;
    2526using HeuristicLab.Common;
    2627using HeuristicLab.Core;
     
    2829
    2930namespace HeuristicLab.EvolutionTracking {
    30   [StorableClass]
    3131  [Item("GenealogGraphNode", "A class representing a node in the GenealogyGraph")]
     32  [StorableType("3112AC58-F11A-435A-A669-8C9B6EF88F40")]
    3233  public class GenealogyGraphNode : Vertex<IDeepCloneable>, IGenealogyGraphNode {
    3334    [StorableConstructor]
    34     protected GenealogyGraphNode(bool deserializing) : base(deserializing) { }
     35    protected GenealogyGraphNode(StorableConstructorFlag _) : base(_) { }
    3536
    3637    public override IDeepCloneable Clone(Cloner cloner) {
     
    132133  }
    133134
    134   [StorableClass]
    135135  [Item("GenealogyGraphNode", "A genealogy graph node which also has a Content")]
     136  [StorableType("68BE4E3D-2578-4C06-BF03-8583BA03022F")]
    136137  public class GenealogyGraphNode<T> : GenealogyGraphNode, IGenealogyGraphNode<T> where T : class, IItem {
    137138    public new T Data {
     
    141142
    142143    [StorableConstructor]
    143     protected GenealogyGraphNode(bool deserializing) : base(deserializing) { }
     144    protected GenealogyGraphNode(StorableConstructorFlag _) : base(_) { }
    144145
    145146    public GenealogyGraphNode(IDeepCloneable content) : base(content) { }
  • branches/1772_HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/HeuristicLab.EvolutionTracking-3.4.csproj

    r16131 r17434  
    11<?xml version="1.0" encoding="utf-8"?>
    2 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
     2<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    33  <PropertyGroup>
    44    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     
    1111    <RootNamespace>HeuristicLab.EvolutionTracking</RootNamespace>
    1212    <AssemblyName>HeuristicLab.EvolutionTracking-3.4</AssemblyName>
    13     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
     13    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
    1414    <FileAlignment>512</FileAlignment>
    1515    <TargetFrameworkProfile />
     
    6262  </PropertyGroup>
    6363  <ItemGroup>
     64    <Reference Include="HEAL.Attic, Version=1.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     65      <SpecificVersion>False</SpecificVersion>
     66      <HintPath>..\..\..\..\trunk\bin\HEAL.Attic.dll</HintPath>
     67    </Reference>
    6468    <Reference Include="HeuristicLab.Analysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    6569      <SpecificVersion>False</SpecificVersion>
  • branches/1772_HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Operators/AfterCrossoverOperator.cs

    r14574 r17434  
    2020#endregion
    2121
     22using HEAL.Attic;
    2223using HeuristicLab.Common;
    2324using HeuristicLab.Core;
     
    2627
    2728namespace HeuristicLab.EvolutionTracking {
    28   [StorableClass]
    2929  [Item("AfterCrossoverOperator", "A generic operator that can record genealogical relationships between crossover parents and children.")]
     30  [StorableType("E43B0F0A-998D-4CD1-A030-B2A927086433")]
    3031  public class AfterCrossoverOperator<T> : EvolutionTrackingOperator<T>, ICrossoverOperator<T> where T : class, IItem {
    3132    private const string ParentsParameterName = "Parents";
     
    4647    }
    4748    [StorableConstructor]
    48     protected AfterCrossoverOperator(bool deserializing) : base(deserializing) { }
     49    protected AfterCrossoverOperator(StorableConstructorFlag _) : base(_) { }
    4950
    5051    public AfterCrossoverOperator() {
  • branches/1772_HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Operators/AfterManipulatorOperator.cs

    r11227 r17434  
    2020#endregion
    2121
     22using HEAL.Attic;
    2223using HeuristicLab.Common;
    2324using HeuristicLab.Core;
     
    2627
    2728namespace HeuristicLab.EvolutionTracking {
    28   [StorableClass]
    2929  [Item("AfterCrossoverOperator", "Performs an action after the crossover operator is applied.")]
     30  [StorableType("DF888AB7-709A-41BD-A201-F026CE4DB8F4")]
    3031  public class AfterManipulatorOperator<T> : EvolutionTrackingOperator<T>, IManipulatorOperator<T> where T : class,IItem {
    3132    private const string ChildParameterName = "Child";
     
    4243    }
    4344    [StorableConstructor]
    44     protected AfterManipulatorOperator(bool deserializing) : base(deserializing) { }
     45    protected AfterManipulatorOperator(StorableConstructorFlag _) : base(_) { }
    4546
    4647    public AfterManipulatorOperator() {
  • branches/1772_HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Operators/AfterSolutionCreatorOperator.cs

    r10650 r17434  
    2020#endregion
    2121
     22using HEAL.Attic;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Parameters;
     
    2526
    2627namespace HeuristicLab.EvolutionTracking.Operators {
    27   [StorableClass]
    2828  [Item("AfterSolutionCreatorOperator", "An operator that runs after the solution creator and performs additional actions.")]
     29  [StorableType("A5B1528D-336B-48CF-8F74-8F2322F8A136")]
    2930  public class AfterSolutionCreatorOperator<T> : EvolutionTrackingOperator<T>
    3031    where T : class,IItem {
  • branches/1772_HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Operators/BeforeCrossoverOperator.cs

    r11858 r17434  
    2222using System;
    2323using System.Linq;
     24using HEAL.Attic;
    2425using HeuristicLab.Common;
    2526using HeuristicLab.Core;
     
    2930
    3031namespace HeuristicLab.EvolutionTracking {
    31   [StorableClass]
    3232  [Item("BeforeCrossoverOperator", "A generic operator that can record genealogical relationships between crossover parents and children.")]
     33  [StorableType("A44A9100-AD1D-459C-A45A-CE7C1B894E71")]
    3334  public class BeforeCrossoverOperator<T> : EvolutionTrackingOperator<T>, ICrossoverOperator<T> where T : class,IItem {
    3435    private const string ParentsParameterName = "Parents";
     
    5556
    5657    [StorableConstructor]
    57     protected BeforeCrossoverOperator(bool deserializing) : base(deserializing) { }
     58    protected BeforeCrossoverOperator(StorableConstructorFlag _) : base(_) { }
    5859
    5960    public BeforeCrossoverOperator() {
  • branches/1772_HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Operators/BeforeManipulatorOperator.cs

    r13527 r17434  
    2121
    2222using System.Linq;
     23using HEAL.Attic;
    2324using HeuristicLab.Common;
    2425using HeuristicLab.Core;
     
    2728
    2829namespace HeuristicLab.EvolutionTracking {
    29   [StorableClass]
    3030  [Item("AfterCrossoverOperator", "Performs an action after the crossover operator is applied.")]
     31  [StorableType("78C5698A-39B8-4158-83F6-7E6CFAF5BD2A")]
    3132  public class BeforeManipulatorOperator<T> : EvolutionTrackingOperator<T>, IManipulatorOperator<T> where T : class, IItem {
    3233    private const string ChildParameterName = "Child";
     
    4546
    4647    [StorableConstructor]
    47     protected BeforeManipulatorOperator(bool deserializing) : base(deserializing) { }
     48    protected BeforeManipulatorOperator(StorableConstructorFlag _) : base(_) { }
    4849
    4950    public BeforeManipulatorOperator() {
  • branches/1772_HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Operators/EvolutionTrackingOperator.cs

    r12951 r17434  
    2020#endregion
    2121
     22using HEAL.Attic;
    2223using HeuristicLab.Common;
    2324using HeuristicLab.Core;
     
    3031namespace HeuristicLab.EvolutionTracking {
    3132  [Item("EvolutionTrackingOperator", "A base operator which facilitates access to the genealogy graph.")]
    32   [StorableClass]
     33  [StorableType("27D4603D-0EDC-4C77-9AB9-ED10CA6D4613")]
    3334  public class EvolutionTrackingOperator<T> : SingleSuccessorOperator where T : class, IItem {
    3435    // evolution tracking-related parameters
     
    7374    }
    7475    [StorableConstructor]
    75     protected EvolutionTrackingOperator(bool deserializing) : base(deserializing) { }
     76    protected EvolutionTrackingOperator(StorableConstructorFlag _) : base(_) { }
    7677  }
    7778}
  • branches/1772_HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking/3.4/Operators/RemovePopulationGraphFromResults.cs

    r16131 r17434  
    1 using HeuristicLab.Common;
     1using HEAL.Attic;
     2using HeuristicLab.Common;
    23using HeuristicLab.Core;
    34using HeuristicLab.Operators;
     
    1213
    1314namespace HeuristicLab.EvolutionTracking.Operators {
    14   [StorableClass]
    1515  [Item("RemovePopulationGraphFromResultsOperator", "In some cases the genealogy graph is necessary during the run but to save memory it should be removed from the results at the end of the run.")]
     16  [StorableType("5F5FEAAD-DA7C-4C8C-A9B3-B4DE30B64C51")]
    1617  public class RemovePopulationGraphFromResultsOperator : SingleSuccessorOperator {
    1718
     
    2324
    2425    [StorableConstructor]
    25     protected RemovePopulationGraphFromResultsOperator(bool deserializing) : base(deserializing) { }
     26    protected RemovePopulationGraphFromResultsOperator(StorableConstructorFlag _) : base(_) { }
    2627
    2728    [StorableHook(HookType.AfterDeserialization)]
Note: See TracChangeset for help on using the changeset viewer.