Skip to content

Commit

Permalink
fix: correção para os testes
Browse files Browse the repository at this point in the history
  • Loading branch information
ReinanHS committed Dec 5, 2024
1 parent 16f8a44 commit baa656f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/python/tests/delivery_ag/ag_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,22 @@ def test_resolver_com_um_valor_baixo(self):

self.assertLess(melhor_solucao.nota_avaliacao, 400)

def test_resolver_com_um_valor_preciso(self):
self.ag = AlgoritmoGenetico(
tamanho_populacao=20,
taxa_mutacao=0.05,
debug_mode=False)

for _ in range(100):
melhor_solucao = self.ag.resolver(
numero_geracoes=1000,
cidades=self.cidades,
rotas=self.rotas,
caminho=self.caminho,
centro_distribuicao=self.centro_distribuicao,
)
self.assertEqual(melhor_solucao.nota_avaliacao, 125)


if __name__ == '__main__':
unittest.main()

0 comments on commit baa656f

Please sign in to comment.