Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(jssp): disable population diversity estimation #428

Merged
merged 1 commit into from
Oct 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions examples/jssp/problem/probe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -42,7 +44,9 @@ impl Probe<JsspIndividual> 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());
}

Expand All @@ -57,7 +61,9 @@ impl Probe<JsspIndividual> 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}",
Expand Down