- Timestamp:
- 04/27/20 18:12:39 (4 years ago)
- Location:
- branches/2521_ProblemRefactoring/HeuristicLab.Encodings.IntegerVectorEncoding/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/IntegerVectorMultiObjectiveProblem.cs
r17230 r17522 33 33 [StorableType("11916b0f-4c34-4ece-acae-e28d11211b43")] 34 34 public abstract class IntegerVectorMultiObjectiveProblem : MultiObjectiveProblem<IntegerVectorEncoding, IntegerVector> { 35 [Storable] protected IResultParameter<ParetoFrontScatterPlot<IntegerVector>> BestResultParameter { get; private set; } 36 public IResultDefinition<ParetoFrontScatterPlot<IntegerVector>> BestResult { get { return BestResultParameter; } } 37 35 38 public int Length { 36 39 get { return Encoding.Length; } … … 47 50 protected IntegerVectorMultiObjectiveProblem(IntegerVectorMultiObjectiveProblem original, Cloner cloner) 48 51 : base(original, cloner) { 52 BestResultParameter = cloner.Clone(original.BestResultParameter); 49 53 RegisterEventHandlers(); 50 54 } … … 53 57 protected IntegerVectorMultiObjectiveProblem(IntegerVectorEncoding encoding) : base(encoding) { 54 58 EncodingParameter.ReadOnly = true; 59 Parameters.Add(BestResultParameter = new ResultParameter<ParetoFrontScatterPlot<IntegerVector>>("Best Pareto Front", "The best Pareto front found.")); 55 60 56 61 Operators.Add(new HammingSimilarityCalculator()); … … 66 71 var fronts = DominationCalculator.CalculateAllParetoFrontsIndices(individuals, qualities, Maximization); 67 72 var plot = new ParetoFrontScatterPlot<IntegerVector>(fronts, individuals, qualities, Objectives, BestKnownFront); 68 results.AddOrUpdateResult("Pareto Front Scatter Plot", plot); 73 74 BestResultParameter.ActualValue = plot; 69 75 } 70 76 -
branches/2521_ProblemRefactoring/HeuristicLab.Encodings.IntegerVectorEncoding/3.3/IntegerVectorProblem.cs
r16950 r17522 34 34 [StorableType("c6081457-a3de-45ce-9f47-e0eb1c851bd2")] 35 35 public abstract class IntegerVectorProblem : SingleObjectiveProblem<IntegerVectorEncoding, IntegerVector> { 36 [Storable] protected IResultParameter<IntegerVector> BestResultParameter { get; private set; } 37 public IResultDefinition<IntegerVector> BestResult { get => BestResultParameter; } 38 36 39 public int Length { 37 40 get { return Encoding.Length; } … … 48 51 protected IntegerVectorProblem(IntegerVectorProblem original, Cloner cloner) 49 52 : base(original, cloner) { 53 BestResultParameter = cloner.Clone(original.BestResultParameter); 50 54 RegisterEventHandlers(); 51 55 } … … 54 58 protected IntegerVectorProblem(IntegerVectorEncoding encoding) : base(encoding) { 55 59 EncodingParameter.ReadOnly = true; 60 Parameters.Add(BestResultParameter = new ResultParameter<IntegerVector>("Best Solution", "The best solution.")); 56 61 57 62 Operators.Add(new HammingSimilarityCalculator());
Note: See TracChangeset
for help on using the changeset viewer.