Changeset 17747 for branches/2521_ProblemRefactoring/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/IntegerVectorMultiObjectiveProblem.cs
- Timestamp:
- 09/15/20 17:09:10 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/IntegerVectorMultiObjectiveProblem.cs
r17695 r17747 35 35 [StorableType("11916b0f-4c34-4ece-acae-e28d11211b43")] 36 36 public abstract class IntegerVectorMultiObjectiveProblem : MultiObjectiveProblem<IntegerVectorEncoding, IntegerVector> { 37 [Storable] protected IResultParameter<ParetoFrontScatterPlot<IntegerVector>> BestResultParameter { get; private set; }38 37 [Storable] protected ReferenceParameter<IntValue> DimensionRefParameter { get; private set; } 39 38 [Storable] protected ReferenceParameter<IntMatrix> BoundsRefParameter { get; private set; } 39 [Storable] public IResult<ParetoFrontScatterPlot<IntegerVector>> BestParetoFrontResult { get; private set; } 40 40 41 41 public int Dimension { … … 49 49 } 50 50 51 protected ParetoFrontScatterPlot<IntegerVector> BestParetoFront { 52 get => BestParetoFrontResult.Value; 53 set => BestParetoFrontResult.Value = value; 54 } 55 51 56 [StorableConstructor] 52 57 protected IntegerVectorMultiObjectiveProblem(StorableConstructorFlag _) : base(_) { } … … 58 63 protected IntegerVectorMultiObjectiveProblem(IntegerVectorMultiObjectiveProblem original, Cloner cloner) 59 64 : base(original, cloner) { 60 BestResultParameter = cloner.Clone(original.BestResultParameter);61 65 DimensionRefParameter = cloner.Clone(original.DimensionRefParameter); 62 66 BoundsRefParameter = cloner.Clone(original.BoundsRefParameter); 67 BestParetoFrontResult = cloner.Clone(original.BestParetoFrontResult); 63 68 RegisterEventHandlers(); 64 69 } … … 68 73 EncodingParameter.ReadOnly = true; 69 74 EvaluatorParameter.ReadOnly = true; 70 Parameters.Add(BestResultParameter = new ResultParameter<ParetoFrontScatterPlot<IntegerVector>>("Best Pareto Front", "The best Pareto front found."));71 75 Parameters.Add(DimensionRefParameter = new ReferenceParameter<IntValue>("Dimension", "The dimension of the integer vector problem.", Encoding.LengthParameter)); 72 76 Parameters.Add(BoundsRefParameter = new ReferenceParameter<IntMatrix>("Bounds", "The bounds of the integer vector problem.", Encoding.BoundsParameter)); 77 Results.Add(BestParetoFrontResult = new Result<ParetoFrontScatterPlot<IntegerVector>>("Best Pareto Front", "The best Pareto front found so far.")); 73 78 74 79 Operators.Add(new HammingSimilarityCalculator()); … … 85 90 var plot = new ParetoFrontScatterPlot<IntegerVector>(fronts, individuals, qualities, Objectives, BestKnownFront); 86 91 87 Best ResultParameter.ActualValue= plot;92 BestParetoFront = plot; 88 93 } 89 94
Note: See TracChangeset
for help on using the changeset viewer.