Adapt input files for "SimplexOptimizerTest" (unit tests).

The current tests are "baseline" (2D) cases.
Further work should check degradation with increased dimensionality.
This commit is contained in:
Gilles Sadowski 2021-08-22 02:14:53 +02:00
parent 14ebd93426
commit 1e7bce134f
3 changed files with 87 additions and 106 deletions

View File

@ -17,42 +17,35 @@
# #
# Format (CSV) defined in "SimplexOptimizerTest.Task" class. # Format (CSV) defined in "SimplexOptimizerTest.Task" class.
# Columns are: # Columns are:
# 0: function name (value from "TestFunction" enum) # 0: Function name (value from "TestFunction" enum)
# 1: space dimension (n) # 1: Space dimension (n)
# 2: nominal start point ("n" space-separated values) # 2: Optimum ("n" space-separated values)
# 3: optimum ("n" space-separated values) # 3: Minimal radius of the spherical shell around the optimum (within which to randomly select a start point)
# 4: maximum expected distance from the result to the optimum # 4: Minimal radius of the spherical shell around the optimum (within which to randomly select a start point)
# 5: expected number of function evaluations # 5: Maximum expected distance from the result to the optimum
# 6: length of the sides of the initial simplex # 6: Expected number of function evaluations
# 7: size of the random noise (to generate slightly different initial conditions) # 7: Whether to perform simulated annealing
# 8: whether to perform simulated annealing # 8: [optional] File prefix for debugging (or empty slot for no debugging)
# 9: [optional] File prefix for debugging (or empty slot for no debugging) # 9: [optional] Indices (space-separated) of simplex points to save (empty means "all points")
# 10: [optional] Indices (space-separated) of simplex points to save (empty means "all points")
# #
# Caveat: Some tests are commented out (cf. JIRA: MATH-1552). # Caveat: Some tests are commented out (cf. JIRA: MATH-1552).
# #
PARABOLA, 2, 4.6 5.8, 0 0, 1e-4, 820, 1, 2e-1, true PARABOLA, 8, 0 0 0 0 0 0 0 0, 20, 40, 1e-4, 7200, true
PARABOLA, 4, 2.5 3.1 4.6 5.8, 0 0 0 0, 1e-4, 820, 1, 2e-1, true ROSENBROCK, 2, 1 1, 0.9, 1.1, 1e-4, 420, true
ROSENBROCK, 2, -1.2 1, 1 1, 1e-4, 380, 1, 1e-1, true CIGAR, 2, 0 0, 2, 3, 5e-5, 240, true
ROSENBROCK, 5, -4.4 -3.5 -2.6 -1.7 -0.8, 1 1 1 1 1, 1e-4, 3800, 5e-1, 1e-1, true SPHERE, 2, 0 0, 2, 3, 5e-4, 200, true
ROSENBROCK, 10, -0.1 0.1 0.2 -0.1 -0.2 0.3 0.2 -0.1 0.2 -0.3, 1 1 1 1 1 1 1 1 1 1, 5e-5, 38000, 3, 5e-2, true ELLI, 2, 0 0, 3, 4, 1e-4, 350, true
POWELL, 4, 3 -1 -2 1, 0 0 0 0, 5e-3, 1100, 3, 1e-1, true TWO_AXES, 2, 0 0, 3, 4, 1e-4, 400, true
CIGAR, 13, -1.2 2.3 -3.2 2.1 1.2 -2.3 3.2 -2.1 -1.2 2.3 -3.2 2.1 -1.2, 0 0 0 0 0 0 0 0 0 0 0 0 0, 5e-5, 75000, 3, 1e-1, true CIG_TAB, 2, 0 0, 3, 4, 1e-3, 280, true
SPHERE, 13, -1.2 2.3 -3.2 2.1 1.2 -2.3 3.2 -2.1 -1.2 2.3 -3.2 2.1 -1.2, 0 0 0 0 0 0 0 0 0 0 0 0 0, 5e-4, 47000, 3, 1e-1, true TABLET, 2, 0 0, 3, 4, 2e-4, 340, true
ELLI, 10, 2 3 4 -3 -2 -1 2 3 4 3, 0 0 0 0 0 0 0 0 0 0, 1e-4, 25000, 3, 1e-1, true SUM_POW, 2, 0 0, 3, 4, 1e-2, 190, true
#TWO_AXES, 10, 2 3 4 -3 -2 -1 2 3 4 3, 0 0 0 0 0 0 0 0 0 0, 1e-4, 1000, 3, 1e-1, true ACKLEY, 2, 0 0, 2, 4, 1e-6, 310, true
#CIG_TAB, 10, 2 3 4 -3 -2 -1 2 3 4 3, 0 0 0 0 0 0 0 0 0 0, 1e-4, 1000, 3, 1e-1, true #RASTRIGIN, 2, 0 0, 0.9, 1.1, 5e-5, 1000, true
TABLET, 11, 2 3 4 -3 -2 -1 2 3 4 3 -1, 0 0 0 0 0 0 0 0 0 0 0, 2e-4, 41000, 3, 1e-1, true GRIEWANK, 2, 0 0, 2, 3, 1e-1, 500, true
#DIFF_POW, 7, 1 -1 1 -1 1 -1 1, 0 0 0 0 0 0 0, 1e-2, 2500, 3, 1e-1, true LEVY, 2, 1 1, 0.9, 1.1, 1e-3, 200, true
SS_DIFF_POW, 6, -3.2 2.1 1.2 -2.3 3.2 -2.1, 0 0 0 0 0 0, 1e-3, 10500, 3, 1e-1, true SCHWEFEL, 2, 420.9687 420.9687, 9, 11, 1, 200, true
#ACKLEY, 4, 3 4 -3 -2, 0 0 0 0, 1e-6, 1100, 3, 5e-1, true ZAKHAROV, 2, 0 0, 3, 4, 1e-4, 1000, true
#RASTRIGIN, 4, 3 4 -3 -2, 0 0 0 0, 1e-6, 10000, 3, 5e-1, true PERM, 2, 1 2, 0.9, 1.1, 2e-3, 260, true
#GRIEWANK, 3, -210 123 -456, 0 0 0, 1e-1, 1000, 50, 100, true STYBLINSKI_TANG, 2, -2.903534 -2.903534, 1, 2, 1e-4, 210, true
#LEVY, 4, 4 -6 -2 8, 1 1 1 1, 1e-3, 3000, 1, 1, true #HAPPY_CAT, 2, -1 -1, 2, 3, 1e-4, 500, true
#SCHWEFEL, 2, 100 -200, 420.9687 420.9687, 1, 300, 100, 100, true #SALOMON, 2, 0 0, 2, 3, 1e-4, 500, true
ZAKHAROV, 5, -4 -2 3 5 7, 0 0 0 0 0, 1e-4, 2200, 1.5, 1, true
PERM, 2, -2 -1, 1 2, 2e-3, 210, 5e-1, 1e-1, true
#PERM, 3, -2 -3 -1, 1 2 3, 5e-5, 200, 5e-1, 1e-1, true
#PERM, 4, -2 -3 -4 -1, 1 2 3 4, 5e-4, 2200, 5e-1, 1e-1, true
#PERM, 5, -2 -3 -4 -5 -1, 1 2 3 4 5, 5e-4, 200, 5e-1, 1e-1, true
#STYBLINSKI_TANG, 4, 1 2 3 4, -2.903534 -2.903534 -2.903534 -2.903534, 1e-4, 500, 1, 5e-1, true

