Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Testfunctions/DTLZ/DTLZ.cs @ 13620

Last change on this file since 13620 was 13620, checked in by bwerth, 8 years ago

#1087 regorganized testfunctions, added view for qualities

File size: 1.6 KB
Line 
1using System;
2using System.Collections.Generic;
3using HeuristicLab.Common;
4using HeuristicLab.Encodings.RealVectorEncoding;
5using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
6
7namespace HeuristicLab.Problems.MultiObjectiveTestFunctions {
8  [StorableClass]
9  public abstract class DTLZ : MultiObjectiveTestFunction {
10
11
12    public override IEnumerable<double[]> OptimalParetoFront(int objectives) {
13      if (objectives == 2) return PFStore.get(this.ItemName);
14      throw new NotImplementedException();
15    }
16
17    public override double[,] Bounds(int objectives) {
18        return new double[,] { { 0, 1 } };
19    }
20
21    public override bool[] Maximization(int objectives) {
22      return new bool[objectives];
23    }
24
25    public override int MinimumSolutionLength {
26      get { return 2; }
27    }
28    public override int MaximumSolutionLength {
29      get {return int.MaxValue;}
30    }
31
32
33    public override int MinimumObjectives {
34      get { return 2; }
35    }
36    public override int MaximumObjectives {
37      get {return int.MaxValue;}
38    }
39
40    public override double[] ReferencePoint(int objectives) {
41      double[] rp = new double[objectives];
42      for(int i = 0; i< objectives; i++) {
43        rp[i] = 11;
44      }
45      return rp;
46    }
47
48    [StorableConstructor]
49    protected DTLZ(bool deserializing) : base(deserializing) { }
50    protected DTLZ(DTLZ original, Cloner cloner) : base(original, cloner) {}
51    public DTLZ() : base() {
52    }
53
54    public abstract override double[] Evaluate(RealVector r, int objecitves);
55
56  }
57}
Note: See TracBrowser for help on using the repository browser.