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