From a32bff65f08d169dee06454d42830de1cc773206 Mon Sep 17 00:00:00 2001 From: sbosse Date: Tue, 27 Aug 2024 00:16:19 +0200 Subject: [PATCH] Tue 27 Aug 00:14:56 CEST 2024 --- test/test-sat.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/test-sat.js diff --git a/test/test-sat.js b/test/test-sat.js new file mode 100644 index 0000000..e387a2e --- /dev/null +++ b/test/test-sat.js @@ -0,0 +1,17 @@ +var m = sat.solver() +sat.R(m,sat.L.atMostOne("Alice", "Bob")) +sat.R(m,sat.L.or("Bob", "Charlie")) +sat.solve(m); +print(sat.solve(m)) +print(sat.solve(m,'Alice')) + +var m1 = sat.solver() +sat.R(m1,sat.L.atMostOne("Alice", "Bob")) + +var m2 = JSON.parse(JSON.stringify(m1)) + +m2.id=null; +sat.R(m2,sat.L.or("Bob", "Charlie")) +print(sat.solve(m2)) +print(sat.solve(m2,'Alice')) +