[10072] | 1 | #region License Information
|
---|
| 2 | /* HeuristicLab
|
---|
[10968] | 3 | * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
|
---|
[10072] | 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/>.
|
---|
[10968] | 19 | *
|
---|
| 20 | * Author: Sabine Winkler
|
---|
[10072] | 21 | */
|
---|
[10968] | 22 |
|
---|
[10072] | 23 | #endregion
|
---|
| 24 |
|
---|
| 25 | using System;
|
---|
| 26 | using System.Drawing;
|
---|
| 27 | using System.Linq;
|
---|
| 28 | using HeuristicLab.Common;
|
---|
| 29 | using HeuristicLab.Common.Resources;
|
---|
| 30 | using HeuristicLab.Core;
|
---|
| 31 | using HeuristicLab.Data;
|
---|
[10073] | 32 | using HeuristicLab.Encodings.IntegerVectorEncoding;
|
---|
[10072] | 33 | using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
|
---|
| 34 | using HeuristicLab.Optimization;
|
---|
| 35 | using HeuristicLab.Parameters;
|
---|
| 36 | using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
|
---|
| 37 | using HeuristicLab.PluginInfrastructure;
|
---|
[10073] | 38 | using HeuristicLab.Problems.DataAnalysis;
|
---|
| 39 | using HeuristicLab.Problems.DataAnalysis.Symbolic;
|
---|
| 40 | using HeuristicLab.Problems.GrammaticalEvolution.Mappers;
|
---|
[10072] | 41 | using HeuristicLab.Problems.Instances;
|
---|
| 42 |
|
---|
[10073] | 43 | namespace HeuristicLab.Problems.GrammaticalEvolution {
|
---|
[10072] | 44 | [StorableClass]
|
---|
[10075] | 45 | public abstract class GESymbolicDataAnalysisProblem<T, U, V> : HeuristicOptimizationProblem<U, V>, IDataAnalysisProblem<T>,
|
---|
[10226] | 46 | IGESymbolicDataAnalysisProblem, IStorableContent,
|
---|
[10075] | 47 | IProblemInstanceConsumer<T>, IProblemInstanceExporter<T>
|
---|
[10072] | 48 | where T : class, IDataAnalysisProblemData
|
---|
[10073] | 49 | where U : class, IGESymbolicDataAnalysisEvaluator<T>
|
---|
| 50 | where V : class, IIntegerVectorCreator {
|
---|
[10072] | 51 |
|
---|
| 52 | #region parameter names & descriptions
|
---|
| 53 | private const string ProblemDataParameterName = "ProblemData";
|
---|
| 54 | private const string SymbolicExpressionTreeGrammarParameterName = "SymbolicExpressionTreeGrammar";
|
---|
| 55 | private const string SymbolicExpressionTreeInterpreterParameterName = "SymbolicExpressionTreeInterpreter";
|
---|
| 56 | private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
|
---|
| 57 | private const string RelativeNumberOfEvaluatedSamplesParameterName = "RelativeNumberOfEvaluatedSamples";
|
---|
| 58 | private const string FitnessCalculationPartitionParameterName = "FitnessCalculationPartition";
|
---|
| 59 | private const string ValidationPartitionParameterName = "ValidationPartition";
|
---|
| 60 | private const string ApplyLinearScalingParameterName = "ApplyLinearScaling";
|
---|
[10073] | 61 | private const string BoundsParameterName = "Bounds";
|
---|
| 62 | private const string GenotypeToPhenotypeMapperParameterName = "GenotypeToPhenotypeMapper";
|
---|
[10072] | 63 | private const string ProblemDataParameterDescription = "";
|
---|
| 64 | private const string SymbolicExpressionTreeGrammarParameterDescription = "The grammar that should be used for symbolic expression tree.";
|
---|
[10974] | 65 | private const string SymbolicExpressionTreeInterpreterParameterDescription = "The interpreter that should be used to evaluate the symbolic expression tree.";
|
---|
[10072] | 66 | private const string MaximumSymbolicExpressionTreeLengthParameterDescription = "Maximal length of the symbolic expression.";
|
---|
| 67 | private const string RelativeNumberOfEvaluatedSamplesParameterDescription = "The relative number of samples of the dataset partition, which should be randomly chosen for evaluation.";
|
---|
| 68 | private const string FitnessCalculationPartitionParameterDescription = "The partition of the problem data training partition, that should be used to calculate the fitness of an individual.";
|
---|
| 69 | private const string ValidationPartitionParameterDescription = "The partition of the problem data training partition, that should be used to select the best model from (optional).";
|
---|
| 70 | private const string ApplyLinearScalingParameterDescription = "Flag that indicates if the individual should be linearly scaled before evaluating.";
|
---|
[10073] | 71 | private const string BoundsParameterDescription = "The integer number range in which the single genomes of a genotype are created.";
|
---|
| 72 | private const string GenotypeToPhenotypeMapperParameterDescription = "Maps the genotype (an integer vector) to the phenotype (a symbolic expression tree).";
|
---|
[10072] | 73 | #endregion
|
---|
| 74 |
|
---|
| 75 | #region parameter properties
|
---|
| 76 | IParameter IDataAnalysisProblem.ProblemDataParameter {
|
---|
| 77 | get { return ProblemDataParameter; }
|
---|
| 78 | }
|
---|
| 79 | public IValueParameter<T> ProblemDataParameter {
|
---|
| 80 | get { return (IValueParameter<T>)Parameters[ProblemDataParameterName]; }
|
---|
| 81 | }
|
---|
[10974] | 82 | public IValueParameter<ISymbolicDataAnalysisGrammar> SymbolicExpressionTreeGrammarParameter {
|
---|
| 83 | get { return (IValueParameter<ISymbolicDataAnalysisGrammar>)Parameters[SymbolicExpressionTreeGrammarParameterName]; }
|
---|
[10072] | 84 | }
|
---|
| 85 | public IValueParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicExpressionTreeInterpreterParameter {
|
---|
| 86 | get { return (IValueParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicExpressionTreeInterpreterParameterName]; }
|
---|
| 87 | }
|
---|
| 88 | public IFixedValueParameter<IntValue> MaximumSymbolicExpressionTreeLengthParameter {
|
---|
| 89 | get { return (IFixedValueParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeLengthParameterName]; }
|
---|
| 90 | }
|
---|
| 91 | public IFixedValueParameter<PercentValue> RelativeNumberOfEvaluatedSamplesParameter {
|
---|
| 92 | get { return (IFixedValueParameter<PercentValue>)Parameters[RelativeNumberOfEvaluatedSamplesParameterName]; }
|
---|
| 93 | }
|
---|
| 94 | public IFixedValueParameter<IntRange> FitnessCalculationPartitionParameter {
|
---|
| 95 | get { return (IFixedValueParameter<IntRange>)Parameters[FitnessCalculationPartitionParameterName]; }
|
---|
| 96 | }
|
---|
| 97 | public IFixedValueParameter<IntRange> ValidationPartitionParameter {
|
---|
| 98 | get { return (IFixedValueParameter<IntRange>)Parameters[ValidationPartitionParameterName]; }
|
---|
| 99 | }
|
---|
| 100 | public IFixedValueParameter<BoolValue> ApplyLinearScalingParameter {
|
---|
| 101 | get { return (IFixedValueParameter<BoolValue>)Parameters[ApplyLinearScalingParameterName]; }
|
---|
| 102 | }
|
---|
[10073] | 103 | public IValueParameter<IntMatrix> BoundsParameter {
|
---|
| 104 | get { return (IValueParameter<IntMatrix>)Parameters[BoundsParameterName]; }
|
---|
| 105 | }
|
---|
| 106 | public IValueParameter<IGenotypeToPhenotypeMapper> GenotypeToPhenotypeMapperParameter {
|
---|
| 107 | get { return (IValueParameter<IGenotypeToPhenotypeMapper>)Parameters[GenotypeToPhenotypeMapperParameterName]; }
|
---|
| 108 | }
|
---|
[10072] | 109 | #endregion
|
---|
| 110 |
|
---|
| 111 | #region properties
|
---|
| 112 | public string Filename { get; set; }
|
---|
| 113 | public static new Image StaticItemImage { get { return VSImageLibrary.Type; } }
|
---|
| 114 |
|
---|
| 115 | IDataAnalysisProblemData IDataAnalysisProblem.ProblemData {
|
---|
| 116 | get { return ProblemData; }
|
---|
| 117 | }
|
---|
| 118 | public T ProblemData {
|
---|
| 119 | get { return ProblemDataParameter.Value; }
|
---|
| 120 | set { ProblemDataParameter.Value = value; }
|
---|
| 121 | }
|
---|
| 122 |
|
---|
[10974] | 123 | public ISymbolicDataAnalysisGrammar SymbolicExpressionTreeGrammar {
|
---|
[10072] | 124 | get { return SymbolicExpressionTreeGrammarParameter.Value; }
|
---|
| 125 | set { SymbolicExpressionTreeGrammarParameter.Value = value; }
|
---|
| 126 | }
|
---|
| 127 | public ISymbolicDataAnalysisExpressionTreeInterpreter SymbolicExpressionTreeInterpreter {
|
---|
| 128 | get { return SymbolicExpressionTreeInterpreterParameter.Value; }
|
---|
| 129 | set { SymbolicExpressionTreeInterpreterParameter.Value = value; }
|
---|
| 130 | }
|
---|
| 131 |
|
---|
| 132 | public IntValue MaximumSymbolicExpressionTreeLength {
|
---|
| 133 | get { return MaximumSymbolicExpressionTreeLengthParameter.Value; }
|
---|
| 134 | }
|
---|
[10276] | 135 |
|
---|
[10072] | 136 | public PercentValue RelativeNumberOfEvaluatedSamples {
|
---|
| 137 | get { return RelativeNumberOfEvaluatedSamplesParameter.Value; }
|
---|
| 138 | }
|
---|
| 139 |
|
---|
| 140 | public IntRange FitnessCalculationPartition {
|
---|
| 141 | get { return FitnessCalculationPartitionParameter.Value; }
|
---|
| 142 | }
|
---|
| 143 | public IntRange ValidationPartition {
|
---|
| 144 | get { return ValidationPartitionParameter.Value; }
|
---|
| 145 | }
|
---|
| 146 | public BoolValue ApplyLinearScaling {
|
---|
| 147 | get { return ApplyLinearScalingParameter.Value; }
|
---|
| 148 | }
|
---|
| 149 | #endregion
|
---|
| 150 |
|
---|
| 151 | [StorableConstructor]
|
---|
[10073] | 152 | protected GESymbolicDataAnalysisProblem(bool deserializing) : base(deserializing) { }
|
---|
[10072] | 153 | [StorableHook(HookType.AfterDeserialization)]
|
---|
| 154 | private void AfterDeserialization() {
|
---|
| 155 | RegisterEventHandlers();
|
---|
| 156 | }
|
---|
[10073] | 157 | protected GESymbolicDataAnalysisProblem(GESymbolicDataAnalysisProblem<T, U, V> original, Cloner cloner)
|
---|
[10072] | 158 | : base(original, cloner) {
|
---|
| 159 | RegisterEventHandlers();
|
---|
| 160 | }
|
---|
| 161 |
|
---|
[10073] | 162 | protected GESymbolicDataAnalysisProblem(T problemData, U evaluator, V solutionCreator)
|
---|
[10072] | 163 | : base(evaluator, solutionCreator) {
|
---|
| 164 | Parameters.Add(new ValueParameter<T>(ProblemDataParameterName, ProblemDataParameterDescription, problemData));
|
---|
[10974] | 165 | Parameters.Add(new ValueParameter<ISymbolicDataAnalysisGrammar>(SymbolicExpressionTreeGrammarParameterName, SymbolicExpressionTreeGrammarParameterDescription));
|
---|
| 166 | Parameters.Add(new ValueParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicExpressionTreeInterpreterParameterName, SymbolicExpressionTreeInterpreterParameterDescription));
|
---|
[10072] | 167 | Parameters.Add(new FixedValueParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName, MaximumSymbolicExpressionTreeLengthParameterDescription));
|
---|
| 168 | Parameters.Add(new FixedValueParameter<IntRange>(FitnessCalculationPartitionParameterName, FitnessCalculationPartitionParameterDescription));
|
---|
| 169 | Parameters.Add(new FixedValueParameter<IntRange>(ValidationPartitionParameterName, ValidationPartitionParameterDescription));
|
---|
| 170 | Parameters.Add(new FixedValueParameter<PercentValue>(RelativeNumberOfEvaluatedSamplesParameterName, RelativeNumberOfEvaluatedSamplesParameterDescription, new PercentValue(1)));
|
---|
| 171 | Parameters.Add(new FixedValueParameter<BoolValue>(ApplyLinearScalingParameterName, ApplyLinearScalingParameterDescription, new BoolValue(false)));
|
---|
[10073] | 172 | IntMatrix m = new IntMatrix(new int[,] { { 0, 100 } });
|
---|
| 173 | Parameters.Add(new ValueParameter<IntMatrix>(BoundsParameterName, BoundsParameterDescription, m));
|
---|
| 174 | Parameters.Add(new ValueParameter<IGenotypeToPhenotypeMapper>(GenotypeToPhenotypeMapperParameterName, GenotypeToPhenotypeMapperParameterDescription, new DepthFirstMapper()));
|
---|
[10072] | 175 |
|
---|
| 176 | SymbolicExpressionTreeInterpreterParameter.Hidden = true;
|
---|
| 177 | ApplyLinearScalingParameter.Hidden = true;
|
---|
| 178 |
|
---|
[10268] | 179 | SymbolicExpressionTreeGrammar = new GESymbolicExpressionGrammar(problemData.AllowedInputVariables, problemData.AllowedInputVariables.Count() * 3);
|
---|
[10072] | 180 | SymbolicExpressionTreeInterpreter = new SymbolicDataAnalysisExpressionTreeLinearInterpreter();
|
---|
| 181 |
|
---|
| 182 | FitnessCalculationPartition.Start = ProblemData.TrainingPartition.Start;
|
---|
| 183 | FitnessCalculationPartition.End = ProblemData.TrainingPartition.End;
|
---|
| 184 |
|
---|
| 185 | InitializeOperators();
|
---|
| 186 |
|
---|
| 187 | UpdateGrammar();
|
---|
| 188 | RegisterEventHandlers();
|
---|
| 189 | }
|
---|
| 190 |
|
---|
[10268] | 191 | private void DeregisterGrammarHandler() {
|
---|
| 192 | SymbolicExpressionTreeGrammarParameter.ValueChanged -= SymbolicExpressionTreeGrammarParameter_ValueChanged;
|
---|
| 193 | }
|
---|
| 194 | private void RegisterGrammarHandler() {
|
---|
| 195 | SymbolicExpressionTreeGrammarParameter.ValueChanged += SymbolicExpressionTreeGrammarParameter_ValueChanged;
|
---|
| 196 | }
|
---|
| 197 |
|
---|
[10974] | 198 | private void UpdateGrammar() {
|
---|
[10268] | 199 | DeregisterGrammarHandler();
|
---|
| 200 | // create a new grammar instance with the correct allowed input variables
|
---|
| 201 | SymbolicExpressionTreeGrammarParameter.Value =
|
---|
| 202 | new GESymbolicExpressionGrammar(ProblemData.AllowedInputVariables, ProblemData.AllowedInputVariables.Count() * 3);
|
---|
| 203 | RegisterGrammarHandler();
|
---|
[10072] | 204 | }
|
---|
| 205 |
|
---|
| 206 | private void InitializeOperators() {
|
---|
[10974] | 207 | Operators.AddRange(ApplicationManager.Manager.GetInstances<IIntegerVectorOperator>());
|
---|
[10072] | 208 | Operators.Add(new SymbolicExpressionSymbolFrequencyAnalyzer());
|
---|
| 209 | Operators.Add(new SymbolicDataAnalysisVariableFrequencyAnalyzer());
|
---|
| 210 | Operators.Add(new MinAverageMaxSymbolicExpressionTreeLengthAnalyzer());
|
---|
| 211 | Operators.Add(new SymbolicExpressionTreeLengthAnalyzer());
|
---|
| 212 | ParameterizeOperators();
|
---|
| 213 | }
|
---|
| 214 |
|
---|
| 215 | #region events
|
---|
| 216 | private void RegisterEventHandlers() {
|
---|
| 217 | ProblemDataParameter.ValueChanged += new EventHandler(ProblemDataParameter_ValueChanged);
|
---|
| 218 | ProblemDataParameter.Value.Changed += (object sender, EventArgs e) => OnProblemDataChanged();
|
---|
| 219 |
|
---|
[10268] | 220 | RegisterGrammarHandler();
|
---|
[10072] | 221 | }
|
---|
| 222 |
|
---|
| 223 | private void ProblemDataParameter_ValueChanged(object sender, EventArgs e) {
|
---|
| 224 | ValidationPartition.Start = 0;
|
---|
| 225 | ValidationPartition.End = 0;
|
---|
| 226 | ProblemDataParameter.Value.Changed += (object s, EventArgs args) => OnProblemDataChanged();
|
---|
| 227 | OnProblemDataChanged();
|
---|
| 228 | }
|
---|
| 229 |
|
---|
| 230 | private void SymbolicExpressionTreeGrammarParameter_ValueChanged(object sender, EventArgs e) {
|
---|
| 231 | UpdateGrammar();
|
---|
| 232 | }
|
---|
| 233 |
|
---|
[10073] | 234 | protected override void OnEvaluatorChanged() {
|
---|
| 235 | base.OnEvaluatorChanged();
|
---|
| 236 | Evaluator.SymbolicExpressionTreeParameter.ActualNameChanged += new EventHandler(Evaluator_SymbolicExpressionTreeParameter_ActualNameChanged);
|
---|
[10072] | 237 | ParameterizeOperators();
|
---|
| 238 | }
|
---|
| 239 |
|
---|
[10073] | 240 | private void Evaluator_SymbolicExpressionTreeParameter_ActualNameChanged(object sender, EventArgs e) {
|
---|
[10072] | 241 | ParameterizeOperators();
|
---|
| 242 | }
|
---|
| 243 |
|
---|
| 244 | public event EventHandler ProblemDataChanged;
|
---|
| 245 | protected virtual void OnProblemDataChanged() {
|
---|
| 246 | FitnessCalculationPartition.Start = ProblemData.TrainingPartition.Start;
|
---|
| 247 | FitnessCalculationPartition.End = ProblemData.TrainingPartition.End;
|
---|
| 248 |
|
---|
| 249 | UpdateGrammar();
|
---|
| 250 | ParameterizeOperators();
|
---|
| 251 |
|
---|
| 252 | var handler = ProblemDataChanged;
|
---|
| 253 | if (handler != null) handler(this, EventArgs.Empty);
|
---|
| 254 |
|
---|
| 255 | OnReset();
|
---|
| 256 | }
|
---|
| 257 | #endregion
|
---|
| 258 |
|
---|
| 259 | protected virtual void ParameterizeOperators() {
|
---|
| 260 | var operators = Parameters.OfType<IValueParameter>().Select(p => p.Value).OfType<IOperator>().Union(Operators).ToList();
|
---|
| 261 |
|
---|
| 262 | foreach (var op in operators.OfType<ISymbolicExpressionTreeGrammarBasedOperator>()) {
|
---|
| 263 | op.SymbolicExpressionTreeGrammarParameter.ActualName = SymbolicExpressionTreeGrammarParameter.Name;
|
---|
| 264 | }
|
---|
[10073] | 265 | foreach (var op in operators.OfType<IGESymbolicDataAnalysisEvaluator<T>>()) {
|
---|
[10072] | 266 | op.ProblemDataParameter.ActualName = ProblemDataParameterName;
|
---|
[10073] | 267 | op.SymbolicExpressionTreeParameter.ActualName = Evaluator.SymbolicExpressionTreeParameter.ActualName;
|
---|
[10072] | 268 | op.EvaluationPartitionParameter.ActualName = FitnessCalculationPartitionParameter.Name;
|
---|
| 269 | op.RelativeNumberOfEvaluatedSamplesParameter.ActualName = RelativeNumberOfEvaluatedSamplesParameter.Name;
|
---|
| 270 | op.ApplyLinearScalingParameter.ActualName = ApplyLinearScalingParameter.Name;
|
---|
[10075] | 271 | op.IntegerVectorParameter.ActualName = SolutionCreator.IntegerVectorParameter.Name;
|
---|
| 272 | op.GenotypeToPhenotypeMapperParameter.ActualName = GenotypeToPhenotypeMapperParameter.Name;
|
---|
| 273 | op.SymbolicExpressionTreeGrammarParameter.ActualName = SymbolicExpressionTreeGrammarParameter.Name;
|
---|
[10072] | 274 | }
|
---|
[10073] | 275 | foreach (var op in operators.OfType<IIntegerVectorCrossover>()) {
|
---|
[10075] | 276 | op.ParentsParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
|
---|
| 277 | op.ChildParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
|
---|
[10072] | 278 | }
|
---|
[10073] | 279 | foreach (var op in operators.OfType<IIntegerVectorManipulator>()) {
|
---|
| 280 | op.IntegerVectorParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
|
---|
[10072] | 281 | }
|
---|
[10073] | 282 | foreach (var op in operators.OfType<IIntegerVectorCreator>()) {
|
---|
| 283 | op.BoundsParameter.ActualName = BoundsParameter.Name;
|
---|
| 284 | op.LengthParameter.ActualName = MaximumSymbolicExpressionTreeLengthParameter.Name;
|
---|
| 285 | }
|
---|
[10072] | 286 | foreach (var op in operators.OfType<ISymbolicExpressionTreeAnalyzer>()) {
|
---|
[10073] | 287 | op.SymbolicExpressionTreeParameter.ActualName = Evaluator.SymbolicExpressionTreeParameter.ActualName;
|
---|
[10072] | 288 | }
|
---|
| 289 | foreach (var op in operators.OfType<ISymbolicDataAnalysisSingleObjectiveAnalyzer>()) {
|
---|
| 290 | op.ApplyLinearScalingParameter.ActualName = ApplyLinearScalingParameter.Name;
|
---|
| 291 | }
|
---|
| 292 | foreach (var op in operators.OfType<ISymbolicDataAnalysisMultiObjectiveAnalyzer>()) {
|
---|
| 293 | op.ApplyLinearScalingParameter.ActualName = ApplyLinearScalingParameter.Name;
|
---|
| 294 | }
|
---|
| 295 | foreach (var op in operators.OfType<ISymbolicDataAnalysisAnalyzer>()) {
|
---|
[10073] | 296 | op.SymbolicExpressionTreeParameter.ActualName = Evaluator.SymbolicExpressionTreeParameter.ActualName;
|
---|
[10072] | 297 | }
|
---|
[10073] | 298 | foreach (var op in operators.OfType<IGESymbolicDataAnalysisValidationAnalyzer<U, T>>()) {
|
---|
[10072] | 299 | op.RelativeNumberOfEvaluatedSamplesParameter.ActualName = RelativeNumberOfEvaluatedSamplesParameter.Name;
|
---|
| 300 | op.ValidationPartitionParameter.ActualName = ValidationPartitionParameter.Name;
|
---|
| 301 | }
|
---|
| 302 | foreach (var op in operators.OfType<ISymbolicDataAnalysisInterpreterOperator>()) {
|
---|
| 303 | op.SymbolicDataAnalysisTreeInterpreterParameter.ActualName = SymbolicExpressionTreeInterpreterParameter.Name;
|
---|
| 304 | }
|
---|
| 305 | }
|
---|
| 306 |
|
---|
| 307 | #region Import & Export
|
---|
| 308 | public virtual void Load(T data) {
|
---|
| 309 | Name = data.Name;
|
---|
| 310 | Description = data.Description;
|
---|
| 311 | ProblemData = data;
|
---|
| 312 | }
|
---|
| 313 |
|
---|
| 314 | public virtual T Export() {
|
---|
| 315 | return ProblemData;
|
---|
| 316 | }
|
---|
| 317 | #endregion
|
---|
| 318 | }
|
---|
| 319 | }
|
---|