From 1a65c0c4464dda77d5fbedc89f3709e97f0fa9b7 Mon Sep 17 00:00:00 2001 From: Erwan Jahier <erwan.jahier@univ-grenoble-alpes.fr> Date: Mon, 27 Feb 2023 15:27:47 +0100 Subject: [PATCH] fix: silent configurations are necessarily legitimate --- lib/sasacore/simuState.ml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/sasacore/simuState.ml b/lib/sasacore/simuState.ml index aaa67170..45d3d4df 100644 --- a/lib/sasacore/simuState.ml +++ b/lib/sasacore/simuState.ml @@ -1,4 +1,4 @@ -(* Time-stamp: <modified the 25/01/2023 (at 10:47) by Erwan Jahier> *) +(* Time-stamp: <modified the 27/02/2023 (at 14:12) by Erwan Jahier> *) open Register open Topology @@ -72,7 +72,7 @@ let update_neighbors config neighbors = StringMap.map let (update_config: 'v Conf.t -> 'v t -> 'v t) = fun e st -> - let verb = !Register.verbose_level > 0 in + let verb = !Register.verbose_level > 2 in if verb then Printf.eprintf " ===> update_neighbor_env\n%!"; { st with neighbors = update_neighbors e st.neighbors ; config = e } @@ -409,7 +409,8 @@ let (compute_potentiel: 'v t -> float) = let (legitimate: 'v t -> bool) = fun st -> match Register.get_legitimate () with - | None -> false + | None -> (* check if st is silent *) + get_enable_processes st |> snd |> List.flatten |> List.for_all not | Some ulf -> let pidl = List.map (fun p -> p.Process.pid) st.network in ulf pidl (neigbors_of_pid st) -- GitLab