 8

open FD
val cn = FD.BND
val v = rangeVec(root, size, (0, size-1))
val v1 = Vector.tabulate (size, fn i => (i, Vector.sub(v,i)))
val v2 = Vector.tabulate (size, fn i => (~i, Vector.sub(v,i)))

val _ =
    (distinctOffset(root, v1, cn);
     distinctOffset(root, v2, cn);
     distinct(root, v, cn);
     branch(root, v, B_SIZE_MIN, B_MIN))

fun toInt space v = FD.Reflect.value (space,v)
fun readSolution space = Vector.map (fn var => FD.Reflect.value (space, var)) v

(* Recomputation Policy : fixed distance