Commit bf0196c
committed
refactor(break-writer): remove align_break_to_activity_boundary, accept upstream Fall C
Drops the local fork's job-boundary alignment for required breaks on
point stops. With the alignment gone, a break that lands inside a job's
service window is no longer split off cleanly; instead the job's
activity end-time is extended by the break duration, matching the
upstream reinterpretcat/vrp behavior.
Code:
* `insert_break` no longer calls `align_break_to_activity_boundary`;
the helper is removed entirely.
* The overlap-extend loop now keys directly off `reserved_tw` instead of
the previously-aligned `activity_time` and drops the `overlap.duration() > 0`
guard (the guard was only relevant in the alignment path).
Tests:
* `can_assign_break_during_activity` updated to verify Fall C: job1's
activity end stretched from 8 to 10, break placed at 7..9 within the
job window. Cross-references the spec scratchpad in fieldrouting.
* `can_keep_job_activity_duration_when_break_starts_at_activity_end_on_same_stop`
and `can_align_required_break_to_job_boundary_when_reserved_time_hits_mid_activity`
removed — both validated Fall B specifically.
* Two analogous Fall-B unit tests in writer_test.rs removed for the
same reason.
* `required_break_flexible_start.rs` substantially restructured to
reflect Fall C expectations across the existing wide-coverage scenarios.
Coverage check: 405 vrp-pragmatic tests pass; 746 vrp-core tests pass.
Fall A (transit-stop break) and Fall C (point-stop with job extension)
are both broadly covered; the removed tests were the only ones that
validated the now-deleted alignment helper.
Consumer impact: anything that reads `job.time.end - job.time.start`
from the solver output as service duration must subtract overlapping
break durations to recover the real service time (or, preferred, read
the duration from the problem input). See the spec scratchpad for
the reconstruction formula.1 parent 2dbd0b7 commit bf0196c
4 files changed
Lines changed: 637 additions & 418 deletions
File tree
- vrp-pragmatic
- src/format/solution
- tests
- features/breaks
- unit/format/solution
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | 136 | | |
142 | 137 | | |
143 | 138 | | |
| |||
166 | 161 | | |
167 | 162 | | |
168 | 163 | | |
169 | | - | |
| 164 | + | |
170 | 165 | | |
171 | | - | |
172 | | - | |
| 166 | + | |
| 167 | + | |
173 | 168 | | |
174 | 169 | | |
175 | 170 | | |
| |||
183 | 178 | | |
184 | 179 | | |
185 | 180 | | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | 181 | | |
235 | 182 | | |
236 | 183 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| |||
0 commit comments