Fixed insert_chromosome
This commit is contained in:
@ -52,7 +52,7 @@ class SQL_Database:
|
|||||||
""" Insert one chromosome into the database"""
|
""" Insert one chromosome into the database"""
|
||||||
|
|
||||||
# Structure the insert data
|
# Structure the insert data
|
||||||
db_chromosome = (generation, chromosome.fitness, '[chromosome]')
|
db_chromosome = (generation, chromosome.fitness, repr(chromosome))
|
||||||
|
|
||||||
# Create sql query structure
|
# Create sql query structure
|
||||||
sql = ''' INSERT INTO data(generation, fitness, chromosome)
|
sql = ''' INSERT INTO data(generation, fitness, chromosome)
|
||||||
@ -135,6 +135,7 @@ class SQL_Database:
|
|||||||
|
|
||||||
return sql
|
return sql
|
||||||
|
|
||||||
|
|
||||||
def insert_config(self,ga):
|
def insert_config(self,ga):
|
||||||
"""Insert the configuration attributes into the config."""
|
"""Insert the configuration attributes into the config."""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user