-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Yan Georget
committed
Oct 1, 2024
1 parent
edac760
commit 5ae7875
Showing
2 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import argparse | ||
|
||
from rich import print | ||
|
||
from nucs.examples.bibd.bibd_problem import BIBDProblem | ||
from nucs.solvers.backtrack_solver import BacktrackSolver | ||
from nucs.statistics import get_statistics | ||
|
||
if __name__ == "__main__": | ||
parser = argparse.ArgumentParser() | ||
parser.add_argument("-v", type=int) | ||
parser.add_argument("-b", type=int) | ||
parser.add_argument("-r", type=int) | ||
parser.add_argument("-k", type=int) | ||
parser.add_argument("-l", type=int) | ||
args = parser.parse_args() | ||
problem = BIBDProblem(args.v, args.b, args.r, args.k, args.l) | ||
solver = BacktrackSolver(problem) | ||
solver.solve_all(lambda solution: print(problem.solution_as_matrix(solution))) | ||
print(get_statistics(solver.statistics)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters