Tue 27 Aug 00:14:56 CEST 2024
This commit is contained in:
parent
2bc204c71d
commit
a32bff65f0
17
test/test-sat.js
Normal file
17
test/test-sat.js
Normal 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'))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user