pavement_condition_index 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +100 -0
- data/Rakefile +7 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/pavement_condition_index/cdv_iteration.rb +30 -0
- data/lib/pavement_condition_index/core_ext/numeric.rb +5 -0
- data/lib/pavement_condition_index/distress_group.rb +37 -0
- data/lib/pavement_condition_index/lookups/calculated_corrected_deduct_coefficients.rb +50 -0
- data/lib/pavement_condition_index/lookups/calculated_deduct_coefficients.rb +568 -0
- data/lib/pavement_condition_index/lookups/corrected_deduct_values.rb +23 -0
- data/lib/pavement_condition_index/lookups/deduct_values.rb +27 -0
- data/lib/pavement_condition_index/lookups/observed_corrected_deduct_values.rb +65 -0
- data/lib/pavement_condition_index/lookups/observed_deduct_values.rb +446 -0
- data/lib/pavement_condition_index/pci.rb +42 -0
- data/lib/pavement_condition_index/sample_unit_condition_survey/asphalt_survey.rb +15 -0
- data/lib/pavement_condition_index/sample_unit_condition_survey/base_survey.rb +71 -0
- data/lib/pavement_condition_index/sample_unit_condition_survey/concrete_survey.rb +15 -0
- data/lib/pavement_condition_index/section_condition_survey.rb +51 -0
- data/lib/pavement_condition_index/version.rb +3 -0
- data/lib/pavement_condition_index.rb +23 -0
- data/lib/tasks/regression.rake +121 -0
- data/pavement_condition_index.gemspec +24 -0
- metadata +114 -0
@@ -0,0 +1,446 @@
|
|
1
|
+
module PavementConditionIndex
|
2
|
+
module Lookups
|
3
|
+
class ObservedDeductValues
|
4
|
+
|
5
|
+
LOG_X_VALUES = [0.1, 0.2, 0.4, 1.0, 2.0, 4.0, 10.0, 20.0, 40.0, 100.0]
|
6
|
+
X_VALUES = [0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0]
|
7
|
+
|
8
|
+
OBSERVED_VALUES = {
|
9
|
+
asphalt: {
|
10
|
+
alligator_cracking: {
|
11
|
+
valid_min: 0.1,
|
12
|
+
valid_max: 100.0,
|
13
|
+
chart_type: :log,
|
14
|
+
x_values: LOG_X_VALUES,
|
15
|
+
expected_y_values: {
|
16
|
+
low: [ 3.7, 4.0, 4.9, 10.7, 16.9, 23.7, 32.8, 40.0, 48.7, 61.7],
|
17
|
+
medium: [6.3, 9.9, 13.8, 21.3, 27.9, 35.3, 45.8, 54.8, 64.3, 77.4],
|
18
|
+
high: [11.9, 15.6, 20.1, 30.0, 39.9, 49.8, 61.1, 70.0, 78.9, 91.1]
|
19
|
+
}
|
20
|
+
},
|
21
|
+
bleeding: {
|
22
|
+
valid_min: 0.1,
|
23
|
+
valid_max: 100.0,
|
24
|
+
chart_type: :log,
|
25
|
+
x_values: LOG_X_VALUES,
|
26
|
+
expected_y_values: {
|
27
|
+
low: [0.6, 0.1, 0.1, 0.7, 0.6, 1.4, 3.4, 6.5, 10.9, 20.6],
|
28
|
+
medium: [0.6, 1.2, 1.6, 3.3, 5.3, 7.7, 13.2, 18.9, 25.9, 40.4],
|
29
|
+
high: [2.4, 3.0, 3.8, 5.9, 8.6, 13.7, 22.3, 34.1, 49.1, 73.0]
|
30
|
+
}
|
31
|
+
},
|
32
|
+
block_cracking: {
|
33
|
+
valid_min: 0.1,
|
34
|
+
valid_max: 100.0,
|
35
|
+
chart_type: :log,
|
36
|
+
x_values: LOG_X_VALUES,
|
37
|
+
expected_y_values: {
|
38
|
+
low: [0.0, 0.0, 0.1, 0.2, 1.3, 3.7, 7.4, 12.2, 17.6, 27.2],
|
39
|
+
medium: [0.0, 0.0, 0.1, 2.2, 5.4, 9.1, 15.0, 21.9, 30.2, 42.6],
|
40
|
+
high: [0.0, 1.3, 2.7, 6.3, 11.7, 17.4, 28.0, 40.2, 53.7, 71.5]
|
41
|
+
}
|
42
|
+
},
|
43
|
+
bumps_and_sags: {
|
44
|
+
valid_min: 0.1,
|
45
|
+
valid_max: 10.0,
|
46
|
+
chart_type: :log,
|
47
|
+
x_values: [0.1, 0.2, 0.4, 1.0, 2.0, 4.0, 10.0],
|
48
|
+
expected_y_values: {
|
49
|
+
low: [1.5, 2.4, 3.5, 8.0, 13.0, 20.4, 39.1],
|
50
|
+
medium: [6.5, 10.7, 16.1, 24.8, 34.4, 46.3, 78.1],
|
51
|
+
high: [20.6, 30.0, 40.1, 53.7, 65.6, 77.6, 98.9]
|
52
|
+
}
|
53
|
+
},
|
54
|
+
corrugation: {
|
55
|
+
valid_min: 0.1,
|
56
|
+
valid_max: 100.0,
|
57
|
+
chart_type: :log,
|
58
|
+
x_values: LOG_X_VALUES,
|
59
|
+
expected_y_values: {
|
60
|
+
low: [1.3, 1.1, 1.6, 2.8, 4.6, 7.4, 13.7, 20.6, 28.5, 40.0],
|
61
|
+
medium: [5.2, 6.7, 9.2, 15.0, 22.0, 28.7, 40.2, 49.3, 58.7, 73.9],
|
62
|
+
high: [10.0, 17.8, 25.3, 33.7, 40.4, 48.1, 61.1, 71.7, 82.0, 94.3]
|
63
|
+
}
|
64
|
+
},
|
65
|
+
depression: {
|
66
|
+
valid_min: 0.1,
|
67
|
+
valid_max: 100.0,
|
68
|
+
chart_type: :log,
|
69
|
+
x_values: LOG_X_VALUES,
|
70
|
+
expected_y_values: {
|
71
|
+
low: [3.7, 3.9, 4.0, 4.4, 5.4, 8.1, 16.7, 28.7, 38.9, 47.8],
|
72
|
+
medium: [7.6, 7.8, 7.9, 8.7, 10.9, 15.6, 28.7, 41.9, 53.0, 59.4],
|
73
|
+
high: [11.9, 13.1, 14.4, 16.9, 20.0, 27.0, 42.8, 55.7, 65.9, 74.3]
|
74
|
+
}
|
75
|
+
},
|
76
|
+
edge_cracking: {
|
77
|
+
valid_min: 0.1,
|
78
|
+
valid_max: 20.0,
|
79
|
+
chart_type: :log,
|
80
|
+
x_values: [0.1, 0.2, 0.4, 1.0, 2.0, 4.0, 10.0, 20.0],
|
81
|
+
expected_y_values: {
|
82
|
+
low: [ 0.0, 1.4, 2.1, 3.7, 4.9, 5.6, 11.0, 14.0],
|
83
|
+
medium: [4.3,4.9, 5.9, 9.1, 12.5, 17.0, 24.3, 28.5],
|
84
|
+
high: [7.2, 9.3, 11.0, 14.6, 20.5, 27.4, 40.6, 46.7]
|
85
|
+
}
|
86
|
+
},
|
87
|
+
joint_reflection_cracking: {
|
88
|
+
valid_min: 0.1,
|
89
|
+
valid_max: 30.0,
|
90
|
+
chart_type: :log,
|
91
|
+
x_values: [0.1, 0.2, 0.4, 1.0, 2.0, 4.0, 10.0, 20.0,30.0],
|
92
|
+
expected_y_values: {
|
93
|
+
low: [0.0, 1.0, 1.6, 3.0, 4.9, 8.7, 15.6, 22.6, 27.6],
|
94
|
+
medium: [1.3, 2.3, 4.2, 8.3, 12.7, 19.5, 33.5, 41.7, 43.7],
|
95
|
+
high: [2.4, 5.8, 10.3, 16.3, 23.4, 38.3, 62.6, 71.7, 73.9]
|
96
|
+
}
|
97
|
+
},
|
98
|
+
lane_shoulder_drop_off: {
|
99
|
+
valid_min: 0.5,
|
100
|
+
valid_max: 15.0,
|
101
|
+
chart_type: :log,
|
102
|
+
x_values: [0.5, 1.0, 2.0, 4.0, 10.0, 15.0],
|
103
|
+
expected_y_values: {
|
104
|
+
low: [1.6, 2.0, 3.4, 6.1, 11.7, 16.7],
|
105
|
+
medium: [3.6, 3.9, 5.5, 9.0, 18.2, 27.6],
|
106
|
+
high: [5.5, 6.5, 9.7, 16.1, 33.0, 43.9]
|
107
|
+
}
|
108
|
+
},
|
109
|
+
longitudinal_transverse_cracking: {
|
110
|
+
valid_min: 0.1,
|
111
|
+
valid_max: 30.0,
|
112
|
+
chart_type: :log,
|
113
|
+
x_values: [0.1, 0.2, 0.4, 1.0, 2.0, 4.0, 10.0, 20.0,30.0],
|
114
|
+
expected_y_values: {
|
115
|
+
low: [0.0, 0.0, 0.3, 2.0, 5.2, 9.3, 16.7, 23.9, 28.5],
|
116
|
+
medium: [0.0, 0.7, 3.3, 8.7, 14.1, 20.0, 30.4, 39.8, 44.4],
|
117
|
+
high: [3.9, 6.7, 10.9, 18.3, 27.0, 38.9, 60.9, 79.1, 86.9]
|
118
|
+
}
|
119
|
+
},
|
120
|
+
patching_and_utility_cut_patching: {
|
121
|
+
valid_min: 0.1,
|
122
|
+
valid_max: 50.0,
|
123
|
+
chart_type: :log,
|
124
|
+
x_values: [0.1, 0.2, 0.4, 1.0, 2.0, 4.0, 10.0, 20.0, 40.0, 50.0],
|
125
|
+
expected_y_values: {
|
126
|
+
low: [0.0, 0.3, 0.5, 2.0, 4.3, 7.9, 16.1, 23.3, 31.3, 33.0],
|
127
|
+
medium: [2.6, 3.8, 5.7, 9.4, 13.6, 19.6, 31.3, 42.0, 54.1, 57.6],
|
128
|
+
high: [6.3, 8.6, 12.9, 19.4, 25.3, 33.7, 51.9, 67.0, 77.6, 80.2]
|
129
|
+
}
|
130
|
+
},
|
131
|
+
polished_aggregate: {
|
132
|
+
valid_min: 0.1,
|
133
|
+
valid_max: 100.0,
|
134
|
+
chart_type: :log,
|
135
|
+
x_values: LOG_X_VALUES,
|
136
|
+
expected_y_values: {
|
137
|
+
low: [0.0, 0.0, 0.1, 0.2, 0.4, 1.1, 3.5, 6.5, 10.2, 20.6],
|
138
|
+
medium: [0.0, 0.0, 0.1, 0.2, 0.4, 1.1, 3.5, 6.5, 10.2, 20.6],
|
139
|
+
high: [0.0, 0.0, 0.1, 0.2, 0.4, 1.1, 3.5, 6.5, 10.2, 20.6]
|
140
|
+
}
|
141
|
+
},
|
142
|
+
potholes: {
|
143
|
+
valid_min: 0.01,
|
144
|
+
valid_max: 10.0,
|
145
|
+
chart_type: :log,
|
146
|
+
x_values: [0.01, 0.02, 0.04, 0.1, 0.2, 0.4, 1.0, 2.0, 4.0, 10.0],
|
147
|
+
expected_y_values: {
|
148
|
+
low: [1.8, 5.6, 10.9, 21.7, 31.6, 42.5, 58.3, 71.4, 84.0, 100.0],
|
149
|
+
medium: [6.0, 10.7, 18.9, 34.6, 49.7, 66.0, 91.7, 111.9, 132.5, 159.1],
|
150
|
+
high: [20.1, 27.6, 37.6, 55.4, 71.4, 87.7, 109.6, 125.6, 141.8, 162.6]
|
151
|
+
}
|
152
|
+
},
|
153
|
+
railroad_crossing: {
|
154
|
+
valid_min: 1.0,
|
155
|
+
valid_max: 40.0,
|
156
|
+
chart_type: :log,
|
157
|
+
x_values: [1.0, 2.0, 4.0, 10.0, 20.0, 40.0],
|
158
|
+
expected_y_values: {
|
159
|
+
low: [1.3, 1.9, 4.1, 11.1, 16.1, 18.9],
|
160
|
+
medium: [5.2, 11.9, 21.3, 37.6, 45.2, 49.4],
|
161
|
+
high: [19.3, 29.3, 43.3, 66.3, 75.9, 79.8]
|
162
|
+
}
|
163
|
+
},
|
164
|
+
raveling: {
|
165
|
+
valid_min: 0.1,
|
166
|
+
valid_max: 100.0,
|
167
|
+
chart_type: :log,
|
168
|
+
x_values: LOG_X_VALUES,
|
169
|
+
expected_y_values: {
|
170
|
+
low: [0.0, 0.8, 1.6, 2.4, 2.7, 3.3, 5.2, 7.3, 11.3, 16.3],
|
171
|
+
medium: [4.1, 5.6, 7.0, 8.7, 10.6, 12.7, 18.0, 25.0, 32.0, 44.1],
|
172
|
+
high: [6.3, 8.8, 11.6, 16.3, 20.3, 27.2, 40.6, 54.8, 65.4, 78.0]
|
173
|
+
}
|
174
|
+
},
|
175
|
+
rutting: {
|
176
|
+
valid_min: 0.1,
|
177
|
+
valid_max: 100.0,
|
178
|
+
chart_type: :log,
|
179
|
+
x_values: LOG_X_VALUES,
|
180
|
+
expected_y_values: {
|
181
|
+
low: [0.6, 0.8, 2.7, 7.2, 12.5, 18.5, 26.5, 34.8, 44.1, 49.6],
|
182
|
+
medium: [3.5, 6.4, 9.9, 17.2, 24.2, 31.8, 43.7, 54.1, 61.1, 67.6],
|
183
|
+
high: [5.4, 11.6, 17.9, 26.9, 35.1, 45.0, 61.1, 73.7, 83.1, 90.0]
|
184
|
+
}
|
185
|
+
},
|
186
|
+
shoving: {
|
187
|
+
valid_min: 0.1,
|
188
|
+
valid_max: 50.0,
|
189
|
+
chart_type: :log,
|
190
|
+
x_values: [0.1, 0.2, 0.4, 1.0, 2.0, 4.0, 10.0, 20.0, 40.0, 50.0],
|
191
|
+
expected_y_values: {
|
192
|
+
low: [0.4, 0.2, 0.5, 4.1, 8.1, 12.4, 20.2, 27.8, 34.8, 36.5],
|
193
|
+
medium: [3.1, 3.3, 4.2, 10.0, 15.0, 21.7, 34.8, 49.3, 61.7, 64.8],
|
194
|
+
high: [7.6, 9.8, 11.6, 18.9, 25.6, 33.9, 52.2, 66.5, 77.0, 80.0]
|
195
|
+
}
|
196
|
+
},
|
197
|
+
slippage_cracking: {
|
198
|
+
valid_min: 0.1,
|
199
|
+
valid_max: 100.0,
|
200
|
+
chart_type: :log,
|
201
|
+
x_values: LOG_X_VALUES,
|
202
|
+
expected_y_values: {
|
203
|
+
low: [0.0, 0.4, 1.3, 3.5, 8.1, 15.7, 26.7, 35.0, 42.8, 53.3],
|
204
|
+
medium: [1.5, 3.3, 5.5, 10.0, 17.0, 27.8, 43.5, 53.3, 60.9, 69.8],
|
205
|
+
high: [3.3, 6.7, 10.3, 18.3, 29.3, 45.0, 67.0, 78.0, 84.3, 90.7]
|
206
|
+
}
|
207
|
+
},
|
208
|
+
swell: {
|
209
|
+
valid_min: 1.0,
|
210
|
+
valid_max: 30.0,
|
211
|
+
chart_type: :log,
|
212
|
+
x_values: [1.0, 2.0, 4.0, 10.0, 20.0, 30.0],
|
213
|
+
expected_y_values: {
|
214
|
+
low: [1.5, 3.5, 6.5, 11.9, 15.9, 19.4],
|
215
|
+
medium: [10.9, 17.6, 23.9, 34.8, 43.7, 49.4],
|
216
|
+
high: [33.1, 36.9, 41.9, 53.3, 63.5, 69.6]
|
217
|
+
}
|
218
|
+
},
|
219
|
+
weathering: {
|
220
|
+
valid_min: 0.1,
|
221
|
+
valid_max: 100.0,
|
222
|
+
chart_type: :log,
|
223
|
+
x_values: LOG_X_VALUES,
|
224
|
+
expected_y_values: {
|
225
|
+
low: [0.0, 0.8, 1.6, 2.4, 2.7, 3.3, 5.2, 7.3, 11.3, 16.3],
|
226
|
+
medium: [4.1, 5.6, 7.0, 8.7, 10.6, 12.7, 18.0, 25.0, 32.0, 44.1],
|
227
|
+
high: [6.3, 8.8, 11.6, 16.3, 20.3, 27.2, 40.6, 54.8, 65.4, 78.0]
|
228
|
+
}
|
229
|
+
}
|
230
|
+
},
|
231
|
+
concrete: {
|
232
|
+
blow_ups: {
|
233
|
+
valid_min: 0.0,
|
234
|
+
valid_max: 100.0,
|
235
|
+
chart_type: :linear,
|
236
|
+
x_values: X_VALUES,
|
237
|
+
expected_y_values: {
|
238
|
+
low: [0.0, 8.1, 16.3, 23.5, 30.6, 34.6, 38.1, 40.4, 42.0, 43.3, 45.0],
|
239
|
+
medium: [1.7, 18.7, 34.3, 47.0, 57.8, 66.3, 72.6, 77.0, 80.2, 82.0, 83.3],
|
240
|
+
high: [16.3, 58.9, 71.5, 81.1, 87.8, 93.7, 99.8, 105.6, 110.7, 115.9, 120.2]
|
241
|
+
}
|
242
|
+
},
|
243
|
+
durability_cracking: {
|
244
|
+
valid_min: 0.0,
|
245
|
+
valid_max: 100.0,
|
246
|
+
chart_type: :linear,
|
247
|
+
x_values: X_VALUES,
|
248
|
+
expected_y_values: {
|
249
|
+
low: [0.0, 3.5, 7.0, 9.8, 12.8, 15.7, 18.1, 20.2, 21.5, 22.2, 22.2],
|
250
|
+
medium: [0.0, 9.8, 18.0, 24.4, 29.6, 33.9, 37.0, 38.9, 40.9, 42.4, 43.5],
|
251
|
+
high: [0.0, 23.0, 38.5, 48.5, 55.4, 60.0, 63.1, 65.6, 67.4, 68.9, 70.0]
|
252
|
+
}
|
253
|
+
},
|
254
|
+
corner_break: {
|
255
|
+
valid_min: 0.0,
|
256
|
+
valid_max: 100.0,
|
257
|
+
chart_type: :linear,
|
258
|
+
x_values: X_VALUES,
|
259
|
+
expected_y_values: {
|
260
|
+
low: [0.0, 8.7, 17.0, 24.8, 31.5, 36.9, 41.7, 45.2, 47.4, 49.3, 50.6],
|
261
|
+
medium: [0.0, 15.6, 28.5, 38.9, 46.7, 52.8, 56.3, 58.9, 60.7, 62.4, 64.1],
|
262
|
+
high: [0.0, 24.6, 40.9, 52.2, 60.2, 67.0, 71.9, 75.2, 76.7, 78.5, 79.4]
|
263
|
+
}
|
264
|
+
},
|
265
|
+
faulting: {
|
266
|
+
valid_min: 0.0,
|
267
|
+
valid_max: 100.0,
|
268
|
+
chart_type: :linear,
|
269
|
+
x_values: X_VALUES,
|
270
|
+
expected_y_values: {
|
271
|
+
low: [0.0, 2.0, 6.9, 13.3, 18.9, 21.5, 24.1, 25.9, 27.4, 28.9, 30.0],
|
272
|
+
medium: [0.0, 8.0, 15.7, 23.7, 32.2, 39.4, 44.8, 48.5, 50.9, 52.8, 53.9],
|
273
|
+
high: [0.0, 15.6, 29.3, 40.4, 50.7, 60.4, 68.1, 73.9, 78.1, 81.3, 83.1]
|
274
|
+
}
|
275
|
+
},
|
276
|
+
divided_slab: {
|
277
|
+
valid_min: 0.0,
|
278
|
+
valid_max: 100.0,
|
279
|
+
chart_type: :linear,
|
280
|
+
x_values: [0.0, 10.0, 15.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0],
|
281
|
+
expected_y_values: {
|
282
|
+
low: [0.0, 9.6, 15.0, 18.9, 27.2, 33.9, 38.9, 43.3, 46.5, 48.3, 49.8, 50.2],
|
283
|
+
medium: [0.0, 24.0, 33.5, 36.4, 43.7, 50.7, 56.9, 62.0, 66.5, 70.0, 73.0, 75.4],
|
284
|
+
high: [0.0, 31.7, 43.0, 50.4, 61.7, 68.7, 74.6, 79.1, 82.8, 86.1, 89.1, 92.2]
|
285
|
+
}
|
286
|
+
},
|
287
|
+
joint_seal_damage: {
|
288
|
+
valid_min: 0.0,
|
289
|
+
valid_max: 100.0,
|
290
|
+
chart_type: :linear,
|
291
|
+
x_values: X_VALUES,
|
292
|
+
expected_y_values: {
|
293
|
+
low: [2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0],
|
294
|
+
medium: [4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0],
|
295
|
+
high: [8.0, 8.0, 8.0, 8.0, 8.0, 8.0, 8.0, 8.0, 8.0, 8.0, 8.0]
|
296
|
+
}
|
297
|
+
},
|
298
|
+
lane_shoulder_drop_off: {
|
299
|
+
valid_min: 0.0,
|
300
|
+
valid_max: 100.0,
|
301
|
+
chart_type: :linear,
|
302
|
+
x_values: X_VALUES,
|
303
|
+
expected_y_values: {
|
304
|
+
low: [0.0, 1.1, 2.0, 2.6, 3.3, 3.9, 4.4, 5.0, 5.4, 5.2, 5.2],
|
305
|
+
medium: [0.0, 5.2, 9.1, 11.9, 14.1, 15.4, 16.7, 17.6, 18.3, 18.9, 19.1],
|
306
|
+
high: [0.0, 8.3, 14.8, 19.4, 23.3, 25.4, 27.6, 29.3, 30.2, 31.5, 32.2]
|
307
|
+
}
|
308
|
+
},
|
309
|
+
patching_small: {
|
310
|
+
valid_min: 0.0,
|
311
|
+
valid_max: 100.0,
|
312
|
+
chart_type: :linear,
|
313
|
+
x_values: X_VALUES,
|
314
|
+
expected_y_values: {
|
315
|
+
low: [0.0, 0.0, 0.9, 2.0, 3.0, 3.5, 3.7, 4.1, 4.3, 4.3, 4.3],
|
316
|
+
medium: [0.0, 2.2, 3.4, 7.0, 9.4, 11.9, 13.7, 15.0, 15.4, 15.9, 15.7],
|
317
|
+
high: [0.0, 4.8, 9.1, 12.8, 16.1, 18.5, 21.3, 23.5, 24.8, 25.2, 25.4]
|
318
|
+
}
|
319
|
+
},
|
320
|
+
linear_cracking: {
|
321
|
+
valid_min: 0.0,
|
322
|
+
valid_max: 100.0,
|
323
|
+
chart_type: :linear,
|
324
|
+
x_values: X_VALUES,
|
325
|
+
expected_y_values: {
|
326
|
+
low: [0.0, 5.6, 10.4, 14.6, 17.4, 19.8, 21.1, 22.2, 23.0, 23.3, 23.5],
|
327
|
+
medium: [0.0, 8.1, 14.8, 20.0, 24.1, 27.2, 29.8, 32.2, 34.8, 36.9, 38.5],
|
328
|
+
high: [0.0, 18.9, 29.6, 36.1, 41.1, 45.9, 50.0, 54.1, 57.6, 61.3, 65.4]
|
329
|
+
}
|
330
|
+
},
|
331
|
+
polished_aggregate: {
|
332
|
+
valid_min: 0.0,
|
333
|
+
valid_max: 100.0,
|
334
|
+
chart_type: :linear,
|
335
|
+
x_values: X_VALUES,
|
336
|
+
expected_y_values: {
|
337
|
+
low: [0.0, 2.0, 3.7, 5.4, 6.3, 7.4, 8.1, 8.7, 9.1, 9.8, 9.8],
|
338
|
+
medium: [0.0, 2.0, 3.7, 5.4, 6.3, 7.4, 8.1, 8.7, 9.1, 9.8, 9.8],
|
339
|
+
high: [0.0, 2.0, 3.7, 5.4, 6.3, 7.4, 8.1, 8.7, 9.1, 9.8, 9.8]
|
340
|
+
}
|
341
|
+
},
|
342
|
+
patching_large_and_utility_cuts: {
|
343
|
+
valid_min: 0.0,
|
344
|
+
valid_max: 100.0,
|
345
|
+
chart_type: :linear,
|
346
|
+
x_values: X_VALUES,
|
347
|
+
expected_y_values: {
|
348
|
+
low: [0.0, 2.0, 6.7, 11.7, 15.6, 18.7, 21.3, 23.5, 25.4, 26.9, 28.1],
|
349
|
+
medium: [0.0, 5.6, 12.4, 20.0, 27.6, 33.3, 37.6, 41.1, 44.1, 46.9, 48.7],
|
350
|
+
high: [0.0, 16.3, 29.1, 38.9, 46.7, 52.6, 57.6, 62.0, 65.9, 69.4, 72.6]
|
351
|
+
}
|
352
|
+
},
|
353
|
+
popouts: {
|
354
|
+
valid_min: 0.0,
|
355
|
+
valid_max: 100.0,
|
356
|
+
chart_type: :linear,
|
357
|
+
x_values: X_VALUES,
|
358
|
+
expected_y_values: {
|
359
|
+
low: [0.0, 2.2, 4.1, 5.9, 7.8, 9.8, 12.0, 13.7, 14.6, 15.2, 15.4],
|
360
|
+
medium: [0.0, 2.2, 4.1, 5.9, 7.8, 9.8, 12.0, 13.7, 14.6, 15.2, 15.4],
|
361
|
+
high: [0.0, 2.2, 4.1, 5.9, 7.8, 9.8, 12.0, 13.7, 14.6, 15.2, 15.4]
|
362
|
+
}
|
363
|
+
},
|
364
|
+
pumping: {
|
365
|
+
valid_min: 0.0,
|
366
|
+
valid_max: 100.0,
|
367
|
+
chart_type: :linear,
|
368
|
+
x_values: X_VALUES,
|
369
|
+
expected_y_values: {
|
370
|
+
low: [0.0, 6.1, 11.9, 17.2, 21.9, 26.1, 29.6, 32.8, 35.0, 36.7, 37.8],
|
371
|
+
medium: [0.0, 6.1, 11.9, 17.2, 21.9, 26.1, 29.6, 32.8, 35.0, 36.7, 37.8],
|
372
|
+
high: [0.0, 6.1, 11.9, 17.2, 21.9, 26.1, 29.6, 32.8, 35.0, 36.7, 37.8]
|
373
|
+
}
|
374
|
+
},
|
375
|
+
punchouts: {
|
376
|
+
valid_min: 0.0,
|
377
|
+
valid_max: 100.0,
|
378
|
+
chart_type: :linear,
|
379
|
+
x_values: X_VALUES,
|
380
|
+
expected_y_values: {
|
381
|
+
low: [0.0, 14.6, 26.5, 35.2, 41.3, 46.3, 50.0, 52.6, 53.9, 54.4, 54.6],
|
382
|
+
medium: [0.0, 24.2, 39.5, 48.0, 55.0, 60.9, 65.4, 68.5, 70.9, 71.5, 71.3],
|
383
|
+
high: [0.0, 30.2, 48.1, 58.7, 66.1, 71.9, 76.1, 80.0, 83.0, 85.4, 87.0]
|
384
|
+
}
|
385
|
+
},
|
386
|
+
railroad_crossing: {
|
387
|
+
valid_min: 0.0,
|
388
|
+
valid_max: 60.0,
|
389
|
+
chart_type: :linear,
|
390
|
+
x_values: [0.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0],
|
391
|
+
expected_y_values: {
|
392
|
+
low: [0.0, 9.4, 15.9, 20.6, 24.1, 27.0, 29.6],
|
393
|
+
medium: [0.0, 18.3, 30.0, 35.7, 40.6, 45.4, 50.2],
|
394
|
+
high: [0.0, 55.2, 71.1, 79.4, 85.9, 90.7, 95.2]
|
395
|
+
}
|
396
|
+
},
|
397
|
+
scaling_map_cracking_crazing: {
|
398
|
+
valid_min: 0.0,
|
399
|
+
valid_max: 100.0,
|
400
|
+
chart_type: :linear,
|
401
|
+
x_values: X_VALUES,
|
402
|
+
expected_y_values: {
|
403
|
+
low: [0.0, 2.2, 4.3, 6.1, 7.8, 9.4, 10.2, 10.6, 11.1, 11.5, 11.7],
|
404
|
+
medium: [0.0, 8.3, 14.1, 18.3, 21.1, 23.5, 25.6, 27.4, 28.9, 29.8, 30.6],
|
405
|
+
high: [0.0, 18.0, 28.7, 35.4, 40.6, 45.2, 49.4, 53.5, 57.4, 61.3, 65.0]
|
406
|
+
}
|
407
|
+
},
|
408
|
+
shrinkage_cracks: {
|
409
|
+
valid_min: 0.0,
|
410
|
+
valid_max: 100.0,
|
411
|
+
chart_type: :linear,
|
412
|
+
x_values: X_VALUES,
|
413
|
+
expected_y_values: {
|
414
|
+
low: [0.0, 0.0, 0.0, 0.9, 2.0, 2.8, 3.1, 3.3, 3.7, 3.7, 3.7],
|
415
|
+
medium: [0.0, 0.0, 0.0, 0.9, 2.0, 2.8, 3.1, 3.3, 3.7, 3.7, 3.7],
|
416
|
+
high: [0.0, 0.0, 0.0, 0.9, 2.0, 2.8, 3.1, 3.3, 3.7, 3.7, 3.7]
|
417
|
+
}
|
418
|
+
},
|
419
|
+
spalling_corner: {
|
420
|
+
valid_min: 0.0,
|
421
|
+
valid_max: 100.0,
|
422
|
+
chart_type: :linear,
|
423
|
+
x_values: X_VALUES,
|
424
|
+
expected_y_values: {
|
425
|
+
low: [0.0, 1.1, 3.1, 5.6, 8.1, 10.2, 11.1, 12.4, 13.7, 14.6, 15.0],
|
426
|
+
medium: [0.0, 2.6, 6.3, 9.8, 13.3, 16.1, 18.5, 20.6, 21.7, 22.2, 22.4],
|
427
|
+
high: [0.0, 7.0, 12.6, 16.9, 20.4, 23.1, 25.2, 27.6, 29.1, 30.0, 30.6]
|
428
|
+
}
|
429
|
+
},
|
430
|
+
spalling_joint: {
|
431
|
+
valid_min: 0.0,
|
432
|
+
valid_max: 100.0,
|
433
|
+
chart_type: :linear,
|
434
|
+
x_values: X_VALUES,
|
435
|
+
expected_y_values: {
|
436
|
+
low: [0.0, 2.4, 4.6, 6.7, 8.5, 10.2, 11.3, 12.2, 12.8, 12.8, 12.2],
|
437
|
+
medium: [0.0, 4.4, 8.9, 13.1, 16.9, 19.1, 20.9, 22.8, 24.1, 25.0, 25.6],
|
438
|
+
high: [0.0, 15.4, 25.2, 32.4, 37.4, 41.3, 45.2, 48.5, 51.3, 53.9, 56.1]
|
439
|
+
}
|
440
|
+
}
|
441
|
+
}
|
442
|
+
}
|
443
|
+
|
444
|
+
end
|
445
|
+
end
|
446
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
module PavementConditionIndex
|
2
|
+
class PCI
|
3
|
+
|
4
|
+
attr_reader :score
|
5
|
+
|
6
|
+
def initialize(score:nil)
|
7
|
+
@score = score
|
8
|
+
end
|
9
|
+
|
10
|
+
def lookup
|
11
|
+
@lookup ||= begin
|
12
|
+
case @score.to_i
|
13
|
+
when 85..100
|
14
|
+
{rating: 'Good', color: '0f7d1d'}
|
15
|
+
when 70..85
|
16
|
+
{rating: 'Satisfactory', color: '1ec734'}
|
17
|
+
when 55..70
|
18
|
+
{rating: 'Fair', color: 'fefb4a'}
|
19
|
+
when 40..55
|
20
|
+
{rating: 'Poor', color: 'fc2e1f'}
|
21
|
+
when 25..40
|
22
|
+
{rating: 'Very Poor', color: 'a81a10'}
|
23
|
+
when 10..25
|
24
|
+
{rating: 'Serious', color: '690d07'}
|
25
|
+
when 0..10
|
26
|
+
{rating: 'Failed', color: '979797'}
|
27
|
+
else
|
28
|
+
{rating: 'ERROR', color: '000000'}
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def rating
|
34
|
+
lookup[:rating]
|
35
|
+
end
|
36
|
+
|
37
|
+
def color
|
38
|
+
lookup[:color]
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module PavementConditionIndex
|
2
|
+
module SampleUnitConditionSurvey
|
3
|
+
class AsphaltSurvey < BaseSurvey
|
4
|
+
|
5
|
+
def initialize(area:,distresses:,identifier: nil)
|
6
|
+
@identifier = identifier
|
7
|
+
@area = area
|
8
|
+
@size_of_sample_unit = area # in square feet
|
9
|
+
@pavement_type = :asphalt
|
10
|
+
@distresses = distresses
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
module PavementConditionIndex
|
2
|
+
module SampleUnitConditionSurvey
|
3
|
+
class BaseSurvey
|
4
|
+
|
5
|
+
attr_reader :area, :pavement_type, :distresses, :size_of_sample_unit, :identifier
|
6
|
+
|
7
|
+
def q
|
8
|
+
deduct_values.select {|dv| dv > 2.0}.length
|
9
|
+
end
|
10
|
+
|
11
|
+
def distress_groups
|
12
|
+
@distress_groups ||= begin
|
13
|
+
grouped_distresses = @distresses.group_by{|distress| [distress[:type],distress[:severity]]}
|
14
|
+
grouped_distresses.map{|key,value| PavementConditionIndex::DistressGroup.new(type: key[0],severity: key[1],distresses: value,size_of_sample_unit: @size_of_sample_unit,pavement_type: @pavement_type)}
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def cdv_iterations
|
19
|
+
@cdv_iterations ||= begin
|
20
|
+
r = []
|
21
|
+
(1..q).each do |q|
|
22
|
+
r << PavementConditionIndex::CdvIteration.new(deduct_values: deduct_values, pavement_type: @pavement_type, q: q)
|
23
|
+
end
|
24
|
+
r.reverse
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def allowed_deduct_values
|
29
|
+
@allowed_deduct_values ||= begin
|
30
|
+
dvs = deduct_values.clone
|
31
|
+
adv = dvs.shift(allowable_number_of_deduct_values.floor)
|
32
|
+
adv << (allowable_number_of_deduct_values % 1).to_f * dvs[0].to_f if dvs.any?
|
33
|
+
adv
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def allowable_number_of_deduct_values
|
38
|
+
@allowable_number_of_deducts ||= begin
|
39
|
+
m = 1 + ((9/98.0) * (100-highest_deduct_value))
|
40
|
+
[m,10.0].min
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
def highest_deduct_value
|
45
|
+
@highest_deduct_value ||= distress_groups.map(&:deduct_value).max || 0
|
46
|
+
end
|
47
|
+
|
48
|
+
def deduct_values
|
49
|
+
@deduct_values ||= begin
|
50
|
+
dvs = distress_groups.map(&:deduct_value).sort {|x,y| y <=> x}.take(10) # Max of 10
|
51
|
+
a = dvs.shift(allowable_number_of_deduct_values.floor)
|
52
|
+
a << dvs.shift * (allowable_number_of_deduct_values%1) unless dvs.empty?
|
53
|
+
a
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def maximum_corrected_deduct_value
|
58
|
+
@maximum_corrected_deduct_value ||= cdv_iterations.map(&:corrected_deduct_value).max|| 0
|
59
|
+
end
|
60
|
+
|
61
|
+
def pavement_condition_index
|
62
|
+
@pavement_condition_index ||= begin
|
63
|
+
pci_score = 100 - maximum_corrected_deduct_value
|
64
|
+
PavementConditionIndex::PCI.new(score: pci_score)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
alias_method :pci, :pavement_condition_index
|
68
|
+
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module PavementConditionIndex
|
2
|
+
module SampleUnitConditionSurvey
|
3
|
+
class ConcreteSurvey < BaseSurvey
|
4
|
+
|
5
|
+
def initialize(area:,number_of_slabs:,distresses:,identifier: nil)
|
6
|
+
@identifier = identifier
|
7
|
+
@area = area
|
8
|
+
@size_of_sample_unit = number_of_slabs # in number of slabs
|
9
|
+
@pavement_type = :concrete
|
10
|
+
@distresses = distresses
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
module PavementConditionIndex
|
2
|
+
class SectionConditionSurvey
|
3
|
+
|
4
|
+
attr_reader :sample_unit_condition_surveys, :total_number_of_sample_units, :acceptable_error, :pci_standard_deviation
|
5
|
+
|
6
|
+
def initialize(sample_unit_condition_surveys:,total_number_of_sample_units:nil,acceptable_error:5,pci_standard_deviation:10)
|
7
|
+
@sample_unit_condition_surveys = sample_unit_condition_surveys
|
8
|
+
@total_number_of_sample_units = total_number_of_sample_units
|
9
|
+
@acceptable_error = acceptable_error
|
10
|
+
@pci_standard_deviation = pci_standard_deviation
|
11
|
+
@number_of_sample_units = @sample_unit_condition_surveys.length
|
12
|
+
end
|
13
|
+
|
14
|
+
def required_number_of_sample_unit_condition_surveys
|
15
|
+
@required_number_of_sample_unit_condition_surveys ||= begin
|
16
|
+
if @total_number_of_sample_units
|
17
|
+
t = (@total_number_of_sample_units * @pci_standard_deviation**2)
|
18
|
+
b = (@acceptable_error**2/4) * (@total_number_of_sample_units - 1) + @pci_standard_deviation**2
|
19
|
+
(t/b.to_f).ceil
|
20
|
+
else
|
21
|
+
1
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def sample_is_statistically_significant
|
27
|
+
@sample_is_statistically_significant ||= @number_of_sample_units >= required_number_of_sample_unit_condition_surveys
|
28
|
+
end
|
29
|
+
|
30
|
+
def sample_spacing_interval
|
31
|
+
@sample_spacing_interval ||= (@number_of_sample_units/required_number_of_sample_unit_condition_surveys.to_f).floor
|
32
|
+
end
|
33
|
+
|
34
|
+
def weighted_pci_scores
|
35
|
+
@weighted_pci_scores ||= @sample_unit_condition_surveys.map{|sample_unit_condition_survey| sample_unit_condition_survey.pavement_condition_index.score * sample_unit_condition_survey.area}.reduce(:+)
|
36
|
+
end
|
37
|
+
|
38
|
+
def sum_of_sample_unit_condition_survey_areas
|
39
|
+
@sum_of_sample_unit_condition_survey_areas ||= @sample_unit_condition_surveys.map{|sample_unit_condition_survey| sample_unit_condition_survey.area}.reduce(:+).to_f
|
40
|
+
end
|
41
|
+
|
42
|
+
def pavement_condition_index
|
43
|
+
@pavement_condition_index ||= begin
|
44
|
+
pci_score = weighted_pci_scores / sum_of_sample_unit_condition_survey_areas
|
45
|
+
PavementConditionIndex::PCI.new(score: pci_score)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
alias_method :pci, :pavement_condition_index
|
49
|
+
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require "pavement_condition_index/version"
|
2
|
+
|
3
|
+
module PavementConditionIndex
|
4
|
+
end
|
5
|
+
|
6
|
+
|
7
|
+
require 'pavement_condition_index/core_ext/numeric'
|
8
|
+
|
9
|
+
require 'pavement_condition_index/section_condition_survey'
|
10
|
+
require 'pavement_condition_index/distress_group'
|
11
|
+
require 'pavement_condition_index/cdv_iteration'
|
12
|
+
require 'pavement_condition_index/pci'
|
13
|
+
|
14
|
+
require 'pavement_condition_index/sample_unit_condition_survey/base_survey'
|
15
|
+
require 'pavement_condition_index/sample_unit_condition_survey/asphalt_survey'
|
16
|
+
require 'pavement_condition_index/sample_unit_condition_survey/concrete_survey'
|
17
|
+
|
18
|
+
require 'pavement_condition_index/lookups/deduct_values'
|
19
|
+
require 'pavement_condition_index/lookups/corrected_deduct_values'
|
20
|
+
require 'pavement_condition_index/lookups/observed_deduct_values'
|
21
|
+
require 'pavement_condition_index/lookups/calculated_deduct_coefficients'
|
22
|
+
require 'pavement_condition_index/lookups/observed_corrected_deduct_values'
|
23
|
+
require 'pavement_condition_index/lookups/calculated_corrected_deduct_coefficients'
|