onroute-policy-engine 2.14.0 → 2.15.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.
@@ -10,6 +10,7 @@ export declare enum PolicyCheckId {
10
10
  MaxTireLoad = "max-tire-load",
11
11
  MinDriveAxleWeight = "minimum-drive-axle-weight",
12
12
  MinSteerAxleWeight = "minimum-steer-axle-weight",
13
+ MinTandemSteerAxleWeight = "minimum-tandem-steer-axle-weight",
13
14
  NumberOfAxles = "number-of-axles",
14
15
  NumberOfWheelsPerAxle = "number-of-wheels",
15
16
  TruckTractorWheelbase = "truck-tractor-wheelbase"
@@ -15,6 +15,7 @@ var PolicyCheckId;
15
15
  PolicyCheckId["MaxTireLoad"] = "max-tire-load";
16
16
  PolicyCheckId["MinDriveAxleWeight"] = "minimum-drive-axle-weight";
17
17
  PolicyCheckId["MinSteerAxleWeight"] = "minimum-steer-axle-weight";
18
+ PolicyCheckId["MinTandemSteerAxleWeight"] = "minimum-tandem-steer-axle-weight";
18
19
  PolicyCheckId["NumberOfAxles"] = "number-of-axles";
19
20
  PolicyCheckId["NumberOfWheelsPerAxle"] = "number-of-wheels";
20
21
  PolicyCheckId["TruckTractorWheelbase"] = "truck-tractor-wheelbase";
@@ -156,7 +156,7 @@ export declare function CheckPermittableWeight(policy: Policy, vehicleConfigurat
156
156
  * @example
157
157
  * // For a single steer, tridem drive configuration
158
158
  * const results = CheckMinSteerAxleWeight(policy, ['TRKTRAC'], [
159
- * { numberOfAxles: 1, axleUnitWeight: 8000 }, // Steer axle
159
+ * { numberOfAxles: 1, axleUnitWeight: 8000 }, // Single steer axle
160
160
  * { numberOfAxles: 3, axleUnitWeight: 30000 } // Tridem drive axle
161
161
  * ]);
162
162
  * // Returns pass if steer axle weight >= 27% of drive axle weight (8100 kgs)
@@ -165,6 +165,17 @@ export declare function CheckPermittableWeight(policy: Policy, vehicleConfigurat
165
165
  * @see AxleGroupPolicyCheckResult
166
166
  */
167
167
  export declare function CheckMinSteerAxleWeight(_policy: Policy, _vehicleConfiguration: Array<string>, axleConfiguration: Array<AxleConfiguration>): Array<PolicyCheckResult>;
168
+ /**
169
+ * Validates minimum tandem steer axle weight requirements for tandem steer
170
+ * power units with tandem or tridem drive axle units. The tandem steer axle
171
+ * unit must carry at least 40% of the drive axle unit weight.
172
+ *
173
+ * @param _policy - The policy instance (unused in this check, but required by PolicyCheck type)
174
+ * @param _vehicleConfiguration - Vehicle configuration (unused in this check, but required by PolicyCheck type)
175
+ * @param axleConfiguration - Array of axle configurations containing weight and axle count information
176
+ * @returns Array of AxleGroupPolicyCheckResult objects with validation results
177
+ */
178
+ export declare function CheckMinTandemSteerAxleWeight(_policy: Policy, _vehicleConfiguration: Array<string>, axleConfiguration: Array<AxleConfiguration>): Array<PolicyCheckResult>;
168
179
  /**
169
180
  * Validates minimum drive axle weight requirements for tandem and tridem drive power units.
170
181
  *
@@ -284,6 +295,7 @@ export declare function CheckDriveJeepLoadEqualization(_policy: Policy, vehicleC
284
295
  * - MaxTireLoad: Validates tire load capacity for each axle unit
285
296
  * - MinDriveAxleWeight: Validates minimum weight requirements for drive axles
286
297
  * - MinSteerAxleWeight: Validates minimum weight requirements for steer axles
298
+ * - MinTandemSteerAxleWeight: Validates tandem steer minimum weight requirements
287
299
  * - NumberOfAxles: Validates axle count per axle unit
288
300
  * - NumberOfWheelsPerAxle: Validates tire count per axle unit
289
301
  * - BoosterAxleLimit: Validates booster axle count against the preceding trailer
@@ -6,6 +6,7 @@ exports.CheckBridgeFormula = CheckBridgeFormula;
6
6
  exports.CheckNumTiresPerAxle = CheckNumTiresPerAxle;
7
7
  exports.CheckPermittableWeight = CheckPermittableWeight;
8
8
  exports.CheckMinSteerAxleWeight = CheckMinSteerAxleWeight;
9
+ exports.CheckMinTandemSteerAxleWeight = CheckMinTandemSteerAxleWeight;
9
10
  exports.CheckMinDriveAxleWeight = CheckMinDriveAxleWeight;
10
11
  exports.CheckMaxTireLoad = CheckMaxTireLoad;
11
12
  exports.CheckBoosterAxleLimit = CheckBoosterAxleLimit;
@@ -13,6 +14,9 @@ exports.CheckTruckTractorWheelbase = CheckTruckTractorWheelbase;
13
14
  exports.CheckDriveJeepLoadEqualization = CheckDriveJeepLoadEqualization;
14
15
  const dimensions_helper_1 = require("./dimensions.helper");
15
16
  const enum_1 = require("../enum");
17
+ function meetsMinimumSteerPercentageOfDriveAxleWeight(steerAxle, driveAxle, minimumPercentage) {
18
+ return (steerAxle.axleUnitWeight >= driveAxle.axleUnitWeight * minimumPercentage);
19
+ }
16
20
  /**
17
21
  * Validates the number of axles in each axle unit.
18
22
  *
@@ -303,7 +307,7 @@ function CheckPermittableWeight(policy, vehicleConfiguration, axleConfiguration)
303
307
  * @example
304
308
  * // For a single steer, tridem drive configuration
305
309
  * const results = CheckMinSteerAxleWeight(policy, ['TRKTRAC'], [
306
- * { numberOfAxles: 1, axleUnitWeight: 8000 }, // Steer axle
310
+ * { numberOfAxles: 1, axleUnitWeight: 8000 }, // Single steer axle
307
311
  * { numberOfAxles: 3, axleUnitWeight: 30000 } // Tridem drive axle
308
312
  * ]);
309
313
  * // Returns pass if steer axle weight >= 27% of drive axle weight (8100 kgs)
@@ -318,14 +322,13 @@ function CheckMinSteerAxleWeight(_policy, _vehicleConfiguration, axleConfigurati
318
322
  if (axleConfiguration[0].numberOfAxles === 1 &&
319
323
  axleConfiguration[1].numberOfAxles === 3) {
320
324
  // Check minimum load on steer axle
321
- if (axleConfiguration[0].axleUnitWeight >=
322
- axleConfiguration[1].axleUnitWeight * 0.27) {
323
- message = 'Steer axle meets minimum weight requirements';
325
+ if (meetsMinimumSteerPercentageOfDriveAxleWeight(axleConfiguration[0], axleConfiguration[1], 0.27)) {
326
+ message = 'Single steer axle meets minimum weight requirements';
324
327
  result = enum_1.PolicyCheckResultType.Pass;
325
328
  }
326
329
  else {
327
330
  message =
328
- 'Steer axle must be a minimum of 27% of tridem drive axle weight';
331
+ 'Single steer axle must be a minimum of 27% of tridem drive axle weight';
329
332
  result = enum_1.PolicyCheckResultType.Fail;
330
333
  }
331
334
  }
@@ -343,6 +346,47 @@ function CheckMinSteerAxleWeight(_policy, _vehicleConfiguration, axleConfigurati
343
346
  });
344
347
  return policyCheckResults;
345
348
  }
349
+ /**
350
+ * Validates minimum tandem steer axle weight requirements for tandem steer
351
+ * power units with tandem or tridem drive axle units. The tandem steer axle
352
+ * unit must carry at least 40% of the drive axle unit weight.
353
+ *
354
+ * @param _policy - The policy instance (unused in this check, but required by PolicyCheck type)
355
+ * @param _vehicleConfiguration - Vehicle configuration (unused in this check, but required by PolicyCheck type)
356
+ * @param axleConfiguration - Array of axle configurations containing weight and axle count information
357
+ * @returns Array of AxleGroupPolicyCheckResult objects with validation results
358
+ */
359
+ function CheckMinTandemSteerAxleWeight(_policy, _vehicleConfiguration, axleConfiguration) {
360
+ const policyCheckResults = new Array();
361
+ const policyId = enum_1.PolicyCheckId.MinTandemSteerAxleWeight;
362
+ const steerAxle = axleConfiguration[0];
363
+ const driveAxle = axleConfiguration[1];
364
+ let message, result;
365
+ if (steerAxle.numberOfAxles === 2 &&
366
+ (driveAxle.numberOfAxles === 2 || driveAxle.numberOfAxles === 3)) {
367
+ if (meetsMinimumSteerPercentageOfDriveAxleWeight(steerAxle, driveAxle, 0.4)) {
368
+ message = 'Tandem steer axle meets minimum weight requirements';
369
+ result = enum_1.PolicyCheckResultType.Pass;
370
+ }
371
+ else {
372
+ message =
373
+ 'Tandem steer axle must be a minimum of 40% of drive axle weight';
374
+ result = enum_1.PolicyCheckResultType.Fail;
375
+ }
376
+ }
377
+ else {
378
+ message = 'Policy check does not apply to this configuration';
379
+ result = enum_1.PolicyCheckResultType.Pass;
380
+ }
381
+ policyCheckResults.push({
382
+ id: policyId,
383
+ message: message,
384
+ result: result,
385
+ startAxleUnit: 1,
386
+ endAxleUnit: 2,
387
+ });
388
+ return policyCheckResults;
389
+ }
346
390
  /**
347
391
  * Validates minimum drive axle weight requirements for tandem and tridem drive power units.
348
392
  *
@@ -763,6 +807,7 @@ function CheckDriveJeepLoadEqualization(_policy, vehicleConfiguration, axleConfi
763
807
  * - MaxTireLoad: Validates tire load capacity for each axle unit
764
808
  * - MinDriveAxleWeight: Validates minimum weight requirements for drive axles
765
809
  * - MinSteerAxleWeight: Validates minimum weight requirements for steer axles
810
+ * - MinTandemSteerAxleWeight: Validates tandem steer minimum weight requirements
766
811
  * - NumberOfAxles: Validates axle count per axle unit
767
812
  * - NumberOfWheelsPerAxle: Validates tire count per axle unit
768
813
  * - BoosterAxleLimit: Validates booster axle count against the preceding trailer
@@ -780,6 +825,7 @@ exports.policyCheckMap = new Map([
780
825
  [enum_1.PolicyCheckId.MaxTireLoad, CheckMaxTireLoad],
781
826
  [enum_1.PolicyCheckId.MinDriveAxleWeight, CheckMinDriveAxleWeight],
782
827
  [enum_1.PolicyCheckId.MinSteerAxleWeight, CheckMinSteerAxleWeight],
828
+ [enum_1.PolicyCheckId.MinTandemSteerAxleWeight, CheckMinTandemSteerAxleWeight],
783
829
  [enum_1.PolicyCheckId.NumberOfWheelsPerAxle, CheckNumTiresPerAxle],
784
830
  [enum_1.PolicyCheckId.BoosterAxleLimit, CheckBoosterAxleLimit],
785
831
  [enum_1.PolicyCheckId.TruckTractorWheelbase, CheckTruckTractorWheelbase],
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "v2.14.0";
1
+ export declare const version = "v2.15.0";
package/dist/version.js CHANGED
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.version = void 0;
4
4
  // Generated by genversion.
5
- exports.version = 'v2.14.0';
5
+ exports.version = 'v2.15.0';
package/package.json CHANGED
@@ -91,5 +91,5 @@
91
91
  ],
92
92
  "testEnvironment": "node"
93
93
  },
94
- "version": "v2.14.0"
94
+ "version": "v2.15.0"
95
95
  }