source: branches/GrammaticalEvolution/HeuristicLab.Problems.GrammaticalEvolution/Symbolic/GESymbolicDataAnalysisProblem.cs @ 10226

Last change on this file since 10226 was 10226, checked in by sawinkle, 6 years ago

#2109:

  • Added file IGESymbolicDataAnalysisProblem.cs to determine, which parameters should be used. => Removed parameters MaximumSymbolicExpressionTreeDepthParameter, MaximumFunctionDefinitionsParameter and MaximumFunctionArgumentsParameter, which are unnecessary for Grammatical Evolution.
  • Adapted the other files to use the interfaces of the new file IGESymbolicDataAnalysisProblem.cs
File size: 22.5 KB
Line 
1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
4 *
5 * This file is part of HeuristicLab.
6 *
7 * HeuristicLab is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * HeuristicLab is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
19 */
20#endregion
21
22using System;
23using System.Drawing;
24using System.Linq;
25using HeuristicLab.Common;
26using HeuristicLab.Common.Resources;
27using HeuristicLab.Core;
28using HeuristicLab.Data;
29using HeuristicLab.Encodings.IntegerVectorEncoding;
30using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
31using HeuristicLab.Optimization;
32using HeuristicLab.Parameters;
33using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
34using HeuristicLab.PluginInfrastructure;
35using HeuristicLab.Problems.DataAnalysis;
36using HeuristicLab.Problems.DataAnalysis.Symbolic;
37using HeuristicLab.Problems.GrammaticalEvolution.Mappers;
38using HeuristicLab.Problems.Instances;
39
40namespace HeuristicLab.Problems.GrammaticalEvolution {
41  [StorableClass]
42  public abstract class GESymbolicDataAnalysisProblem<T, U, V> : HeuristicOptimizationProblem<U, V>, IDataAnalysisProblem<T>,
43                                                                 IGESymbolicDataAnalysisProblem, IStorableContent,
44                                                                 IProblemInstanceConsumer<T>, IProblemInstanceExporter<T>
45    where T : class, IDataAnalysisProblemData
46    where U : class, IGESymbolicDataAnalysisEvaluator<T>
47    where V : class, IIntegerVectorCreator {
48
49    #region parameter names & descriptions
50    private const string ProblemDataParameterName = "ProblemData";
51    private const string SymbolicExpressionTreeGrammarParameterName = "SymbolicExpressionTreeGrammar";
52    private const string SymbolicExpressionTreeInterpreterParameterName = "SymbolicExpressionTreeInterpreter";
53    //private const string MaximumSymbolicExpressionTreeDepthParameterName = "MaximumSymbolicExpressionTreeDepth";
54    private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
55    //private const string MaximumFunctionDefinitionsParameterName = "MaximumFunctionDefinitions";
56    //private const string MaximumFunctionArgumentsParameterName = "MaximumFunctionArguments";
57    private const string RelativeNumberOfEvaluatedSamplesParameterName = "RelativeNumberOfEvaluatedSamples";
58    private const string FitnessCalculationPartitionParameterName = "FitnessCalculationPartition";
59    private const string ValidationPartitionParameterName = "ValidationPartition";
60    private const string ApplyLinearScalingParameterName = "ApplyLinearScaling";
61    private const string BoundsParameterName = "Bounds";
62    private const string GenotypeToPhenotypeMapperParameterName = "GenotypeToPhenotypeMapper";
63
64    private const string ProblemDataParameterDescription = "";
65    private const string SymbolicExpressionTreeGrammarParameterDescription = "The grammar that should be used for symbolic expression tree.";
66    private const string SymoblicExpressionTreeInterpreterParameterDescription = "The interpreter that should be used to evaluate the symbolic expression tree.";
67    private const string MaximumSymbolicExpressionTreeDepthParameterDescription = "Maximal depth of the symbolic expression. The minimum depth needed for the algorithm is 3 because two levels are reserved for the ProgramRoot and the Start symbol.";
68    private const string MaximumSymbolicExpressionTreeLengthParameterDescription = "Maximal length of the symbolic expression.";
69    private const string MaximumFunctionDefinitionsParameterDescription = "Maximal number of automatically defined functions";
70    private const string MaximumFunctionArgumentsParameterDescription = "Maximal number of arguments of automatically defined functions.";
71    private const string RelativeNumberOfEvaluatedSamplesParameterDescription = "The relative number of samples of the dataset partition, which should be randomly chosen for evaluation.";
72    private const string FitnessCalculationPartitionParameterDescription = "The partition of the problem data training partition, that should be used to calculate the fitness of an individual.";
73    private const string ValidationPartitionParameterDescription = "The partition of the problem data training partition, that should be used to select the best model from (optional).";
74    private const string ApplyLinearScalingParameterDescription = "Flag that indicates if the individual should be linearly scaled before evaluating.";
75    private const string BoundsParameterDescription = "The integer number range in which the single genomes of a genotype are created.";
76    private const string GenotypeToPhenotypeMapperParameterDescription = "Maps the genotype (an integer vector) to the phenotype (a symbolic expression tree).";
77    #endregion
78
79    #region parameter properties
80    IParameter IDataAnalysisProblem.ProblemDataParameter {
81      get { return ProblemDataParameter; }
82    }
83    public IValueParameter<T> ProblemDataParameter {
84      get { return (IValueParameter<T>)Parameters[ProblemDataParameterName]; }
85    }
86    public IValueParameter<ISymbolicDataAnalysisGrammar> SymbolicExpressionTreeGrammarParameter {
87      get { return (IValueParameter<ISymbolicDataAnalysisGrammar>)Parameters[SymbolicExpressionTreeGrammarParameterName]; }
88    }
89    public IValueParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicExpressionTreeInterpreterParameter {
90      get { return (IValueParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicExpressionTreeInterpreterParameterName]; }
91    }
92    //public IFixedValueParameter<IntValue> MaximumSymbolicExpressionTreeDepthParameter {
93    //  get { return (IFixedValueParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeDepthParameterName]; }
94    //}
95    public IFixedValueParameter<IntValue> MaximumSymbolicExpressionTreeLengthParameter {
96      get { return (IFixedValueParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeLengthParameterName]; }
97    }
98    //public IFixedValueParameter<IntValue> MaximumFunctionDefinitionsParameter {
99    //  get { return (IFixedValueParameter<IntValue>)Parameters[MaximumFunctionDefinitionsParameterName]; }
100    //}
101    //public IFixedValueParameter<IntValue> MaximumFunctionArgumentsParameter {
102    //  get { return (IFixedValueParameter<IntValue>)Parameters[MaximumFunctionArgumentsParameterName]; }
103    //}
104    public IFixedValueParameter<PercentValue> RelativeNumberOfEvaluatedSamplesParameter {
105      get { return (IFixedValueParameter<PercentValue>)Parameters[RelativeNumberOfEvaluatedSamplesParameterName]; }
106    }
107    public IFixedValueParameter<IntRange> FitnessCalculationPartitionParameter {
108      get { return (IFixedValueParameter<IntRange>)Parameters[FitnessCalculationPartitionParameterName]; }
109    }
110    public IFixedValueParameter<IntRange> ValidationPartitionParameter {
111      get { return (IFixedValueParameter<IntRange>)Parameters[ValidationPartitionParameterName]; }
112    }
113    public IFixedValueParameter<BoolValue> ApplyLinearScalingParameter {
114      get { return (IFixedValueParameter<BoolValue>)Parameters[ApplyLinearScalingParameterName]; }
115    }
116    public IValueParameter<IntMatrix> BoundsParameter {
117      get { return (IValueParameter<IntMatrix>)Parameters[BoundsParameterName]; }
118    }
119    public IValueParameter<IGenotypeToPhenotypeMapper> GenotypeToPhenotypeMapperParameter {
120      get { return (IValueParameter<IGenotypeToPhenotypeMapper>)Parameters[GenotypeToPhenotypeMapperParameterName]; }
121    }
122    #endregion
123
124    #region properties
125    public string Filename { get; set; }
126    public static new Image StaticItemImage { get { return VSImageLibrary.Type; } }
127
128    IDataAnalysisProblemData IDataAnalysisProblem.ProblemData {
129      get { return ProblemData; }
130    }
131    public T ProblemData {
132      get { return ProblemDataParameter.Value; }
133      set { ProblemDataParameter.Value = value; }
134    }
135
136    public ISymbolicDataAnalysisGrammar SymbolicExpressionTreeGrammar {
137      get { return SymbolicExpressionTreeGrammarParameter.Value; }
138      set { SymbolicExpressionTreeGrammarParameter.Value = value; }
139    }
140    public ISymbolicDataAnalysisExpressionTreeInterpreter SymbolicExpressionTreeInterpreter {
141      get { return SymbolicExpressionTreeInterpreterParameter.Value; }
142      set { SymbolicExpressionTreeInterpreterParameter.Value = value; }
143    }
144
145    //public IntValue MaximumSymbolicExpressionTreeDepth {
146    //  get { return MaximumSymbolicExpressionTreeDepthParameter.Value; }
147    //}
148    public IntValue MaximumSymbolicExpressionTreeLength {
149      get { return MaximumSymbolicExpressionTreeLengthParameter.Value; }
150    }
151    //public IntValue MaximumFunctionDefinitions {
152    //  get { return MaximumFunctionDefinitionsParameter.Value; }
153    //}
154    //public IntValue MaximumFunctionArguments {
155    //  get { return MaximumFunctionArgumentsParameter.Value; }
156    //}
157    public PercentValue RelativeNumberOfEvaluatedSamples {
158      get { return RelativeNumberOfEvaluatedSamplesParameter.Value; }
159    }
160
161    public IntRange FitnessCalculationPartition {
162      get { return FitnessCalculationPartitionParameter.Value; }
163    }
164    public IntRange ValidationPartition {
165      get { return ValidationPartitionParameter.Value; }
166    }
167    public BoolValue ApplyLinearScaling {
168      get { return ApplyLinearScalingParameter.Value; }
169    }
170    #endregion
171
172    [StorableConstructor]
173    protected GESymbolicDataAnalysisProblem(bool deserializing) : base(deserializing) { }
174    [StorableHook(HookType.AfterDeserialization)]
175    private void AfterDeserialization() {
176      if (!Parameters.ContainsKey(ApplyLinearScalingParameterName)) {
177        Parameters.Add(new FixedValueParameter<BoolValue>(ApplyLinearScalingParameterName, ApplyLinearScalingParameterDescription, new BoolValue(false)));
178        ApplyLinearScalingParameter.Hidden = true;
179
180        //it is assumed that for all symbolic regression algorithms linear scaling was set to true
181        //there is no possibility to determine the previous value of the parameter as it was stored in the evaluator
182        if (GetType().Name.Contains("SymbolicRegression"))
183          ApplyLinearScaling.Value = true;
184      }
185
186      RegisterEventHandlers();
187    }
188    protected GESymbolicDataAnalysisProblem(GESymbolicDataAnalysisProblem<T, U, V> original, Cloner cloner)
189      : base(original, cloner) {
190      RegisterEventHandlers();
191    }
192
193    protected GESymbolicDataAnalysisProblem(T problemData, U evaluator, V solutionCreator)
194      : base(evaluator, solutionCreator) {
195      Parameters.Add(new ValueParameter<T>(ProblemDataParameterName, ProblemDataParameterDescription, problemData));
196      Parameters.Add(new ValueParameter<ISymbolicDataAnalysisGrammar>(SymbolicExpressionTreeGrammarParameterName, SymbolicExpressionTreeGrammarParameterDescription));
197      Parameters.Add(new ValueParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicExpressionTreeInterpreterParameterName, SymoblicExpressionTreeInterpreterParameterDescription));
198      //Parameters.Add(new FixedValueParameter<IntValue>(MaximumSymbolicExpressionTreeDepthParameterName, MaximumSymbolicExpressionTreeDepthParameterDescription));
199      Parameters.Add(new FixedValueParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName, MaximumSymbolicExpressionTreeLengthParameterDescription));
200      //Parameters.Add(new FixedValueParameter<IntValue>(MaximumFunctionDefinitionsParameterName, MaximumFunctionDefinitionsParameterDescription));
201      //Parameters.Add(new FixedValueParameter<IntValue>(MaximumFunctionArgumentsParameterName, MaximumFunctionArgumentsParameterDescription));
202      Parameters.Add(new FixedValueParameter<IntRange>(FitnessCalculationPartitionParameterName, FitnessCalculationPartitionParameterDescription));
203      Parameters.Add(new FixedValueParameter<IntRange>(ValidationPartitionParameterName, ValidationPartitionParameterDescription));
204      Parameters.Add(new FixedValueParameter<PercentValue>(RelativeNumberOfEvaluatedSamplesParameterName, RelativeNumberOfEvaluatedSamplesParameterDescription, new PercentValue(1)));
205      Parameters.Add(new FixedValueParameter<BoolValue>(ApplyLinearScalingParameterName, ApplyLinearScalingParameterDescription, new BoolValue(false)));
206      IntMatrix m = new IntMatrix(new int[,] { { 0, 100 } });
207      Parameters.Add(new ValueParameter<IntMatrix>(BoundsParameterName, BoundsParameterDescription, m));
208      Parameters.Add(new ValueParameter<IGenotypeToPhenotypeMapper>(GenotypeToPhenotypeMapperParameterName, GenotypeToPhenotypeMapperParameterDescription, new DepthFirstMapper()));
209
210      SymbolicExpressionTreeInterpreterParameter.Hidden = true;
211      //MaximumFunctionArgumentsParameter.Hidden = true;
212      //MaximumFunctionDefinitionsParameter.Hidden = true;
213      ApplyLinearScalingParameter.Hidden = true;
214
215      SymbolicExpressionTreeGrammar = new TypeCoherentExpressionGrammar();
216      SymbolicExpressionTreeInterpreter = new SymbolicDataAnalysisExpressionTreeLinearInterpreter();
217
218      FitnessCalculationPartition.Start = ProblemData.TrainingPartition.Start;
219      FitnessCalculationPartition.End = ProblemData.TrainingPartition.End;
220
221      InitializeOperators();
222
223      UpdateGrammar();
224      RegisterEventHandlers();
225    }
226
227    protected virtual void UpdateGrammar() {
228      //SymbolicExpressionTreeGrammar.MaximumFunctionArguments = MaximumFunctionArguments.Value;
229      //SymbolicExpressionTreeGrammar.MaximumFunctionDefinitions = MaximumFunctionDefinitions.Value;
230      foreach (var varSymbol in SymbolicExpressionTreeGrammar.Symbols.OfType<HeuristicLab.Problems.DataAnalysis.Symbolic.Variable>()) {
231        if (!varSymbol.Fixed) {
232          varSymbol.AllVariableNames = ProblemData.InputVariables.Select(x => x.Value);
233          varSymbol.VariableNames = ProblemData.AllowedInputVariables;
234        }
235      }
236      foreach (var varSymbol in SymbolicExpressionTreeGrammar.Symbols.OfType<HeuristicLab.Problems.DataAnalysis.Symbolic.VariableCondition>()) {
237        if (!varSymbol.Fixed) {
238          varSymbol.AllVariableNames = ProblemData.InputVariables.Select(x => x.Value);
239          varSymbol.VariableNames = ProblemData.AllowedInputVariables;
240        }
241      }
242    }
243
244    private void InitializeOperators() {
245      Operators.AddRange(ApplicationManager.Manager.GetInstances<IIntegerVectorOperator>().OfType<IOperator>());
246      // Operators.AddRange(ApplicationManager.Manager.GetInstances<ISymbolicDataAnalysisExpressionCrossover<T>>());
247      Operators.Add(new SymbolicExpressionSymbolFrequencyAnalyzer());
248      Operators.Add(new SymbolicDataAnalysisVariableFrequencyAnalyzer());
249      Operators.Add(new MinAverageMaxSymbolicExpressionTreeLengthAnalyzer());
250      Operators.Add(new SymbolicExpressionTreeLengthAnalyzer());
251      ParameterizeOperators();
252    }
253
254    #region events
255    private void RegisterEventHandlers() {
256      ProblemDataParameter.ValueChanged += new EventHandler(ProblemDataParameter_ValueChanged);
257      ProblemDataParameter.Value.Changed += (object sender, EventArgs e) => OnProblemDataChanged();
258
259      SymbolicExpressionTreeGrammarParameter.ValueChanged += new EventHandler(SymbolicExpressionTreeGrammarParameter_ValueChanged);
260
261      //MaximumFunctionArguments.ValueChanged += new EventHandler(ArchitectureParameterValue_ValueChanged);
262      //MaximumFunctionDefinitions.ValueChanged += new EventHandler(ArchitectureParameterValue_ValueChanged);
263      //MaximumSymbolicExpressionTreeDepth.ValueChanged += new EventHandler(MaximumSymbolicExpressionTreeDepth_ValueChanged);
264    }
265
266    private void ProblemDataParameter_ValueChanged(object sender, EventArgs e) {
267      ValidationPartition.Start = 0;
268      ValidationPartition.End = 0;
269      ProblemDataParameter.Value.Changed += (object s, EventArgs args) => OnProblemDataChanged();
270      OnProblemDataChanged();
271    }
272
273    private void SymbolicExpressionTreeGrammarParameter_ValueChanged(object sender, EventArgs e) {
274      UpdateGrammar();
275    }
276
277    private void ArchitectureParameterValue_ValueChanged(object sender, EventArgs e) {
278      UpdateGrammar();
279    }
280
281    //private void MaximumSymbolicExpressionTreeDepth_ValueChanged(object sender, EventArgs e) {
282    //  if (MaximumSymbolicExpressionTreeDepth != null && MaximumSymbolicExpressionTreeDepth.Value < 3)
283    //    MaximumSymbolicExpressionTreeDepth.Value = 3;
284    //}
285
286    //protected override void OnSolutionCreatorChanged() {
287    //  base.OnSolutionCreatorChanged();
288    //  ParameterizeOperators();
289    //}
290
291    protected override void OnEvaluatorChanged() {
292      base.OnEvaluatorChanged();
293      Evaluator.SymbolicExpressionTreeParameter.ActualNameChanged += new EventHandler(Evaluator_SymbolicExpressionTreeParameter_ActualNameChanged);
294      ParameterizeOperators();
295    }
296
297    private void Evaluator_SymbolicExpressionTreeParameter_ActualNameChanged(object sender, EventArgs e) {
298      ParameterizeOperators();
299    }
300
301    public event EventHandler ProblemDataChanged;
302    protected virtual void OnProblemDataChanged() {
303      FitnessCalculationPartition.Start = ProblemData.TrainingPartition.Start;
304      FitnessCalculationPartition.End = ProblemData.TrainingPartition.End;
305
306      UpdateGrammar();
307      ParameterizeOperators();
308
309      var handler = ProblemDataChanged;
310      if (handler != null) handler(this, EventArgs.Empty);
311
312      OnReset();
313    }
314    #endregion
315
316    protected virtual void ParameterizeOperators() {
317      var operators = Parameters.OfType<IValueParameter>().Select(p => p.Value).OfType<IOperator>().Union(Operators).ToList();
318
319      foreach (var op in operators.OfType<ISymbolicExpressionTreeGrammarBasedOperator>()) {
320        op.SymbolicExpressionTreeGrammarParameter.ActualName = SymbolicExpressionTreeGrammarParameter.Name;
321      }
322      /*
323      foreach (var op in operators.OfType<ISymbolicExpressionTreeSizeConstraintOperator>()) {
324        op.MaximumSymbolicExpressionTreeDepthParameter.ActualName = MaximumSymbolicExpressionTreeDepthParameter.Name;
325        op.MaximumSymbolicExpressionTreeLengthParameter.ActualName = MaximumSymbolicExpressionTreeLengthParameter.Name;
326      }
327      foreach (var op in operators.OfType<ISymbolicExpressionTreeArchitectureAlteringOperator>()) {
328        op.MaximumFunctionArgumentsParameter.ActualName = MaximumFunctionArgumentsParameter.Name;
329        op.MaximumFunctionDefinitionsParameter.ActualName = MaximumFunctionDefinitionsParameter.Name;
330      }
331      */
332      foreach (var op in operators.OfType<IGESymbolicDataAnalysisEvaluator<T>>()) {
333        op.ProblemDataParameter.ActualName = ProblemDataParameterName;
334        op.SymbolicExpressionTreeParameter.ActualName = Evaluator.SymbolicExpressionTreeParameter.ActualName;
335        op.EvaluationPartitionParameter.ActualName = FitnessCalculationPartitionParameter.Name;
336        op.RelativeNumberOfEvaluatedSamplesParameter.ActualName = RelativeNumberOfEvaluatedSamplesParameter.Name;
337        op.ApplyLinearScalingParameter.ActualName = ApplyLinearScalingParameter.Name;
338        op.IntegerVectorParameter.ActualName = SolutionCreator.IntegerVectorParameter.Name;
339        op.GenotypeToPhenotypeMapperParameter.ActualName = GenotypeToPhenotypeMapperParameter.Name;
340        op.SymbolicExpressionTreeGrammarParameter.ActualName = SymbolicExpressionTreeGrammarParameter.Name;
341      }
342      foreach (var op in operators.OfType<IIntegerVectorCrossover>()) {
343        op.ParentsParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
344        op.ChildParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
345      }
346      foreach (var op in operators.OfType<IIntegerVectorManipulator>()) {
347        op.IntegerVectorParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
348      }
349      foreach (var op in operators.OfType<IIntegerVectorCreator>()) {
350        op.BoundsParameter.ActualName = BoundsParameter.Name;
351        op.LengthParameter.ActualName = MaximumSymbolicExpressionTreeLengthParameter.Name;
352      }
353      foreach (var op in operators.OfType<ISymbolicExpressionTreeAnalyzer>()) {
354        op.SymbolicExpressionTreeParameter.ActualName = Evaluator.SymbolicExpressionTreeParameter.ActualName;
355      }
356      foreach (var op in operators.OfType<ISymbolicDataAnalysisSingleObjectiveAnalyzer>()) {
357        op.ApplyLinearScalingParameter.ActualName = ApplyLinearScalingParameter.Name;
358      }
359      foreach (var op in operators.OfType<ISymbolicDataAnalysisMultiObjectiveAnalyzer>()) {
360        op.ApplyLinearScalingParameter.ActualName = ApplyLinearScalingParameter.Name;
361      }
362      foreach (var op in operators.OfType<ISymbolicDataAnalysisAnalyzer>()) {
363        op.SymbolicExpressionTreeParameter.ActualName = Evaluator.SymbolicExpressionTreeParameter.ActualName;
364      }
365      foreach (var op in operators.OfType<IGESymbolicDataAnalysisValidationAnalyzer<U, T>>()) {
366        op.RelativeNumberOfEvaluatedSamplesParameter.ActualName = RelativeNumberOfEvaluatedSamplesParameter.Name;
367        op.ValidationPartitionParameter.ActualName = ValidationPartitionParameter.Name;
368      }
369      foreach (var op in operators.OfType<ISymbolicDataAnalysisInterpreterOperator>()) {
370        op.SymbolicDataAnalysisTreeInterpreterParameter.ActualName = SymbolicExpressionTreeInterpreterParameter.Name;
371      }
372      /*
373      foreach (var op in operators.OfType<ISymbolicDataAnalysisExpressionCrossover<T>>()) {
374        op.EvaluationPartitionParameter.ActualName = FitnessCalculationPartitionParameter.Name;
375        op.ProblemDataParameter.ActualName = ProblemDataParameter.Name;
376        op.EvaluationPartitionParameter.ActualName = FitnessCalculationPartitionParameter.Name;
377        op.RelativeNumberOfEvaluatedSamplesParameter.ActualName = RelativeNumberOfEvaluatedSamplesParameter.Name;
378        op.EvaluatorParameter.ActualName = EvaluatorParameter.Name;
379      }
380      */
381    }
382
383    #region Import & Export
384    public virtual void Load(T data) {
385      Name = data.Name;
386      Description = data.Description;
387      ProblemData = data;
388    }
389
390    public virtual T Export() {
391      return ProblemData;
392    }
393    #endregion
394  }
395}
Note: See TracBrowser for help on using the repository browser.