-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
87 lines (55 loc) · 1.92 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
from Core.HandlerSystem import HandlerSystem
import threading
handler = HandlerSystem()
# depositos de insumos periodicos
def depositar_oleo_residual():
# ajustar para os 10 segundos
threading.Timer(10.0, depositar_oleo_residual).start()
handler.depositar_oleo_residual()
def depositar_et_oh():
threading.Timer(1, depositar_et_oh).start()
handler.depositar_et_oh()
def depositar_na_oh():
threading.Timer(1, depositar_na_oh).start()
handler.depositar_na_oh()
# transferencias periodicas de acordo com a vazao
def transferir_oleo_residual():
threading.Timer(1.0, transferir_oleo_residual).start()
handler.transferir_oleo_residual()
def transferir_et_oh():
threading.Timer(1.0, transferir_et_oh).start()
handler.transferir_et_oh()
def transferir_na_oh():
threading.Timer(1.0, transferir_na_oh).start()
handler.transferir_na_oh()
def processo_reator():
threading.Timer(1.0, processo_reator).start()
handler.processo_reator()
def processo_decantador():
threading.Timer(1.0, processo_decantador).start()
handler.processo_decantador()
def transfere_secador_etoh():
threading.Timer(1.0, transfere_secador_etoh).start()
handler.transferir_secador_etoh()
def transfere_lavagem():
threading.Timer(1.0, transfere_lavagem).start()
handler.transferir_lavagem()
def transfere_secador_biodiesel():
threading.Timer(1.0, transfere_secador_biodiesel).start()
handler.transferir_secador_biodiesel()
def start_fluxo():
# periodicamente enviar os insumos
depositar_oleo_residual()
depositar_et_oh()
depositar_na_oh()
# # periodicamente transferir os insumos entre os componentes
transferir_oleo_residual()
transferir_et_oh()
transferir_na_oh()
# periodicamente o reator processa
processo_reator()
processo_decantador()
transfere_secador_etoh()
transfere_lavagem()
transfere_secador_biodiesel()
start_fluxo()