-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
49 lines (38 loc) · 1.99 KB
/
main.py
File metadata and controls
49 lines (38 loc) · 1.99 KB
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
from bin.disposables import main_vars as mv
from bin.disposables import main_functions as mf
from bin.disposables import constructor as c
from bin.optimization import constrains as cons
from bin.optimization import p_func as p
import time
"""NOTES -> The gray imports must be made to load the variables from those modules into RAM"""
# ================================================================================================================
# EXECUTION VARIABLES
# ================================================================================================================
general_logger = 0 # 1 = print // 2 = print + log // 3 = log // 0 = nothing
z_func_logger = 3 # 1 = print // 2 = print + log // 3 = log // 0 = nothing
iterations = 5
# ================================================================================================================
# ISOLATED FUNCTION CALLS
# ================================================================================================================
mf.info()
# ================================================================================================================
# DEFINITIVE LOOP WORKFLOW
# ================================================================================================================
'''
NOTES
1. Z_func inherits the following variables, which can be manually altered:
. Logger
· Current iteration number
· Total number of iterations
· Psi1, phi, chi, psi2, delta, omega [ 1 = Activate p_func // 0 = Deactivate p_func ]
'''
start_time = time.time() # The timer starts after the database setup
mf.create_readable_files()
for i in range(iterations):
print(f"\n///// ITERATION {i+1}\n///// STARTING CONSTRUCTOR")
c.main(general_logger, i + 1)
print("///// CONSTRUCTOR FINISHED")
mf.unsuitable_workers_cleaner()
mf.z_func(z_func_logger, i+1, iterations, 1, 1, 1, 1, 1, 1)
mf.clearer()
mf.Logger(general_logger, "\nEXECUTION TIME -> --- %s seconds ---" % (time.time() - start_time), 'results')