-
Notifications
You must be signed in to change notification settings - Fork 1
/
data_model.py
33 lines (30 loc) · 1.08 KB
/
data_model.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
class DataModel():
def customer_data_model():
customer = [
('Richa',55),
('Calvin',50),
('Yono',50),
('Tutik',55),
('Febri',70),
('Zahwa',45),
('Cipto',60),
('Eko',60),
('Khamimah',40),
('Mamik',35),
]
return customer
def create_distance_data_model():
distance_matrix = [
[0,8.3,10.2,6.5,6.6,7.1,7.7,5.8,6.0,5.7,8.1],
[8.3,0,6.8,7.2,5.9,8.8,9.0,4.4,7.9,9.1,5.5],
[10.2,6.8,0,7.8,6.1,3.2,8.0,5.1,10.0,7.3,4.5],
[6.5,7.2,7.8,0,5.6,4.7,6.7,7.0,6.9,6.8,9.9],
[6.6,5.9,6.1,5.6,0,8.9,6.2,0.3,8.2,3.8,5.3],
[7.1,8.8,3.2,4.7,8.9,0,7.5,4.8,3.9,4.1,6.4],
[7.7,9.0,8.0,6.7,6.2,7.5,0,5.4,6.5,9.5,7.4],
[5.8,4.4,5.1,7.0,10.3,4.8,5.4,0,6.3,4.6,8.5],
[6.0,7.9,10.0,6.9,8.2,3.9,6.5,6.3,0,8.4,11.0],
[5.7,9.1,7.3,6.8,3.8,4.1,9.5,4.6,8.4,0,7.6],
[8.1,5.5,4.5,9.9,5.3,6.4,7.4,8.5,11.0,7.6,0],
]
return distance_matrix