From 78b854b2fdc85a157c1f0b929e9f787955cc5e68 Mon Sep 17 00:00:00 2001 From: Kacper Kafara Date: Mon, 9 Oct 2023 11:18:15 +0200 Subject: [PATCH] Disable population diversity estimation --- examples/jssp/problem/probe.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/examples/jssp/problem/probe.rs b/examples/jssp/problem/probe.rs index d1d0daa..aafe8bc 100644 --- a/examples/jssp/problem/probe.rs +++ b/examples/jssp/problem/probe.rs @@ -11,6 +11,8 @@ impl JsspProbe { Self {} } + // TODO: This has either been not working as expected or the solver runs so bad. + // TODO: Verify whether the diversity is better on other problems fn estimate_pop_diversity(population: &[JsspIndividual]) -> f64 { population .iter() @@ -42,7 +44,9 @@ impl Probe for JsspProbe { metadata: &ecrs::ga::GAMetadata, population: &[JsspIndividual], ) { - let diversity = JsspProbe::estimate_pop_diversity(population); + // TODO: As this metric is useless right now I'm disabling it temporarily + // let diversity = JsspProbe::estimate_pop_diversity(population); + let diversity = 0.0; info!(target: "csv", "diversity,0,0,{},{diversity}\npopgentime,{}", population.len(), metadata.pop_gen_dur.unwrap().as_millis()); } @@ -57,7 +61,9 @@ impl Probe for JsspProbe { } fn on_new_generation(&mut self, metadata: &ecrs::ga::GAMetadata, generation: &[JsspIndividual]) { - let diversity = JsspProbe::estimate_pop_diversity(generation); + // TODO: As this metric is useless right now I'm disabling it temporarily + // let diversity = JsspProbe::estimate_pop_diversity(generation); + let diversity = 0.0; info!( target: "csv", "diversity,{},{},{},{diversity}",