onroute-policy-engine 2.36.0 → 2.36.2

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,7 +10,7 @@ export declare const DATE_FORMATS: {
10
10
  * Convert a datetime to a specified timezone.
11
11
  *
12
12
  * @param datetime Datetime to be converted
13
- * @param timezoneId Timezone identifier (eg. 'Canada/Pacific')
13
+ * @param timezoneId Timezone identifier (eg. 'America/Vancouver')
14
14
  * @returns Dayjs object in the specified timezone
15
15
  */
16
16
  export declare const convertToTimezone: (datetime: string | Dayjs | Date, timezoneId: string) => Dayjs;
@@ -14,7 +14,7 @@ dayjs_1.default.extend(timezone_1.default);
14
14
  dayjs_1.default.extend(duration_1.default);
15
15
  dayjs_1.default.extend(quarterOfYear_1.default);
16
16
  exports.TIMEZONE_IDS = {
17
- PACIFIC: 'Canada/Pacific',
17
+ PACIFIC: 'America/Vancouver',
18
18
  };
19
19
  exports.DATE_FORMATS = {
20
20
  DATE_ONLY: 'YYYY-MM-DD',
@@ -24,7 +24,7 @@ exports.DATE_FORMATS = {
24
24
  * Convert a datetime to a specified timezone.
25
25
  *
26
26
  * @param datetime Datetime to be converted
27
- * @param timezoneId Timezone identifier (eg. 'Canada/Pacific')
27
+ * @param timezoneId Timezone identifier (eg. 'America/Vancouver')
28
28
  * @returns Dayjs object in the specified timezone
29
29
  */
30
30
  const convertToTimezone = (datetime, timezoneId) => {
@@ -897,11 +897,16 @@ function CheckMaxTireLoad(_policy, _vehicleConfiguration, axleConfiguration) {
897
897
  * Rate 100 kg/cm; lower of rate or cap is binding:
898
898
  * <445 mm => rate only (no cap)
899
899
  * >=445 mm => min(100 kg/cm rate, 9,100 kg/axle)
900
- *
901
- * e.g. 445mm * 2 tires => min(8,900, 9,100) = 8,900 kg <- rate binding
902
- * e.g. 457mm * 2 tires => min(9,140, 9,100) = 9,100 kg <- cap binding
903
900
  */
904
901
  if (isSteeringAxle) {
902
+ //Exemption: 445 mm tires on a 2-wheel steer axle are permitted up to 9,100 kg. We handle this explicitly tobypass the 100 kg/cm rate calculation.
903
+ if (tireSize === 445 && numberOfTires === 2) {
904
+ if (axleWeight > 9100) {
905
+ addFailResult(axleUnit);
906
+ }
907
+ return;
908
+ }
909
+ // For all other steering axle tires, apply standard rate limits and caps
905
910
  const capWeight = tireSize >= 445 ? 9100 : undefined;
906
911
  if (exceedsRateOrCapLimit(axleWeight, tireSize, numberOfTires, 100, capWeight)) {
907
912
  addFailResult(axleUnit);
@@ -909,7 +914,6 @@ function CheckMaxTireLoad(_policy, _vehicleConfiguration, axleConfiguration) {
909
914
  return;
910
915
  }
911
916
  // ORV2-5903 keeps this exact configuration as a grandfathered TPS case.
912
- // The application stores the 279.4 mm option as 279 to match f
913
917
  const hasGrandfatheredTpsTireSize = tireSize === 279.4 || tireSize === 279;
914
918
  const hasGrandfatheredTpsTireLimit = ac.numberOfAxles === 2 &&
915
919
  hasGrandfatheredTpsTireSize &&
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "v2.36.0";
1
+ export declare const version = "v2.36.2";
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.36.0';
5
+ exports.version = 'v2.36.2';
package/package.json CHANGED
@@ -91,5 +91,5 @@
91
91
  ],
92
92
  "testEnvironment": "node"
93
93
  },
94
- "version": "v2.36.0"
94
+ "version": "v2.36.2"
95
95
  }