Skip to content
Snippets Groups Projects
Commit a9bf52e7 authored by Muller Sacha's avatar Muller Sacha
Browse files

commit before pull

parent a3c91feb
No related branches found
No related tags found
No related merge requests found
*.pyc
\ No newline at end of file
*.pyc
__pycache__/
\ No newline at end of file
......@@ -101,4 +101,4 @@ class RotTable:
table1 = RotTable()
print(table1.rot_table)
# print(table1.rot_table)
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -3,19 +3,22 @@ import math
import numpy
import RotTable
from individu import Individu
from population import Population
from population import Population, afficher
import croisement
from Traj3D import *
from random import random
import matplotlib.pyplot as plt
def main(N,tmax,pmutation, proportion,brin="plasmid_8k.fasta"):
'''lineList = [line.rstrip('\n') for line in open(brin)]
brin = ''.join(lineList[1:])'''
L=[]
People=Population(N)
afficher(People)
for i in range(tmax):
print("\n \n NOUVELLE GENERATION \n \n")
max=0
best=None
for individu in People.indiv:
......@@ -29,11 +32,12 @@ def main(N,tmax,pmutation, proportion,brin="plasmid_8k.fasta"):
best=individu
max=individu.score
L.append(max)
print(L)
# print(L)
afficher(People)
plt.plot([i for i in range(tmax)], L)
plt.show()
return(individu)
main(100,50,0.015,2)
main(10,3,0.015,2)
......@@ -142,6 +142,7 @@ def afficher(popu):
for individu in popu.indiv :
print("\n individu \n")
print(individu.table.rot_table)
print ("score", individu.score)
def test():
popu = Population(4)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment