Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/23/15 16:59:32 (10 years ago)
Author:
mkommend
Message:

#2320: Adapted all dependent plugins to the new design of the symbolic expression tree interfaces.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SymbolicExpressionTreeEncoding/HeuristicLab.Problems.GrammaticalEvolution/3.3/ArtificialAnt/GEArtificialAntEvaluator.cs

    r12012 r12341  
    4949    }
    5050    // phenotype:
    51     public ILookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter {
    52       get { return (ILookupParameter<SymbolicExpressionTree>)Parameters["SymbolicExpressionTree"]; }
     51    public ILookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter {
     52      get { return (ILookupParameter<ISymbolicExpressionTree>)Parameters["SymbolicExpressionTree"]; }
    5353    }
    5454    public ILookupParameter<BoolMatrix> WorldParameter {
     
    8484      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of the evaluated artificial ant solution."));
    8585      Parameters.Add(new LookupParameter<IntegerVector>("IntegerVector", "The artificial ant solution encoded as an integer vector genome."));
    86       Parameters.Add(new LookupParameter<SymbolicExpressionTree>("SymbolicExpressionTree", "The artificial ant solution encoded as a symbolic expression tree that should be evaluated"));
     86      Parameters.Add(new LookupParameter<ISymbolicExpressionTree>("SymbolicExpressionTree", "The artificial ant solution encoded as a symbolic expression tree that should be evaluated"));
    8787      Parameters.Add(new LookupParameter<BoolMatrix>("World", "The world for the artificial ant with scattered food items."));
    8888      Parameters.Add(new LookupParameter<IntValue>("MaxTimeSteps", "The maximal number of time steps that the artificial ant should be simulated."));
     
    9393      Parameters.Add(new LookupParameter<IntMatrix>("Bounds", "The integer number range in which the single genomes of a genotype are created."));
    9494      Parameters.Add(new LookupParameter<IntValue>("MaximumExpressionLength", "Maximal length of the expression to control the artificial ant (genotype length)."));
     95    }
     96
     97    [StorableHook(HookType.AfterDeserialization)]
     98    private void AfterDeserialization() {
     99      // BackwardsCompatibility3.3
     100      #region Backwards compatible code, remove with 3.4
     101
     102      if (Parameters.ContainsKey("SymbolicExpressionTree") &&
     103          Parameters["SymbolicExpressionTree"] is ILookupParameter<SymbolicExpressionTree>) {
     104        Parameters.Remove("SymbolicExpressionTree");
     105        Parameters.Add(new LookupParameter<ISymbolicExpressionTree>("SymbolicExpressionTree", "The artificial ant solution encoded as a symbolic expression tree that should be evaluated"));
     106      }
     107
     108      #endregion
     109
    95110    }
    96111
Note: See TracChangeset for help on using the changeset viewer.