Skip to content
Snippets Groups Projects
Commit f217913c authored by erwan's avatar erwan
Browse files

ditto for k-clustering

parent 36815247
No related branches found
No related tags found
No related merge requests found
Pipeline #90460 failed
(* 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 =
......
......@@ -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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment