Changeset 16171 for branches/2943_MOBasicProblem_MOCMAES/HeuristicLab.Problems.TestFunctions.MultiObjective/3.3/TestFunctions/ZDT
- Timestamp:
- 09/21/18 09:18:49 (6 years ago)
- Location:
- branches/2943_MOBasicProblem_MOCMAES/HeuristicLab.Problems.TestFunctions.MultiObjective/3.3/TestFunctions/ZDT
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2943_MOBasicProblem_MOCMAES/HeuristicLab.Problems.TestFunctions.MultiObjective/3.3/TestFunctions/ZDT/ZDT1.cs
r15583 r16171 44 44 public override double[] Evaluate(RealVector r) { 45 45 double g = 0; 46 for ( inti = 1; i < r.Length; i++) g += r[i];46 for (var i = 1; i < r.Length; i++) g += r[i]; 47 47 g = 1.0 + 9.0 * g / (r.Length - 1); 48 doublef0 = r[0];49 doublef1 = g * (1.0 - Math.Sqrt(r[0] / g));48 var f0 = r[0]; 49 var f1 = g * (1.0 - Math.Sqrt(r[0] / g)); 50 50 return new double[] { f0, f1 }; 51 51 } -
branches/2943_MOBasicProblem_MOCMAES/HeuristicLab.Problems.TestFunctions.MultiObjective/3.3/TestFunctions/ZDT/ZDT2.cs
r15583 r16171 42 42 public override double[] Evaluate(RealVector r) { 43 43 double g = 0; 44 for ( inti = 1; i < r.Length; i++) g += r[i];44 for (var i = 1; i < r.Length; i++) g += r[i]; 45 45 g = 1.0 + 9.0 * g / (r.Length - 1); 46 doubled = r[0] / g;47 doublef0 = r[0];48 doublef1 = g * (1.0 - d * d);46 var d = r[0] / g; 47 var f0 = r[0]; 48 var f1 = g * (1.0 - d * d); 49 49 return new double[] { f0, f1 }; 50 50 } -
branches/2943_MOBasicProblem_MOCMAES/HeuristicLab.Problems.TestFunctions.MultiObjective/3.3/TestFunctions/ZDT/ZDT3.cs
r15583 r16171 44 44 public override double[] Evaluate(RealVector r) { 45 45 double g = 0; 46 for ( inti = 1; i < r.Length; i++) g += r[i];46 for (var i = 1; i < r.Length; i++) g += r[i]; 47 47 g = 1.0 + 9.0 * g / (r.Length - 1); 48 doubled = r[0] / g;49 doublef0 = r[0];50 doublef1 = g * (1.0 - Math.Sqrt(d) - d * Math.Sin(10 * Math.PI * r[0]));48 var d = r[0] / g; 49 var f0 = r[0]; 50 var f1 = g * (1.0 - Math.Sqrt(d) - d * Math.Sin(10 * Math.PI * r[0])); 51 51 return new double[] { f0, f1 }; 52 52 } -
branches/2943_MOBasicProblem_MOCMAES/HeuristicLab.Problems.TestFunctions.MultiObjective/3.3/TestFunctions/ZDT/ZDT4.cs
r15583 r16171 30 30 public class ZDT4 : ZDT { 31 31 protected override double[,] GetBounds(int objectives) { 32 double[,]bounds = new double[objectives, 2];32 var bounds = new double[objectives, 2]; 33 33 bounds[0, 0] = 0; bounds[0, 1] = 1; 34 for ( inti = 1; i < objectives; i++) {34 for (var i = 1; i < objectives; i++) { 35 35 bounds[i, 0] = -5; 36 36 bounds[i, 1] = 5; … … 53 53 public override double[] Evaluate(RealVector r) { 54 54 double g = 0; 55 for ( inti = 1; i < r.Length; i++) {56 doublev = r[i];55 for (var i = 1; i < r.Length; i++) { 56 var v = r[i]; 57 57 g += v * v - 10 * Math.Cos(4 * Math.PI * v); 58 58 } 59 59 g = 1.0 + 10.0 * (r.Length - 1) + g; 60 doubled = r[0] / g;61 doublef0 = r[0];62 doublef1 = 1 - Math.Sqrt(d);60 var d = r[0] / g; 61 var f0 = r[0]; 62 var f1 = 1 - Math.Sqrt(d); 63 63 return new double[] { f0, f1 }; 64 64 } -
branches/2943_MOBasicProblem_MOCMAES/HeuristicLab.Problems.TestFunctions.MultiObjective/3.3/TestFunctions/ZDT/ZDT6.cs
r15583 r16171 43 43 public override double[] Evaluate(RealVector r) { 44 44 double g = 0; 45 for ( inti = 1; i < r.Length; i++) g += r[i];45 for (var i = 1; i < r.Length; i++) g += r[i]; 46 46 g = 1.0 + 9.0 * Math.Pow(g / (r.Length - 1), 0.25); 47 doublef1 = 1 - Math.Exp(-4 * r[0]) * Math.Pow(Math.Sin(6 * Math.PI * r[0]), 6);48 doubled = f1 / g;49 doublef2 = g * (1.0 - d * d);47 var f1 = 1 - Math.Exp(-4 * r[0]) * Math.Pow(Math.Sin(6 * Math.PI * r[0]), 6); 48 var d = f1 / g; 49 var f2 = g * (1.0 - d * d); 50 50 return new double[] { f1, f2 }; 51 51 }
Note: See TracChangeset
for help on using the changeset viewer.