This repository was archived by the owner on Jan 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdata.py
180 lines (178 loc) · 13.2 KB
/
data.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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
'''
----- trackData -----
Data for all tracks.
Column index:
0. Wing Base Setup
1. Engine Base Setup
2. Brakes Base Setup
3. Gearbox Base Setup
4. Suspension Base Setup
5. Wing Split Base Factor
6. Base Fuel Use - Dry (L/Km)
7. Base Fuel Use - Wet (L/Km)
8. Track Total Distance (Km)
9. Tyre Wear Factor
10. Pit In/Out Time (s)
11. Track Lap Corners
12. Track Laps
13. Lap Length (Km)
'''
trackData = {
"A1-Ring": [249.22, 714.42, 676.29, 789.1, 511.89, 141.46, 0.875, 0.7829, 307.1, 0.89211, 21, 9, 71, 4.33],
"Adelaide": [631.9, 496.9, 358.33, 549.99, 652.05, 79.46, 0.807, 0.6774, 298.6, 0.94557, 19.5, 12, 79, 3.78],
"Ahvenisto": [993.04, 466.54, 699.74, 766.1, 240.15, 228.29, 0.8455, 0.796, 243.2, 0.9336, 11.5, 10, 80, 3.04],
"Anderstorp": [250.72, 699.88, 769.29, 611.18, 107.05, 75.32, 0.9042, 0.785, 281.8, 0.971, 13.5, 10, 70, 4.03],
"Austin": [521.56, 605.59, 608.9, 640.62, 786.9, 173.6, 0.8617, 0.752, 308.9, 1.00374, 17.5, 20, 56, 5.52],
"Avus": [302.56, 636.26, 412.4, 387.41, 821.34, 103.25, 0.90563, 0, 312.3, 1.18641, 13, 4, 64, 4.88],
"Baku City": [362.08, 615.56, 611.02, 706, 716.97, 96.71, 0.89345, 0, 306.3, 1.00055, 17, 20, 51, 6.01],
"Barcelona": [457.87, 673.95, 503.46, 676.11, 315.93, 140.56, 0.874, 0, 307.3, 1.0933, 21, 16, 65, 4.73],
"Brands Hatch": [475.32, 647.54, 386.69, 709.4, 641.47, 121.1, 0.8305, 0.6357, 315.5, 1.04047, 25.5, 12, 75, 4.21],
"Brasilia": [577.88, 409.23, 697.76, 849.61, 784.06, 46.69, 0.8911, 0.6221, 301.1, 1.04035, 13.5, 12, 55, 5.48],
"Bremgarten": [713.7, 594.03, 589.41, 697.91, 539.29, 138.55, 0.858, 0, 305.8, 1.0813, 17, 16, 42, 7.28],
"Brno": [489.73, 515.49, 378.53, 555.53, 490.25, 73.58, 0.8324, 0.7015, 308, 0.98793, 14, 15, 57, 5.40],
"Bucharest Ring": [269.73, 654.11, 711.39, 593.83, 744.57, 77.48, 0.9118, 0.7706, 245.7, 0.9947, 24, 14, 80, 3.07],
"Buenos Aires": [901.29, 516.57, 272.05, 654.41, 706.34, 190.08, 0.7853, 0.572, 306.6, 0.9795, 19.5, 16, 72, 4.26],
"Estoril": [438.52, 652.28, 302.24, 705, 575.42, 79.46, 0.8379, 0.7148, 305.2, 1.05901, 22.5, 13, 70, 4.36],
"Fiorano": [449.29, 619.66, 301.15, 374.52, 895.1, 99.31, 0.9327, 0.872, 238.6, 0.95633, 16.5, 14, 79, 3.02],
"Fuji": [271.38, 590.54, 633.87, 689.16, 500.84, 117.72, 0.8491, 0.6228, 305.4, 0.976, 18.5, 16, 67, 4.56],
"Grobnik": [646.19, 384.37, 524.55, 768.66, 500.29, 128.82, 0.8224, 0, 308.4, 1.03798, 13, 15, 74, 4.17],
"Hockenheim": [444.92, 647.63, 329.61, 789.21, 291.96, -98.2, 0.8693, 0.899, 306.4, 0.96074, 16.5, 12, 67, 4.57],
"Hungaroring": [853.49, 439.1, 571.56, 434.45, 416.73, 62.53, 0.7657, 0.649, 305.5, 1.06388, 16.5, 14, 77, 3.97],
"Imola": [459.77, 599.72, 672.31, 615.44, 455.84, 19.18, 0.8557, 0.6079, 305.6, 1.0555, 12, 16, 62, 4.93],
"Indianapolis": [207.55, 706.52, 465.52, 648.5, 518.59, -35, 0.893, 0, 306.6, 1.01319, 25.5, 13, 73, 4.20],
"Indianapolis Oval": [-58.62, 730.49, 21.69, 901.36, 304.75, 67.6, 0.9042, 0.749, 321.8, 0.9953, 45, 4, 80, 4.02],
"Interlagos": [460.91, 578.03, 555.34, 568.26, 318.88, -26.27, 0.8492, 0.6853, 305.9, 1.04207, 18, 14, 71, 4.31],
"Irungattukottai": [680.12, 470.29, 626.79, 620.22, 536.55, 13.95, 0.8412, 0, 293.6, 0.97159, 14, 12, 79, 3.72],
"Istanbul": [387.85, 544.46, 700.97, 543.97, 636.53, 118.92, 0.856, 0.694, 309.4, 1.11647, 16, 14, 58, 5.33],
"Jerez": [717.6, 608.07, 626.86, 701.3, 321.26, 143.33, 0.889, 0.6178, 306.4, 0.9, 18, 14, 69, 4.44],
"Jyllands-Ringen": [769.66, 414.13, 556.76, 743.56, 524.72, 106.93, 0.826, 0, 184, 0.98582, 19.5, 20, 136, 2.30],
"Kaunas": [387.37, 635.17, 515.42, 685, 362.96, 91.1, 0.8461, 0.7649, 264.1, 1.0395, 11, 10, 80, 3.30],
"Kyalami": [777.15, 534.3, 557.47, 528.95, 749.84, 206.85, 0.8016, 0, 306.8, 1.02227, 15, 14, 72, 4.26],
"Laguna Seca": [481.06, 401.03, 585.51, 619.45, 50.81, 54.38, 0.902, 0.751, 284.5, 1.015, 16.7, 11, 79, 3.60],
"Magny Cours": [453.62, 564.81, 294.88, 588.24, 560.43, 147.77, 0.865, 0, 305.8, 0.94099, 18, 14, 72, 4.25],
"Melbourne": [403.36, 619, 614.44, 757.14, 294.52, 8.04, 0.8553, 0, 307.6, 0.97952, 16.5, 17, 58, 5.30],
"Mexico City": [632.08, 700.96, 470.54, 671.13, 323.13, 48.62, 0.8353, 0.6893, 305, 0.99074, 24, 9, 69, 4.42],
"Monte Carlo": [1024.73, 373.43, 471.04, 374.23, 494.38, 100.89, 0.8141, 0.621, 262.8, 1.05986, 18, 19, 78, 3.37],
"Montreal": [335.19, 677.82, 566.84, 718.1, 237.85, -98.13, 0.8553, 0.7349, 305, 1.0831, 16.5, 12, 69, 4.42],
"Monza": [124.19, 735.83, 496, 868.17, 610.97, 24.64, 0.913, 0, 306.7, 1.0733, 25.5, 13, 53, 5.79],
"Mugello": [517.88, 805.54, 879.84, 901.34, 590.54, -69.4, 0.8474, 0.6958, 304.3, 1.0235, 13.5, 14, 58, 5.25],
"New Delhi": [649.99, 556.92, 556.38, 720.3, 150.9, -97.64, 0.8363, 0.768, 308.2, 1.03303, 19, 16, 60, 5.14],
"Nurburgring": [650.81, 451.94, 626.71, 598, 149.86, 244.17, 0.799, 0, 308.7, 1.0645, 15, 16, 60, 5.15],
"Oesterreichring": [442.09, 675.58, 496.59, 729.98, 508.34, 85.42, 0.8686, 0.6529, 308.9, 1.08664, 21, 11, 52, 5.94],
"Paul Ricard": [362.79, 732.67, 301.68, 784.37, 575.27, 182.33, 0.8965, 0.771, 305, 1.09121, 19.5, 11, 79, 3.86],
"Portimao": [784.36, 392.27, 486.5, 490, 295.42, 180.52, 0.8361, 0.7061, 309.7, 1.0578, 15.5, 18, 66, 4.69],
"Poznan": [742, 546.02, 379.02, 718.46, 529.96, 182.04, 0.8239, 0, 306.2, 1.08634, 14, 14, 75, 4.08],
"Rafaela Oval": [86.6, 645.37, 144.79, 781.23, 354.81, 67.6, 0.9058, 0.7695, 317.3, 1.06418, 10, 8, 67, 4.74],
"Sakhir": [126.91, 406.55, 716.34, 609.56, 240.96, -21.44, 0.912, 0.7124, 308.5, 1.10363, 25.5, 14, 57, 5.41],
"Sepang": [554, 590.12, 653.69, 746.34, 466.41, 24.6, 0.8422, 0.6161, 310.4, 0.9926, 24, 17, 55, 5.64],
"Serres": [927.25, 414.83, 503.01, 477.94, 522.69, 177, 0.8633, 0, 254.9, 0.92879, 12, 16, 80, 3.19],
"Shanghai": [416.43, 529.77, 641.35, 354.61, 114.21, 114.9, 0.9052, 0.6744, 305.2, 1.05878, 24, 10, 56, 5.45],
"Silverstone": [283.41, 699.48, 590.85, 823.25, 415.1, 18.87, 0.8693, 0.681, 308.3, 1.1123, 22.5, 14, 60, 5.14],
"Singapore": [865.61, 438.19, 578.15, 598.96, 801.2, 202.04, 0.854, 0.5521, 309.1, 1.04688, 17, 23, 61, 5.07],
"Slovakiaring": [735.82, 439.66, 609.73, 491.45, 431.92, 184.08, 0.9069, 0.79, 313.9, 1.0652, 19.5, 14, 53, 5.92],
"Sochi": [675.39, 588.26, 587.66, 696.24, 456.11, 137.97, 0.8404, 0, 310.1, 1.04166, 23, 19, 53, 5.85],
"Spa": [585.64, 716.49, 446.82, 609.47, 372.54, 50.4, 0.8835, 0.4519, 306.6, 1.04803, 13.5, 22, 44, 6.97],
"Suzuka": [413.56, 639.98, 515.88, 550.25, 531.13, 47.12, 0.857, 0.5508, 310.6, 1.0326, 15, 14, 53, 5.86],
"Valencia": [837.83, 445.95, 657.26, 652.58, 335.82, 209.76, 0.8459, 0.56, 310.1, 0.95518, 14.5, 25, 57, 5.44],
"Yas Marina": [730.05, 459.7, 557.69, 476.1, 419.98, 175.25, 0.8117, 0.7014, 305.5, 0.95151, 18.5, 21, 55, 5.56],
"Yeongam": [781.67, 480.86, 719.53, 689.5, 420.63, 207.41, 0.8365, 0.7399, 309.2, 1.0452, 23.5, 18, 55, 5.62],
"Zandvoort": [551.15, 653.24, 415.91, 779.13, 709.95, 5.57, 0.8402, 0.583, 301.8, 1.01818, 22.5, 14, 71, 4.25],
"Zolder": [669.24, 616.83, 466.06, 628.62, 539.48, 193.3, 0.8286, 0.6365, 298.3, 0.99094, 19.5, 17, 70, 4.26]
}
'''
----- wearData -----
Part wear data for all tracks.
Column index:
0. Chassis wear factor
1. Engine wear factor
2. Front Wing wear factor
3. Rear Wing wear factor
4. Underbody wear factor
5. Sidepods wear factor
6. Cooling wear factor
7. Gearbox wear factor
8. Brakes wear factor
9. Suspension wear factor
10. Electronics wear factor
'''
wearData = {
"A1-Ring": [28.36, 50.05, 20.16, 21.20, 20.95, 24.11, 18.28, 35.53, 41.42, 26.86, 21.23],
"Adelaide": [37.70, 19.20, 39.87, 46.94, 42.56, 25.70, 30.00, 29.09, 23.68, 14.93, 21.45],
"Ahvenisto": [19.01, 24.24, 26.23, 25.40, 21.43, 19.07, 15.14, 23.54, 30.80, 21.99, 11.30],
"Anderstorp": [24.06, 49.52, 19.01, 17.68, 41.68, 26.54, 14.50, 40.33, 51.84, 20.75, 12.06],
"Austin": [17.44, 36.61, 28.31, 28.37, 19.71, 18.62, 19.18, 29.87, 35.69, 15.27, 15.17],
"Avus": [29.64, 82.95, 16.89, 18.29, 35.86, 17.70, 19.19, 26.28, 23.16, 58.77, 21.23],
"Baku City": [20.60, 57.51, 19.98, 21.81, 18.45, 23.86, 17.28, 26.63, 46.20, 18.92, 14.28],
"Barcelona": [26.34, 56.33, 42.82, 50.24, 32.36, 23.23, 22.65, 34.65, 51.35, 40.25, 19.98],
"Brands Hatch": [11.23, 31.31, 19.87, 24.59, 27.84, 15.26, 12.63, 21.21, 38.03, 38.17, 19.27],
"Brasilia": [19.54, 38.86, 25.23, 30.88, 20.55, 18.98, 21.96, 32.39, 44.36, 20.66, 17.34],
"Bremgarten": [38.56, 21.32, 19.58, 18.67, 43.39, 31.77, 13.82, 35.36, 30.61, 42.35, 11.94],
"Brno": [26.35, 44.57, 28.76, 23.72, 28.54, 27.06, 25.52, 31.26, 35.52, 28.32, 20.39],
"Bucharest Ring": [27.74, 60.35, 27.63, 30.11, 36.69, 25.61, 21.08, 43.33, 54.42, 31.36, 25.19],
"Buenos Aires": [30.50, 53.57, 23.70, 29.80, 21.51, 18.41, 25.46, 56.63, 71.40, 50.26, 20.26],
"Estoril": [22.18, 50.82, 29.57, 24.94, 28.03, 19.58, 14.88, 37.58, 43.71, 33.96, 13.84],
"Fiorano": [28.04, 44.72, 28.03, 31.01, 23.74, 19.57, 22.70, 36.52, 46.85, 32.30, 22.81],
"Fuji": [31.62, 36.67, 20.21, 23.61, 23.73, 22.88, 31.20, 27.72, 52.08, 21.95, 20.20],
"Grobnik": [30.62, 32.49, 21.91, 20.54, 22.98, 29.01, 26.17, 36.01, 20.85, 41.46, 17.98],
"Hockenheim": [29.56, 61.45, 21.08, 23.00, 23.91, 19.98, 20.60, 36.73, 50.18, 26.15, 17.55],
"Hungaroring": [25.36, 35.67, 76.04, 69.27, 35.48, 18.68, 15.21, 48.39, 31.48, 52.33, 12.68],
"Imola": [23.24, 40.44, 39.13, 42.27, 32.05, 18.02, 20.62, 38.27, 47.41, 38.54, 19.74],
"Indianapolis": [46.17, 59.60, 27.55, 33.99, 40.73, 37.43, 18.05, 46.73, 53.59, 52.02, 15.32],
"Indianapolis Oval": [28.95, 104.06, 17.52, 20.81, 34.49, 22.38, 26.35, 16.67, 11.85, 31.39, 18.81],
"Interlagos": [39.75, 54.08, 31.63, 23.78, 45.93, 23.31, 21.24, 32.32, 57.65, 40.91, 19.77],
"Irungattukottai": [27.62, 49.49, 43.48, 41.08, 36.10, 32.41, 35.08, 44.11, 52.30, 34.09, 20.33],
"Istanbul": [27.30, 29.74, 17.29, 19.40, 20.07, 20.84, 26.82, 21.30, 44.76, 19.76, 17.08],
"Jerez": [36.69, 57.14, 38.05, 41.69, 34.46, 29.92, 20.89, 32.79, 50.80, 47.78, 23.66],
"Jyllands-Ringen": [13.52, 21.75, 28.74, 27.26, 12.18, 10.82, 9.40, 23.12, 33.00, 14.91, 13.35],
"Kaunas": [24.49, 41.33, 29.17, 25.86, 30.55, 20.88, 14.69, 21.75, 13.33, 44.14, 13.05],
"Kyalami": [23.08, 33.00, 35.70, 39.81, 20.62, 18.51, 32.57, 46.16, 28.46, 24.41, 21.71],
"Laguna Seca": [30.15, 37.57, 26.36, 17.55, 17.19, 15.80, 24.43, 39.46, 43.06, 34.92, 9.33],
"Magny Cours": [23.46, 42.80, 29.12, 25.74, 27.43, 20.76, 21.25, 34.84, 48.36, 37.87, 13.49],
"Melbourne": [23.02, 47.60, 27.28, 29.87, 22.38, 21.97, 20.66, 32.35, 39.02, 22.36, 18.01],
"Mexico City": [12.71, 24.40, 16.46, 14.55, 20.39, 14.08, 19.80, 31.90, 13.54, 38.08, 17.14],
"Monte Carlo": [15.54, 18.39, 56.17, 56.54, 29.15, 10.91, 15.67, 30.24, 49.78, 39.45, 13.51],
"Montreal": [27.57, 48.18, 28.37, 18.38, 26.64, 19.91, 14.69, 38.86, 51.21, 45.24, 14.35],
"Monza": [28.95, 55.71, 19.44, 14.83, 26.67, 23.47, 18.02, 42.24, 51.81, 28.46, 19.82],
"Mugello": [22.47, 21.70, 26.50, 19.14, 27.38, 30.36, 32.44, 36.71, 33.22, 28.03, 17.90],
"New Delhi": [26.94, 45.64, 37.83, 32.68, 24.35, 16.21, 20.76, 33.69, 45.60, 41.58, 13.05],
"Nurburgring": [31.20, 46.89, 26.37, 34.61, 29.26, 16.35, 16.63, 31.12, 50.16, 46.50, 11.74],
"Oesterreichring": [22.07, 49.05, 28.26, 32.38, 23.71, 20.46, 23.16, 27.15, 39.24, 22.56, 13.55],
"Paul Ricard": [29.27, 59.92, 28.35, 36.55, 32.32, 16.35, 19.74, 30.91, 50.35, 25.54, 12.80],
"Portimao": [24.21, 21.99, 24.17, 26.23, 45.30, 22.01, 21.43, 23.00, 33.10, 48.73, 18.42],
"Poznan": [29.64, 41.17, 34.02, 40.39, 36.14, 29.96, 25.52, 31.24, 33.66, 26.08, 21.88],
"Rafaela Oval": [25.05, 92.29, 14.66, 17.15, 30.10, 17.85, 23.09, 26.84, 25.52, 35.83, 17.32],
"Sakhir": [27.17, 59.89, 33.04, 25.88, 26.28, 30.85, 36.21, 30.80, 36.12, 35.28, 17.69],
"Sepang": [25.28, 44.99, 32.81, 26.30, 32.94, 18.28, 31.83, 36.60, 43.17, 26.01, 18.79],
"Serres": [24.93, 30.63, 25.18, 27.54, 24.22, 20.05, 23.07, 34.23, 28.93, 29.66, 20.60],
"Shanghai": [20.68, 57.90, 34.12, 39.61, 35.05, 28.21, 26.74, 38.84, 43.94, 48.88, 18.48],
"Silverstone": [25.02, 53.24, 22.38, 26.88, 28.29, 17.12, 16.41, 37.58, 27.51, 22.26, 12.32],
"Singapore": [29.44, 22.24, 34.67, 30.37, 34.04, 23.70, 29.27, 29.46, 45.58, 26.95, 25.68],
"Slovakiaring": [21.45, 46.63, 25.38, 28.82, 37.89, 18.70, 16.21, 45.57, 31.48, 39.40, 15.19],
"Sochi": [20.78, 44.42, 26.86, 25.93, 24.36, 15.80, 19.08, 30.56, 41.04, 21.77, 16.77],
"Spa": [28.52, 48.91, 28.05, 32.09, 31.56, 21.31, 18.47, 38.36, 43.34, 46.58, 17.77],
"Suzuka": [17.35, 33.58, 22.04, 28.97, 23.44, 15.56, 14.46, 37.84, 29.29, 31.75, 15.14],
"Valencia": [26.29, 26.26, 45.89, 45.89, 21.53, 31.13, 16.20, 26.08, 31.92, 36.84, 21.26],
"Yas Marina": [22.65, 15.01, 34.76, 39.49, 28.35, 21.12, 28.91, 35.28, 41.03, 30.03, 20.79],
"Yeongam": [28.45, 43.18, 30.23, 33.70, 20.65, 22.44, 23.28, 25.36, 33.09, 27.45, 19.01],
"Zandvoort": [39.47, 63.41, 48.26, 38.22, 33.24, 28.26, 26.17, 36.99, 69.52, 54.04, 22.42],
"Zolder": [17.44, 19.86, 25.24, 22.78, 20.51, 22.81, 21.45, 40.97, 29.02, 31.95, 18.46]
}
'''
----- profileFactors -----
The following are values used to calculate car character profile.
The first index is the car part, using the part name as the key.
The second index is Power, Handling, and Acceleration respectively.
'''
profileFactors = {
"Chassis": [0.8, 1.8, 1.4],
"Engine": [5.8, 0.6, 2.1],
"Front Wing": [0.25, 2.45, 1.2],
"Rear Wing": [0.25, 2.45, 1.2],
"Underbody": [0.2, 1.2, 0.5],
"Sidepods": [0.3, 0.7, 0],
"Cooling": [1.2, 0, 0.2],
"Gearbox": [3.2, 0.7, 4.1],
"Brakes": [0, 2, 0],
"Suspension": [0, 1.6, 1.2],
"Electronics": [1.4, 0, 1.4],
}