Skip to content

Commit eaca2cd

Browse files
authored
Update benchmarks default values (#12)
* default values for job-shop * default sudoku * change exam tt default values * use default constructors in benchmarks for tests * smaller sudoku
1 parent ee07a4f commit eaca2cd

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

pycona/benchmarks/exam_timetabling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def day_of_exam(course, slots_per_day):
88
return course // slots_per_day
99

1010

11-
def construct_examtt_simple(nsemesters=9, courses_per_semester=6, slots_per_day=9, days_for_exams=14):
11+
def construct_examtt_simple(nsemesters=6, courses_per_semester=3, slots_per_day=3, days_for_exams=10):
1212
"""
1313
:return: a ProblemInstance object, along with a constraint-based oracle
1414
"""

pycona/benchmarks/job_shop_scheduling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from ..problem_instance import ProblemInstance, absvar
99

1010

11-
def construct_job_shop_scheduling_problem(n_jobs, machines, horizon, seed=0):
11+
def construct_job_shop_scheduling_problem(n_jobs=10, machines=2, horizon=15, seed=0):
1212
"""
1313
:return: a ProblemInstance object, along with a constraint-based oracle
1414
"""

pycona/benchmarks/sudoku.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from ..problem_instance import ProblemInstance, absvar
55

66

7-
def construct_sudoku(block_size_row, block_size_col, grid_size):
7+
def construct_sudoku(block_size_row=2, block_size_col=2, grid_size=4):
88
"""
99
:return: a ProblemInstance object, along with a constraint-based oracle
1010
"""

tests/test_algorithms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# Modify the problem generators for fast tests
1212
fast_problem_generators = [construct_murder_problem()] # Keep only the smallest problem
1313

14-
problem_generators = [construct_murder_problem(), construct_examtt_simple(6, 3, 2, 10), construct_nurse_rostering()]
14+
problem_generators = [construct_murder_problem(), construct_examtt_simple(), construct_nurse_rostering()]
1515

1616
classifiers = [DecisionTreeClassifier(), RandomForestClassifier()]
1717
algorithms = [ca.QuAcq(), ca.MQuAcq(), ca.MQuAcq2(), ca.GQuAcq(), ca.PQuAcq()]

0 commit comments

Comments
 (0)