Can't render this file because it contains an unexpected character in line 6 and column 8.

View File

@ -17,41 +17,35 @@
# #
# Format (CSV) defined in "SimplexOptimizerTest.Task" class. # Format (CSV) defined in "SimplexOptimizerTest.Task" class.
# Columns are: # Columns are:
# 0: function name (value from "TestFunction" enum) # 0: Function name (value from "TestFunction" enum)
# 1: space dimension (n) # 1: Space dimension (n)
# 2: nominal start point ("n" space-separated values) # 2: Optimum ("n" space-separated values)
# 3: optimum ("n" space-separated values) # 3: Minimal radius of the spherical shell around the optimum (within which to randomly select a start point)
# 4: maximum expected distance from the result to the optimum # 4: Minimal radius of the spherical shell around the optimum (within which to randomly select a start point)
# 5: expected number of function evaluations # 5: Maximum expected distance from the result to the optimum
# 6: length of the sides of the initial simplex # 6: Expected number of function evaluations
# 7: size of the random noise (to generate slightly different initial conditions) # 7: Whether to perform simulated annealing
# 8: whether to perform simulated annealing # 8: [optional] File prefix for debugging (or empty slot for no debugging)
# 9: [optional] File prefix for debugging (or empty slot for no debugging) # 9: [optional] Indices (space-separated) of simplex points to save (empty means "all points")
# 10: [optional] Indices (space-separated) of simplex points to save (empty means "all points")
# #
# Caveat: Some tests are commented out (cf. JIRA: MATH-1552). # Caveat: Some tests are commented out (cf. JIRA: MATH-1552).
# #
PARABOLA, 4, 2.5 3.1 4.6 5.8, 0 0 0 0, 1e-4, 380, 1, 2e-1, false PARABOLA, 8, 0 0 0 0 0 0 0 0, 20, 40, 1e-4, 7200, false
ROSENBROCK, 2, -1.2 1, 1 1, 2e-3, 11100, 1, 1e-1, false ROSENBROCK, 2, 1 1, 0.9, 1.1, 2e-3, 600, true
#ROSENBROCK, 5, -4.4 -3.5 -2.6 -1.7 -0.8, 1 1 1 1 1, 1e-4, 180, 5e-1, 1e-1, false CIGAR, 2, 0 0, 2, 3, 5e-5, 240, false
ROSENBROCK, 10, -0.1 0.1 0.2 -0.1 -0.2 0.3 0.2 -0.1 0.2 -0.3, 1 1 1 1 1 1 1 1 1 1, 3e-3, 100000, 1, 5e-2, false SPHERE, 2, 0 0, 2, 3, 5e-4, 200, false
#POWELL, 4, 3 -1 -2 1, 0 0 0 0, 5e-3, 420, 1, 1e-1, false ELLI, 2, 0 0, 3, 4, 1e-4, 350, false
CIGAR, 13, -1.2 2.3 -3.2 2.1 1.2 -2.3 3.2 -2.1 -1.2 2.3 -3.2 2.1 -1.2, 0 0 0 0 0 0 0 0 0 0 0 0 0, 5e-6, 7000, 1, 1e-1, false TWO_AXES, 2, 0 0, 3, 4, 1e-4, 400, false
SPHERE, 13, -1.2 2.3 -3.2 2.1 1.2 -2.3 3.2 -2.1 -1.2 2.3 -3.2 2.1 -1.2, 0 0 0 0 0 0 0 0 0 0 0 0 0, 5e-5, 3600, 1, 1e-1, false CIG_TAB, 2, 0 0, 3, 4, 1e-3, 280, false
ELLI, 10, 2 3 4 -3 -2 -1 2 3 4 3, 0 0 0 0 0 0 0 0 0 0, 1e-4, 50000, 1, 1e-1, false TABLET, 2, 0 0, 3, 4, 2e-4, 340, false
TWO_AXES, 10, 2 3 4 -3 -2 -1 2 3 4 3, 0 0 0 0 0 0 0 0 0 0, 1e-6, 3200, 1, 1e-1, false SUM_POW, 2, 0 0, 3, 4, 1e-2, 190, false
CIG_TAB, 10, 2 3 4 -3 -2 -1 2 3 4 3, 0 0 0 0 0 0 0 0 0 0, 5e-6, 2900, 1, 1e-1, false ACKLEY, 2, 0 0, 2, 4, 1e-6, 310, false
TABLET, 11, 2 3 4 -3 -2 -1 2 3 4 3 -1, 0 0 0 0 0 0 0 0 0 0 0, 5e-6, 3200, 1, 1e-1, false #RASTRIGIN, 2, 0 0, 0.9, 1.1, 5e-5, 1000, false
DIFF_POW, 7, 1 -1 1 -1 1 -1 1, 0 0 0 0 0 0 0, 5e-4, 2500, 1, 1e-1, false GRIEWANK, 2, 0 0, 2, 3, 1e-1, 500, false
SS_DIFF_POW, 6, -3.2 2.1 1.2 -2.3 3.2 -2.1, 0 0 0 0 0 0, 1e-3, 4000, 1, 1e-1, false LEVY, 2, 1 1, 0.9, 1.1, 1e-3, 200, false
ACKLEY, 4, 3 4 -3 -2, 0 0 0 0, 1e-6, 770, 1, 5e-1, false SCHWEFEL, 2, 420.9687 420.9687, 9, 11, 1, 200, false
#RASTRIGIN, 4, 3 4 -3 -2, 0 0 0 0, 1e-6, 10000, 1, 5e-1, false ZAKHAROV, 2, 0 0, 3, 4, 1e-4, 1000, false
#GRIEWANK, 3, -210 123 -456, 0 0 0, 1e-1, 1000, 50, 100, false PERM, 2, 1 2, 0.9, 1.1, 2e-3, 540, true
#LEVY, 4, 4 -6 -2 8, 1 1 1 1, 1e-3, 3000, 1, 1, false STYBLINSKI_TANG, 2, -2.903534 -2.903534, 1, 2, 1e-4, 210, false
#SCHWEFEL, 2, 100 -200, 420.9687 420.9687, 1, 300, 100, 100, false #HAPPY_CAT, 2, -1 -1, 2, 3, 1e-4, 500, false
ZAKHAROV, 5, -4 -2 3 5 7, 0 0 0 0 0, 1e-4, 3100, 1.5, 1, false #SALOMON, 2, 0 0, 2, 3, 1e-4, 500, false
PERM, 2, -2 -1, 1 2, 3e-2, 25000, 5e-1, 1e-1, false
#PERM, 3, -2 -3 -1, 1 2 3, 5e-5, 200, 5e-1, 1e-1, false
#PERM, 4, -2 -3 -4 -1, 1 2 3 4, 5e-4, 2200, 5e-1, 1e-1, false
#PERM, 5, -2 -3 -4 -5 -1, 1 2 3 4 5, 5e-4, 200, 5e-1, 1e-1, false
#STYBLINSKI_TANG, 4, 1 2 3 4, -2.903534 -2.903534 -2.903534 -2.903534, 1e-4, 500, 1, 5e-1, false

