onroute-policy-engine 2.32.4 → 2.34.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.
|
@@ -75,13 +75,15 @@ function isFeatureLegalWeightPowerUnit(vehicleType) {
|
|
|
75
75
|
return (vehicleType === power_unit_codes_1.POWER_UNIT_CODES.TRUCKS ||
|
|
76
76
|
vehicleType === power_unit_codes_1.POWER_UNIT_CODES.TRUCK_TRACTORS ||
|
|
77
77
|
vehicleType === power_unit_codes_1.POWER_UNIT_CODES.TRUCK_WITH_PME ||
|
|
78
|
-
vehicleType === power_unit_codes_1.POWER_UNIT_CODES.TRUCK_TRACTOR_WITH_PME
|
|
78
|
+
vehicleType === power_unit_codes_1.POWER_UNIT_CODES.TRUCK_TRACTOR_WITH_PME ||
|
|
79
|
+
vehicleType === power_unit_codes_1.POWER_UNIT_CODES.PICKER_TRUCK_TRACTORS);
|
|
79
80
|
}
|
|
80
81
|
function getFeatureLegalPowerUnitWeightThreshold(vehicleType, axleConfiguration, axleIndex) {
|
|
81
82
|
const steerAxle = axleConfiguration[0];
|
|
82
83
|
const driveAxle = axleConfiguration[1];
|
|
83
84
|
const hasPme = vehicleType === power_unit_codes_1.POWER_UNIT_CODES.TRUCK_WITH_PME ||
|
|
84
|
-
vehicleType === power_unit_codes_1.POWER_UNIT_CODES.TRUCK_TRACTOR_WITH_PME
|
|
85
|
+
vehicleType === power_unit_codes_1.POWER_UNIT_CODES.TRUCK_TRACTOR_WITH_PME ||
|
|
86
|
+
vehicleType === power_unit_codes_1.POWER_UNIT_CODES.PICKER_TRUCK_TRACTORS;
|
|
85
87
|
if (axleIndex === 0) {
|
|
86
88
|
if (steerAxle.numberOfAxles === 1 &&
|
|
87
89
|
(driveAxle.numberOfAxles === 1 || driveAxle.numberOfAxles === 2)) {
|
|
@@ -686,11 +688,11 @@ function CheckPickerTruckTractorWeightRestrictions(policy, vehicleConfiguration,
|
|
|
686
688
|
const vehicleDefinition = policy.getVehicleDefinition(vehicleType);
|
|
687
689
|
return !(vehicleDefinition === null || vehicleDefinition === void 0 ? void 0 : vehicleDefinition.ignoreForAxleCalculation);
|
|
688
690
|
});
|
|
689
|
-
const
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
const trailerPasses = !hasRealTrailer || !exceedsLegalWeight;
|
|
691
|
+
const steerLegal = getFeatureLegalPowerUnitWeightThreshold(power_unit_codes_1.POWER_UNIT_CODES.PICKER_TRUCK_TRACTORS, axleConfiguration, 0);
|
|
692
|
+
const driveLegal = getFeatureLegalPowerUnitWeightThreshold(power_unit_codes_1.POWER_UNIT_CODES.PICKER_TRUCK_TRACTORS, axleConfiguration, 1);
|
|
693
|
+
const exceedsLegalWeight = (steerLegal !== undefined && steerAxle.axleUnitWeight > steerLegal) ||
|
|
694
|
+
(driveLegal !== undefined && driveAxle.axleUnitWeight > driveLegal);
|
|
695
|
+
const trailerPasses = !hasRealTrailer || (ratioPasses && !exceedsLegalWeight);
|
|
694
696
|
return [
|
|
695
697
|
{
|
|
696
698
|
id: policyId,
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "v2.
|
|
1
|
+
export declare const version = "v2.34.0";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED