Browse Source

Started to create the model without any data to work with

master
stew3254 4 years ago
parent
commit
a6ec607215
No known key found for this signature in database GPG Key ID: FB009CFA64C95CDE
  1. 27
      model.py

27
model.py

@ -0,0 +1,27 @@
#!/usr/bin/python3
import pylab
import os
files = sorted(os.listdir("data/"))
simulations = {}
for file in files:
population = []
with open("data/" + file, "r") as f:
for line in f.readlines():
population.append(int(line.split()[1]))
simulations.update({file.strip(".dat"): population})
print(simulations.keys())
t = pylab.arange(1, 3649, 1)
for key in simulations.keys():
s = [i**2 for i in simulations[key]]
pylab.plot(t, s, color="purple")
pylab.xlabel('Days')
pylab.ylabel('Population')
pylab.title('Stink Bug Population')
pylab.grid(True)
pylab.show()
Loading…
Cancel
Save