@@ -21,7 +21,7 @@ import {
21
21
getNextLegDuration ,
22
22
returnsToCompany
23
23
} from './durations' ;
24
- import type { PromisedTimes } from './PromisedTimes' ;
24
+ // import type { PromisedTimes } from './PromisedTimes';
25
25
import type { Interval } from '$lib/server/util/interval' ;
26
26
import type { RoutingResults } from './routing' ;
27
27
import type { Company , Event } from './getBookingAvailability' ;
@@ -139,8 +139,8 @@ export function evaluateBothInsertion(
139
139
busStopIdx : number | undefined ,
140
140
prev : Event | undefined ,
141
141
next : Event | undefined ,
142
- allowedTimes : Interval [ ] ,
143
- promisedTimes ?: PromisedTimes
142
+ allowedTimes : Interval [ ]
143
+ // promisedTimes?: PromisedTimes
144
144
) : InsertionEvaluation | undefined {
145
145
console . assert (
146
146
insertionCase . what == InsertWhat . BOTH ,
@@ -177,12 +177,14 @@ export function evaluateBothInsertion(
177
177
if ( arrivalWindow == undefined ) {
178
178
return undefined ;
179
179
}
180
+ /*
180
181
if (
181
182
promisedTimes != undefined &&
182
183
!keepsPromises(insertionCase, arrivalWindow, passengerDuration, promisedTimes)
183
184
) {
184
185
return undefined;
185
186
}
187
+ */
186
188
const taxiDuration =
187
189
prevLegDuration +
188
190
nextLegDuration +
@@ -233,8 +235,8 @@ export function evaluateNewTours(
233
235
busStopTimes : Interval [ ] [ ] ,
234
236
routingResults : RoutingResults ,
235
237
travelDurations : ( number | undefined ) [ ] ,
236
- allowedTimes : Interval [ ] ,
237
- promisedTimes ?: PromisedTimes
238
+ allowedTimes : Interval [ ]
239
+ // promisedTimes?: PromisedTimes
238
240
) : ( Insertion | undefined ) [ ] [ ] {
239
241
const bestEvaluations = new Array < ( Insertion | undefined ) [ ] > ( busStopTimes . length ) ;
240
242
for ( let i = 0 ; i != busStopTimes . length ; ++ i ) {
@@ -280,8 +282,8 @@ export function evaluateNewTours(
280
282
busStopIdx ,
281
283
undefined ,
282
284
undefined ,
283
- allowedTimes ,
284
- promisedTimes
285
+ allowedTimes
286
+ // promisedTimes
285
287
) ;
286
288
if (
287
289
resultNewTour != undefined &&
@@ -357,7 +359,7 @@ const getOldDrivingTime = (
357
359
}
358
360
return prev . nextLegDuration ;
359
361
} ;
360
-
362
+ /*
361
363
const keepsPromises = (
362
364
insertionCase: InsertionType,
363
365
arrivalWindow: Interval,
@@ -414,3 +416,4 @@ const keepsPromises = (
414
416
}
415
417
return true;
416
418
};
419
+ */
0 commit comments