onroute-policy-engine 2.15.0 → 2.16.0
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.
|
@@ -13,5 +13,6 @@ export declare enum PolicyCheckId {
|
|
|
13
13
|
MinTandemSteerAxleWeight = "minimum-tandem-steer-axle-weight",
|
|
14
14
|
NumberOfAxles = "number-of-axles",
|
|
15
15
|
NumberOfWheelsPerAxle = "number-of-wheels",
|
|
16
|
+
PickerTruckTractorWeightRestrictions = "picker-truck-tractor-weight-restrictions",
|
|
16
17
|
TruckTractorWheelbase = "truck-tractor-wheelbase"
|
|
17
18
|
}
|
|
@@ -18,5 +18,6 @@ var PolicyCheckId;
|
|
|
18
18
|
PolicyCheckId["MinTandemSteerAxleWeight"] = "minimum-tandem-steer-axle-weight";
|
|
19
19
|
PolicyCheckId["NumberOfAxles"] = "number-of-axles";
|
|
20
20
|
PolicyCheckId["NumberOfWheelsPerAxle"] = "number-of-wheels";
|
|
21
|
+
PolicyCheckId["PickerTruckTractorWeightRestrictions"] = "picker-truck-tractor-weight-restrictions";
|
|
21
22
|
PolicyCheckId["TruckTractorWheelbase"] = "truck-tractor-wheelbase";
|
|
22
23
|
})(PolicyCheckId || (exports.PolicyCheckId = PolicyCheckId = {}));
|
|
@@ -176,6 +176,11 @@ export declare function CheckMinSteerAxleWeight(_policy: Policy, _vehicleConfigu
|
|
|
176
176
|
* @returns Array of AxleGroupPolicyCheckResult objects with validation results
|
|
177
177
|
*/
|
|
178
178
|
export declare function CheckMinTandemSteerAxleWeight(_policy: Policy, _vehicleConfiguration: Array<string>, axleConfiguration: Array<AxleConfiguration>): Array<PolicyCheckResult>;
|
|
179
|
+
/**
|
|
180
|
+
* Applies the restricted weight rules for non-standard tandem steer/tridem
|
|
181
|
+
* drive picker truck tractors.
|
|
182
|
+
*/
|
|
183
|
+
export declare function CheckPickerTruckTractorWeightRestrictions(policy: Policy, vehicleConfiguration: Array<string>, axleConfiguration: Array<AxleConfiguration>): Array<AxleGroupPolicyCheckResult>;
|
|
179
184
|
/**
|
|
180
185
|
* Validates minimum drive axle weight requirements for tandem and tridem drive power units.
|
|
181
186
|
*
|
|
@@ -296,6 +301,7 @@ export declare function CheckDriveJeepLoadEqualization(_policy: Policy, vehicleC
|
|
|
296
301
|
* - MinDriveAxleWeight: Validates minimum weight requirements for drive axles
|
|
297
302
|
* - MinSteerAxleWeight: Validates minimum weight requirements for steer axles
|
|
298
303
|
* - MinTandemSteerAxleWeight: Validates tandem steer minimum weight requirements
|
|
304
|
+
* - PickerTruckTractorWeightRestrictions: Validates non-standard picker truck tractor restrictions
|
|
299
305
|
* - NumberOfAxles: Validates axle count per axle unit
|
|
300
306
|
* - NumberOfWheelsPerAxle: Validates tire count per axle unit
|
|
301
307
|
* - BoosterAxleLimit: Validates booster axle count against the preceding trailer
|
|
@@ -7,6 +7,7 @@ exports.CheckNumTiresPerAxle = CheckNumTiresPerAxle;
|
|
|
7
7
|
exports.CheckPermittableWeight = CheckPermittableWeight;
|
|
8
8
|
exports.CheckMinSteerAxleWeight = CheckMinSteerAxleWeight;
|
|
9
9
|
exports.CheckMinTandemSteerAxleWeight = CheckMinTandemSteerAxleWeight;
|
|
10
|
+
exports.CheckPickerTruckTractorWeightRestrictions = CheckPickerTruckTractorWeightRestrictions;
|
|
10
11
|
exports.CheckMinDriveAxleWeight = CheckMinDriveAxleWeight;
|
|
11
12
|
exports.CheckMaxTireLoad = CheckMaxTireLoad;
|
|
12
13
|
exports.CheckBoosterAxleLimit = CheckBoosterAxleLimit;
|
|
@@ -387,6 +388,95 @@ function CheckMinTandemSteerAxleWeight(_policy, _vehicleConfiguration, axleConfi
|
|
|
387
388
|
});
|
|
388
389
|
return policyCheckResults;
|
|
389
390
|
}
|
|
391
|
+
/**
|
|
392
|
+
* Applies the restricted weight rules for non-standard tandem steer/tridem
|
|
393
|
+
* drive picker truck tractors.
|
|
394
|
+
*/
|
|
395
|
+
function CheckPickerTruckTractorWeightRestrictions(policy, vehicleConfiguration, axleConfiguration) {
|
|
396
|
+
const policyId = enum_1.PolicyCheckId.PickerTruckTractorWeightRestrictions;
|
|
397
|
+
const MINIMUM_WHEELBASE_CM = 660;
|
|
398
|
+
const MINIMUM_STEER_AXLE_SPREAD_CM = 100;
|
|
399
|
+
const MINIMUM_DRIVE_AXLE_SPREAD_CM = 240;
|
|
400
|
+
const steerAxle = axleConfiguration[0];
|
|
401
|
+
const driveAxle = axleConfiguration[1];
|
|
402
|
+
const doesNotApply = (message = 'Policy check does not apply to this configuration') => [
|
|
403
|
+
{
|
|
404
|
+
id: policyId,
|
|
405
|
+
message,
|
|
406
|
+
result: enum_1.PolicyCheckResultType.Pass,
|
|
407
|
+
startAxleUnit: 1,
|
|
408
|
+
endAxleUnit: 2,
|
|
409
|
+
},
|
|
410
|
+
];
|
|
411
|
+
if (vehicleConfiguration[0] !== 'PICKRTT' ||
|
|
412
|
+
!steerAxle ||
|
|
413
|
+
!driveAxle ||
|
|
414
|
+
steerAxle.numberOfAxles !== 2 ||
|
|
415
|
+
driveAxle.numberOfAxles !== 3) {
|
|
416
|
+
return doesNotApply();
|
|
417
|
+
}
|
|
418
|
+
const hasWheelbaseDimensions = Number.isFinite(steerAxle.axleSpread) &&
|
|
419
|
+
Number.isFinite(driveAxle.interaxleSpacing) &&
|
|
420
|
+
Number.isFinite(driveAxle.axleSpread);
|
|
421
|
+
const wheelbase = hasWheelbaseDimensions
|
|
422
|
+
? steerAxle.axleSpread / 2 +
|
|
423
|
+
driveAxle.interaxleSpacing +
|
|
424
|
+
driveAxle.axleSpread / 2
|
|
425
|
+
: undefined;
|
|
426
|
+
const isNonStandard = (wheelbase !== undefined && wheelbase < MINIMUM_WHEELBASE_CM) ||
|
|
427
|
+
(steerAxle.axleSpread !== undefined &&
|
|
428
|
+
steerAxle.axleSpread < MINIMUM_STEER_AXLE_SPREAD_CM) ||
|
|
429
|
+
(driveAxle.axleSpread !== undefined &&
|
|
430
|
+
driveAxle.axleSpread < MINIMUM_DRIVE_AXLE_SPREAD_CM);
|
|
431
|
+
if (!isNonStandard) {
|
|
432
|
+
return doesNotApply();
|
|
433
|
+
}
|
|
434
|
+
const powerUnitWeights = policy.getDefaultPowerUnitWeight('PICKRTT', 23);
|
|
435
|
+
const steerWeightDimension = policy.selectCorrectWeightDimension(powerUnitWeights, vehicleConfiguration, axleConfiguration, 0);
|
|
436
|
+
const driveWeightDimension = policy.selectCorrectWeightDimension(powerUnitWeights, vehicleConfiguration, axleConfiguration, 1);
|
|
437
|
+
const steerPermittable = steerWeightDimension === null || steerWeightDimension === void 0 ? void 0 : steerWeightDimension.permittable;
|
|
438
|
+
const drivePermittable = driveWeightDimension === null || driveWeightDimension === void 0 ? void 0 : driveWeightDimension.permittable;
|
|
439
|
+
if (steerPermittable === undefined ||
|
|
440
|
+
drivePermittable === undefined ||
|
|
441
|
+
steerAxle.axleUnitWeight > steerPermittable ||
|
|
442
|
+
driveAxle.axleUnitWeight > drivePermittable) {
|
|
443
|
+
return doesNotApply('Policy check does not apply outside configured permittable axle weights');
|
|
444
|
+
}
|
|
445
|
+
const ratioPasses = meetsMinimumSteerPercentageOfDriveAxleWeight(steerAxle, driveAxle, 0.5);
|
|
446
|
+
const hasRealTrailer = vehicleConfiguration.slice(1).some((vehicleType) => {
|
|
447
|
+
const vehicleDefinition = policy.getVehicleDefinition(vehicleType);
|
|
448
|
+
return !(vehicleDefinition === null || vehicleDefinition === void 0 ? void 0 : vehicleDefinition.ignoreForAxleCalculation);
|
|
449
|
+
});
|
|
450
|
+
const exceedsLegalWeight = ((steerWeightDimension === null || steerWeightDimension === void 0 ? void 0 : steerWeightDimension.legal) !== undefined &&
|
|
451
|
+
steerAxle.axleUnitWeight > steerWeightDimension.legal) ||
|
|
452
|
+
((driveWeightDimension === null || driveWeightDimension === void 0 ? void 0 : driveWeightDimension.legal) !== undefined &&
|
|
453
|
+
driveAxle.axleUnitWeight > driveWeightDimension.legal);
|
|
454
|
+
const trailerPasses = !hasRealTrailer || !exceedsLegalWeight;
|
|
455
|
+
return [
|
|
456
|
+
{
|
|
457
|
+
id: policyId,
|
|
458
|
+
message: ratioPasses
|
|
459
|
+
? ''
|
|
460
|
+
: 'Axle Unit 1 must carry a minimum 50% of Axle Unit 2 axle unit weight.',
|
|
461
|
+
result: ratioPasses
|
|
462
|
+
? enum_1.PolicyCheckResultType.Pass
|
|
463
|
+
: enum_1.PolicyCheckResultType.Fail,
|
|
464
|
+
startAxleUnit: 1,
|
|
465
|
+
endAxleUnit: 2,
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
id: policyId,
|
|
469
|
+
message: trailerPasses
|
|
470
|
+
? ''
|
|
471
|
+
: 'Cannot tow a trailer if Axle Unit 1 and Axle Unit 2 are exceeding legal axle weights.',
|
|
472
|
+
result: trailerPasses
|
|
473
|
+
? enum_1.PolicyCheckResultType.Pass
|
|
474
|
+
: enum_1.PolicyCheckResultType.Fail,
|
|
475
|
+
startAxleUnit: 1,
|
|
476
|
+
endAxleUnit: 2,
|
|
477
|
+
},
|
|
478
|
+
];
|
|
479
|
+
}
|
|
390
480
|
/**
|
|
391
481
|
* Validates minimum drive axle weight requirements for tandem and tridem drive power units.
|
|
392
482
|
*
|
|
@@ -808,6 +898,7 @@ function CheckDriveJeepLoadEqualization(_policy, vehicleConfiguration, axleConfi
|
|
|
808
898
|
* - MinDriveAxleWeight: Validates minimum weight requirements for drive axles
|
|
809
899
|
* - MinSteerAxleWeight: Validates minimum weight requirements for steer axles
|
|
810
900
|
* - MinTandemSteerAxleWeight: Validates tandem steer minimum weight requirements
|
|
901
|
+
* - PickerTruckTractorWeightRestrictions: Validates non-standard picker truck tractor restrictions
|
|
811
902
|
* - NumberOfAxles: Validates axle count per axle unit
|
|
812
903
|
* - NumberOfWheelsPerAxle: Validates tire count per axle unit
|
|
813
904
|
* - BoosterAxleLimit: Validates booster axle count against the preceding trailer
|
|
@@ -826,6 +917,10 @@ exports.policyCheckMap = new Map([
|
|
|
826
917
|
[enum_1.PolicyCheckId.MinDriveAxleWeight, CheckMinDriveAxleWeight],
|
|
827
918
|
[enum_1.PolicyCheckId.MinSteerAxleWeight, CheckMinSteerAxleWeight],
|
|
828
919
|
[enum_1.PolicyCheckId.MinTandemSteerAxleWeight, CheckMinTandemSteerAxleWeight],
|
|
920
|
+
[
|
|
921
|
+
enum_1.PolicyCheckId.PickerTruckTractorWeightRestrictions,
|
|
922
|
+
CheckPickerTruckTractorWeightRestrictions,
|
|
923
|
+
],
|
|
829
924
|
[enum_1.PolicyCheckId.NumberOfWheelsPerAxle, CheckNumTiresPerAxle],
|
|
830
925
|
[enum_1.PolicyCheckId.BoosterAxleLimit, CheckBoosterAxleLimit],
|
|
831
926
|
[enum_1.PolicyCheckId.TruckTractorWheelbase, CheckTruckTractorWheelbase],
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "v2.
|
|
1
|
+
export declare const version = "v2.16.0";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED