-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
30 lines (24 loc) · 969 Bytes
/
main.py
File metadata and controls
30 lines (24 loc) · 969 Bytes
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
import instances
import metaheuristic_method
import mathematical_method
import time
# # Dados do problema
nvertex = int(input("Digite o número de vértices: "))
ncolors = int(input("Digite o número de cores: "))
V = instances.generateVertex(nvertex) # Conjunto de vértices
C = instances.generateColors(ncolors) # Conjunto de cores
E = instances.generateEdges(V) # Conjunto de arestas
cores = instances.generateVerticesColors(V, ncolors)
M = instances.generateM(ncolors, cores)
Vc = instances.generateVc(cores, ncolors) # Mapa de cores de cada vértice
print("edges:", E)
print("M", M)
print('Vc', Vc)
start_mathematical = time.time()
mathematical_method.start(V, E, C, Vc, M)
end_mathematical = time.time()
print("Tempo de execução: ", end_mathematical - start_mathematical)
start_metaheuristic = time.time()
metaheuristic_method.start(V, E, Vc, M)
end_metaheuristic = time.time()
print("Tempo de execução: ", end_metaheuristic - start_metaheuristic)