Can't render this file because it contains an unexpected character in line 6 and column 8.

View File

@ -17,41 +17,35 @@
# #
# Format (CSV) defined in "SimplexOptimizerTest.Task" class. # Format (CSV) defined in "SimplexOptimizerTest.Task" class.
# Columns are: # Columns are:
# 0: function name (value from "TestFunction" enum) # 0: Function name (value from "TestFunction" enum)
# 1: space dimension (n) # 1: Space dimension (n)
# 2: nominal start point ("n" space-separated values) # 2: Optimum ("n" space-separated values)
# 3: optimum ("n" space-separated values) # 3: Minimal radius of the spherical shell around the optimum (within which to randomly select a start point)
# 4: maximum expected distance from the result to the optimum # 4: Minimal radius of the spherical shell around the optimum (within which to randomly select a start point)
# 5: expected number of function evaluations # 5: Maximum expected distance from the result to the optimum
# 6: length of the sides of the initial simplex # 6: Expected number of function evaluations
# 7: size of the random noise (to generate slightly different initial conditions) # 7: Whether to perform simulated annealing
# 8: whether to perform simulated annealing # 8: [optional] File prefix for debugging (or empty slot for no debugging)
# 9: [optional] File prefix for debugging (or empty slot for no debugging) # 9: [optional] Indices (space-separated) of simplex points to save (empty means "all points")
# 10: [optional] Indices (space-separated) of simplex points to save (empty means "all points")
# #
# Caveat: Some tests are commented out (cf. JIRA: MATH-1552). # Caveat: Some tests are commented out (cf. JIRA: MATH-1552).
# #
PARABOLA, 4, 2.5 3.1 4.6 5.8, 0 0 0 0, 1e-4, 200, 1, 2e-1, false PARABOLA, 8, 0 0 0 0 0 0 0 0, 20, 40, 1e-4, 7200, false
ROSENBROCK, 2, -1.2 1, 1 1, 1e-4, 180, 1, 1e-1, false ROSENBROCK, 2, 1 1, 0.9, 1.1, 1e-4, 420, false
ROSENBROCK, 5, -4.4 -3.5 -2.6 -1.7 -0.8, 1 1 1 1 1, 1e-4, 800, 5e-1, 1e-1, false CIGAR, 2, 0 0, 2, 3, 5e-5, 240, false
ROSENBROCK, 10, -0.1 0.1 0.2 -0.1 -0.2 0.3 0.2 -0.1 0.2 -0.3, 1 1 1 1 1 1 1 1 1 1, 5e-5, 9000, 1, 5e-2, false SPHERE, 2, 0 0, 2, 3, 5e-4, 200, false
POWELL, 4, 3 -1 -2 1, 0 0 0 0, 5e-3, 420, 1, 1e-1, false ELLI, 2, 0 0, 3, 4, 1e-4, 350, false
CIGAR, 13, -1.2 2.3 -3.2 2.1 1.2 -2.3 3.2 -2.1 -1.2 2.3 -3.2 2.1 -1.2, 0 0 0 0 0 0 0 0 0 0 0 0 0, 5e-5, 7000, 1, 1e-1, false TWO_AXES, 2, 0 0, 3, 4, 1e-4, 400, false
SPHERE, 13, -1.2 2.3 -3.2 2.1 1.2 -2.3 3.2 -2.1 -1.2 2.3 -3.2 2.1 -1.2, 0 0 0 0 0 0 0 0 0 0 0 0 0, 5e-4, 3000, 1, 1e-1, false CIG_TAB, 2, 0 0, 3, 4, 1e-3, 280, false
ELLI, 10, 2 3 4 -3 -2 -1 2 3 4 3, 0 0 0 0 0 0 0 0 0 0, 1e-4, 50000, 1, 1e-1, false TABLET, 2, 0 0, 3, 4, 2e-4, 340, false
#TWO_AXES, 10, 2 3 4 -3 -2 -1 2 3 4 3, 0 0 0 0 0 0 0 0 0 0, 1e-4, 5000, 1, 1e-1, false SUM_POW, 2, 0 0, 3, 4, 1e-2, 190, true
#CIG_TAB, 10, 2 3 4 -3 -2 -1 2 3 4 3, 0 0 0 0 0 0 0 0 0 0, 1e-4, 7000, 1, 1e-1, false ACKLEY, 2, 0 0, 2, 4, 1e-6, 310, false
TABLET, 11, 2 3 4 -3 -2 -1 2 3 4 3 -1, 0 0 0 0 0 0 0 0 0 0 0, 2e-4, 3600, 1, 1e-1, false #RASTRIGIN, 2, 0 0, 0.9, 1.1, 5e-5, 1000, false
#DIFF_POW, 7, 1 -1 1 -1 1 -1 1, 0 0 0 0 0 0 0, 5e-4, 2500, 1, 1e-1, false GRIEWANK, 2, 0 0, 2, 3, 1e-1, 500, false
SS_DIFF_POW, 6, -3.2 2.1 1.2 -2.3 3.2 -2.1, 0 0 0 0 0 0, 1e-3, 4000, 1, 1e-1, false LEVY, 2, 1 1, 0.9, 1.1, 1e-3, 200, false
ACKLEY, 4, 3 4 -3 -2, 0 0 0 0, 1e-6, 430, 1, 5e-1, false SCHWEFEL, 2, 420.9687 420.9687, 9, 11, 1, 200, false
#RASTRIGIN, 4, 3 4 -3 -2, 0 0 0 0, 1e-6, 10000, 1, 5e-1, false ZAKHAROV, 2, 0 0, 3, 4, 1e-4, 1000, false
#GRIEWANK, 3, -210 123 -456, 0 0 0, 1e-1, 1000, 50, 100, false PERM, 2, 1 2, 0.9, 1.1, 2e-3, 260, false
#LEVY, 4, 4 -6 -2 8, 1 1 1 1, 1e-3, 3000, 1, 1, false STYBLINSKI_TANG, 2, -2.903534 -2.903534, 1, 2, 1e-4, 210, false
#SCHWEFEL, 2, 100 -200, 420.9687 420.9687, 1, 300, 100, 100, false #HAPPY_CAT, 2, -1 -1, 2, 3, 1e-4, 500, false
ZAKHAROV, 5, -4 -2 3 5 7, 0 0 0 0 0, 5e-5, 500, 1.5, 1, false #SALOMON, 2, 0 0, 2, 3, 1e-4, 500, false
PERM, 2, -2 -1, 1 2, 5e-5, 200, 5e-1, 1e-1, false
#PERM, 3, -2 -3 -1, 1 2 3, 5e-5, 200, 5e-1, 1e-1, false
PERM, 4, -2 -3 -4 -1, 1 2 3 4, 5e-3, 2800, 5e-1, 1e-1, false
#PERM, 5, -2 -3 -4 -5 -1, 1 2 3 4 5, 5e-4, 200, 5e-1, 1e-1, false
#STYBLINSKI_TANG, 4, 1 2 3 4, -2.903534 -2.903534 -2.903534 -2.903534, 1e-4, 500, 1, 5e-1, false

Can't render this file because it contains an unexpected character in line 6 and column 8.