-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdados.py
152 lines (147 loc) · 4.59 KB
/
dados.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
#grafo 1, 2, 3, 4 ....
nova_luz = {
"arestas": [
('1', '2', 50, True),
('2', '3', 215, False),
('3', '4', 100, False),
('3', '17', 85, False),
('4', '5', 80, True),
('4', '15', 100, True),
('4', '6', 105, True),
('5', '14', 85, True),
('6', '7', 120, True),
('6', '9', 100, False),
('7', '8', 20, True),
('8', '1', 155, True),
('8', '10', 30, True),
('9', '10', 50, True),
('10', '7', 10, True),
('9', '11', 70, True),
('11', '8', 50, True),
('9', '12', 80, True),
('12', '13', 90, True),
('13', '6', 60, True),
('13', '4', 95, True),
('14', '15', 90, True),
('15', '16', 90, True),
('16', '13', 100, True),
('16', '19', 90, True),
('17', '5', 45, True),
('17', '18', 140, True),
('18', '14', 85, True),
('19', '12', 100, True),
('19', '20', 90, True),
('20', '21', 120, True),
('21', '22', 140, True),
('22', '23', 60, True),
('23', '11', 40, True),
('22', '24', 50, True),
('23', '24', 50, True),
('24', '20', 100, True),
('20', '25', 85, True),
('25', '26', 90, True),
('26', '19', 80, True),
('26', '27', 90, True),
('27', '16', 90, True),
('27', '28', 90, True),
('15', '28', 100, True),
('28', '29', 130, True),
('29', '30', 110, False),
('30', '27', 130, True),
('30', '31', 85, False),
('31', '26', 135, True),
('31', '32', 90, False),
('25', '32', 135, True),
('32', '33', 120, False),
('33', '34', 135, True),
('34', '25', 120, True),
('34', '32', 80, True),
('28', '35', 80, True),
('14', '35', 100, True),
('35', '36', 125, True),
('36', '29', 90, True),
('35', '37', 85, True),
('37', '38', 125, True),
('38', '36', 75, False), # blz
]
}
nova_luz2 = {
"arestas": [
('1', '2', 75, False),
('2', '3', 90, False),
('3', '4', 110, False),
('4', '5', 130, True),
('5', '6', 90, True),
('5', '12', 90, True),
('6', '7', 80, True),
('6', '3', 130, True),
('7', '8', 85, True),
('7', '2', 125, True),
('8', '1', 125, True),
('9', '8', 100, True),
]
}
nova_luz3 = {
"arestas": [
('1', '2', 75, False),
('2', '3', 90, False),
('3', '4', 110, False),
('4', '5', 130, True),
('5', '6', 90, True),
('5', '12', 90, True),
('6', '7', 80, True),
('6', '3', 130, True),
('7', '8', 85, True),
('7', '2', 125, True),
('8', '1', 125, True),
('9', '8', 100, True),
('9', '10', 85, True),
('10', '11', 90, True),
('10', '7', 100, True),
('11', '6', 100, True),
('11', '12', 90, True),
('12', '13', 100, True),
('13', '14', 95, True),
('14', '11', 100, True),
]
}
data = {
1: {
"vertices": ['A', 'B', 'C', 'D', 'E'],
"arestas": [
('A', 'D', 1, True), ('B', 'A', 5, True), ('B', 'C', 3, True), ('C', 'D', 8, True), ('D', 'B', 2, True),
('D', 'A', 3, True) , ('B', 'E', 2, True), ('E', 'C', 4, True)
],
"descricao": "grafo 100% Direcionado"
},
2: {
"vertices": ['A', 'B', 'C', 'D', 'E'],
"arestas": [
('A', 'D', 1, False), ('B', 'A', 5, False), ('B', 'C', 3, False), ('C', 'D', 8, False), ('D', 'B', 2, False),
('D', 'A', 3, False), ('B', 'E', 2, False), ('E', 'C', 4, False)
],
"descricao": "grafo 100% não Direcionado"
},
3: {
"vertices": ['A', 'B', 'C', 'D'],
"arestas": [
('A', 'B', 3, True), ('A', 'D', 4, False), ('B', 'A', 1, True), ('B', 'C', 2, False), ('D', 'C', 2, True)
],
"descricao": "grafo misto simples"
},
4: {
"vertices": ['A', 'B', 'C', 'D', 'E', 'F', 'G'],
"arestas": [
('A', 'C', 7, True), ('B', 'A', 6, True), ('B', 'G', 5, False), ('C', 'B', 6, False), ('C', 'D', 5, False),('D', 'E', 5, True),
('E', 'B', 4, True), ('E', 'F', 5, False), ('F', 'G', 20, False)
],
"descricao": "grafo misto mais complexo"
},
5: {
"vertices": ['A', 'B', 'C', 'D'],
"arestas": [
('A', 'B', 1, True), ('B', 'C', 5, True), ('C', 'D', 3, True), ('C', 'A', 3, True), ('D', 'A', 8, True)
],
"descricao": "grafo 100% Direcionado"
},
}