Tue 27 Aug 00:14:56 CEST 2024

This commit is contained in:
sbosse 2024-08-27 00:16:19 +02:00
parent 2bc204c71d
commit a32bff65f0

17
test/test-sat.js Normal file
View File

@ -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'))