-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
31 lines (25 loc) · 886 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from classes.model import *
import matplotlib.pyplot as plt
'''
Main.py
Input:
Food_bool - set to True if model runs with food enabled, otherwise False.
no_fish_size - fraction of area that is inaccessible to fisherman, acts as no fishing zone.
quotum - yearly limit of tonnes of fish that can be caught by the fisherman agents.
iterations - How many weeks the model will run for.
Output:
printed overview of data along with a graphical plot.
Notes:
This option is also available in Ipython environment, accessible by running visual.py
'''
if __name__ == "__main__":
food_bool = True
no_fish_size = 0
quotum = 4000
iterations = 5000
model = FishingModel(food_bool = food_bool, no_fish_size = no_fish_size, quotum = quotum)
model.run_model(iterations)
data = model.datacollector.get_model_vars_dataframe()
data.plot()
plt.show()
print(data)