Пример #1
0
 /** Constructs an instance of BlockedNQueens from the file with the given name. */
 public BlockedNQueens(final String file) {
   this.file = file;
   this.queen = Relation.unary("Queen");
   this.x = Relation.binary("x");
   this.y = Relation.binary("y");
   this.blocked = Relation.binary("blocked");
   this.num = Relation.unary("num");
   this.ord = Relation.binary("ord");
 }
Пример #2
0
 /** Constructs a new instance of the file system problem. */
 public FileSystem() {
   Obj = Relation.unary("Object");
   Name = Relation.unary("Name");
   File = Relation.unary("File");
   Dir = Relation.unary("Dir");
   Root = Relation.unary("Root");
   Cur = Relation.unary("Cur");
   DirEntry = Relation.unary("DirEntry");
   entries = Relation.binary("entries");
   parent = Relation.binary("parent");
   name = Relation.binary("name");
   contents = Relation.binary("contents");
 }
Пример #3
0
  public SymmetryBreakingTest() {
    this.solver = new Solver();

    List<String> atoms = new ArrayList<String>(USIZE);
    for (int i = 0; i < USIZE; i++) {
      atoms.add("" + i);
    }
    final Universe universe = new Universe(atoms);
    this.factory = universe.factory();

    to1 = Relation.binary("to1");
    ord1 = Relation.unary("ord1");
    first1 = Relation.unary("first1");
    last1 = Relation.unary("last1");

    to2 = Relation.binary("to2");
    ord2 = Relation.unary("ord2");
    first2 = Relation.unary("first2");
    last2 = Relation.unary("last2");

    to3 = Relation.binary("to3");
    ord3 = Relation.unary("ord3");
    first3 = Relation.unary("first3");
    last3 = Relation.unary("last3");

    ac1 = Relation.binary("ac1");
    ac2 = Relation.binary("ac2");
    ac3 = Relation.binary("ac3");

    r1 = Relation.unary("r1");
    r2 = Relation.binary("r2");
  }