Skip to content

Commit

Permalink
Output which problems are defined, in the Python script.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimitri Rusin committed Nov 15, 2023
1 parent 3442aff commit 8013650
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions tests/python/test_cec_functions.py
Original file line number Diff line number Diff line change
@@ -1,94 +1,97 @@
from ioh import get_problem
import ioh

f1 = get_problem(1001, 1, 2)
print("ioh.problem.RealSingleObjective.problems")
print(ioh.problem.RealSingleObjective.problems)

f1 = ioh.get_problem(1001, 1, 2)
x1 = [2, 31]
y1 = f1(x1)
print()
print("function 1001")
print(x1)
print(y1)

f2 = get_problem(1002, 1, 2)
f2 = ioh.get_problem(1002, 1, 2)
x2 = [2, 31]
y2 = f2(x2)
print()
print("function 1002")
print(x2)
print(y2)

f3 = get_problem(1003, 1, 2)
f3 = ioh.get_problem(1003, 1, 2)
x3 = [2, 31]
y3 = f3(x3)
print()
print("function 1003")
print(x3)
print(y3)

f4 = get_problem(1004, 1, 2)
f4 = ioh.get_problem(1004, 1, 2)
x4 = [2, 31]
y4 = f4(x4)
print()
print("function 1004")
print(x4)
print(y4)

f = get_problem(1005, 1, 2)
f = ioh.get_problem(1005, 1, 2)
x = [2, 31]
y = f(x)
print()
print("function 1005")
print(x)
print(y)

f = get_problem(1006, 1, 20)
f = ioh.get_problem(1006, 1, 20)
x = [1,2,5,3,22,2,2,7,6,5,5,4,34,1,2,-13,4,5,6,7]
y = f(x)
print()
print("function 1006")
print(x)
print(y)

f = get_problem(1007, 1, 20)
f = ioh.get_problem(1007, 1, 20)
x = [1,2,5,3,22,2,2,7,6,5,5,4,34,1,2,-13,4,5,6,7]
y = f(x)
print()
print("function 1007")
print(x)
print(y)

f = get_problem(1008, 1, 20)
f = ioh.get_problem(1008, 1, 20)
x = [1,2,5,3,22,2,2,7,6,5,5,4,34,1,2,-13,4,5,6,7]
y = f(x)
print()
print("function 1008")
print(x)
print(y)

f = get_problem(1009, 1, 2)
f = ioh.get_problem(1009, 1, 2)
x = [2, 31]
y = f(x)
print()
print("function 1009")
print(x)
print(y)

f = get_problem(1010, 1, 2)
f = ioh.get_problem(1010, 1, 2)
x = [2, 31]
y = f(x)
print()
print("function 1010")
print(x)
print(y)

f = get_problem(1011, 1, 2)
f = ioh.get_problem(1011, 1, 2)
x = [2, 31]
y = f(x)
print()
print("function 1011")
print(x)
print(y)

f = get_problem(1012, 1, 2)
f = ioh.get_problem(1012, 1, 2)
x = [2, 31]
y = f(x)
print()
Expand Down

0 comments on commit 8013650

Please sign in to comment.