Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/29/20 14:44:19 (4 years ago)
Author:
abeham
Message:

#2521: working on refactoring

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.GeneticProgramming/3.3/ArtificialAnt/Problem.cs

    r17745 r17778  
    7878
    7979    #region Parameter Properties
    80     public IValueParameter<BoolMatrix> WorldParameter {
    81       get { return (IValueParameter<BoolMatrix>)Parameters["World"]; }
    82     }
    83     public IFixedValueParameter<IntValue> MaxTimeStepsParameter {
    84       get { return (IFixedValueParameter<IntValue>)Parameters["MaximumTimeSteps"]; }
    85     }
     80    [Storable] public IValueParameter<BoolMatrix> WorldParameter { get; private set; }
     81    [Storable] public IFixedValueParameter<IntValue> MaxTimeStepsParameter { get; private set; }
    8682    #endregion
    8783
     
    105101
    106102    // cloning
    107     private Problem(Problem original, Cloner cloner) : base(original, cloner) { }
     103    private Problem(Problem original, Cloner cloner) : base(original, cloner) {
     104      WorldParameter = cloner.Clone(original.WorldParameter);
     105      MaxTimeStepsParameter = cloner.Clone(original.MaxTimeStepsParameter);
     106    }
    108107    public override IDeepCloneable Clone(Cloner cloner) {
    109108      return new Problem(this, cloner);
     
    114113      Maximization = true;
    115114      BoolMatrix world = new BoolMatrix(ToBoolMatrix(santaFeAntTrail));
    116       Parameters.Add(new ValueParameter<BoolMatrix>("World", "The world for the artificial ant with scattered food items.", world));
    117       Parameters.Add(new FixedValueParameter<IntValue>("MaximumTimeSteps", "The number of time steps the artificial ant has available to collect all food items.", new IntValue(600)));
     115      Parameters.Add(WorldParameter = new ValueParameter<BoolMatrix>("World", "The world for the artificial ant with scattered food items.", world));
     116      Parameters.Add(MaxTimeStepsParameter = new FixedValueParameter<IntValue>("MaximumTimeSteps", "The number of time steps the artificial ant has available to collect all food items.", new IntValue(600)));
    118117
    119118      var g = new SimpleSymbolicExpressionGrammar();
Note: See TracChangeset for help on using the changeset viewer.