diff --git a/lib/sasacore/worstInit.ml b/lib/sasacore/worstInit.ml index 61926b422f8410a0b66a772552e92c220e08d405..545d78487b792f22476da217940b045cc11679ad 100644 --- a/lib/sasacore/worstInit.ml +++ b/lib/sasacore/worstInit.ml @@ -1,4 +1,4 @@ -(* Time-stamp: <modified the 11/10/2021 (at 16:38) by Erwan Jahier> *) +(* Time-stamp: <modified the 12/10/2021 (at 16:22) by Erwan Jahier> *) open Register @@ -213,8 +213,10 @@ let (fchc : out_channel -> ('v SimuState.t -> int) -> 'v SimuState.t -> int cut = (fun pn n -> if pn.cost > n.cost then ( Printf.fprintf log "%d: cut a point at depth %d of cost %d < %d\n%!" !cpt n.d n.cost pn.cost; - true) - else false ); + true + ) + else false + ); } in let rec run_more psol more = diff --git a/test/k-clustering/config.ml b/test/k-clustering/config.ml index 200a63d57fdd6492f4bee7388492a23ea2cdce11..705f516c554498ffcf4413be282c6e975c48f9e5 100644 --- a/test/k-clustering/config.ml +++ b/test/k-clustering/config.ml @@ -41,5 +41,16 @@ let (pf: pid list -> (pid -> ('a * ('a neighbor * pid) list)) -> float) = let potential = Some pf let legitimate = None (* None => only silent configuration are legitimate *) -let fault = None (* None => the simulation stop once a legitimate configuration is reached *) -let init_search_utils = None +let fault = None + +open State +let maxi = 2*k+1 + +let s2n s = [I (0, s.alpha, maxi)] +let n2s nl s = + match nl with + | [I(_, i, _)] -> { s with alpha = i } + | _ -> assert false + +let init_search_utils = Some (s2n, n2s) +