Python Genetic Algorithm With Constraint In Sql