From 4248739de8b4bc8d33aabaf92bdf2d06bc8dab16 Mon Sep 17 00:00:00 2001 From: SimpleArt <71458112+SimpleArt@users.noreply.github.com> Date: Mon, 24 May 2021 18:15:49 -0400 Subject: [PATCH] Implemented save_data flag. --- EasyGA/EasyGA.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/EasyGA/EasyGA.py b/EasyGA/EasyGA.py index d204fe2..5c91c5d 100644 --- a/EasyGA/EasyGA.py +++ b/EasyGA/EasyGA.py @@ -93,7 +93,8 @@ class GA(Attributes): self.sort_by_best_fitness() # Save the population to the database - self.save_population() + if self.save_data: + self.save_population() # Adapt the ga if the generation times the adapt rate # passes through an integer value.