Changeset 17778 for branches/2521_ProblemRefactoring/HeuristicLab.Problems.GeneticProgramming/3.3/ArtificialAnt/Problem.cs
- Timestamp:
- 10/29/20 14:44:19 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Problems.GeneticProgramming/3.3/ArtificialAnt/Problem.cs
r17745 r17778 78 78 79 79 #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; } 86 82 #endregion 87 83 … … 105 101 106 102 // 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 } 108 107 public override IDeepCloneable Clone(Cloner cloner) { 109 108 return new Problem(this, cloner); … … 114 113 Maximization = true; 115 114 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))); 118 117 119 118 var g = new SimpleSymbolicExpressionGrammar();
Note: See TracChangeset
for help on using the changeset viewer.