@mark1russell7/stack-endurance 0.8.26 → 0.8.27

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.
@@ -1,5 +1,5 @@
1
1
  import { t as ENDURANCE_SCHEMA } from "./layer-a3Fr70Uh.js";
2
- import { CUT_BOUNDS, bandFault, curveFault, curveFault as curveFault$1, dayNumber, intervalFault, isCutBound, joinRecords, joinSetting, stopped } from "@mark1russell7/system-stack";
2
+ import { CUT_BOUNDS, bandFault, countsFault, curveFault, curveFault as curveFault$1, dayNumber, intervalFault, isCutBound, joinRecords, joinSetting, stopped } from "@mark1russell7/system-stack";
3
3
  import { ONE, ZERO, add, div, equals, fromFloat, mul, neg, sign, sub, toNumber } from "@mark1russell7/rational";
4
4
  import { solveLexicographic } from "@mark1russell7/linear";
5
5
  import { stronglyConnectedComponents } from "@mark1russell7/collections/graph";
@@ -1733,6 +1733,7 @@ function capacity(start, ways, shareAt, at = 0) {
1733
1733
  * A converter with a limit can take nothing: it is a source, for example a solar panel. Since 0.8.20 (M2-solar).
1734
1734
  * - `endurance-curve`: a survival curve does not start at `[0, 1]`, or it does not end at a chance of 0.
1735
1735
  * Or its days do not increase, or its chance increases.
1736
+ * Or the band or the counts of a cut do not agree with its curve (`bandFault`, `countsFault`), or the cut has them and no curve.
1736
1737
  * - `endurance-bound`: the bound of a cut is not a value of `CUT_BOUNDS` of the core. Since 0.8.4.
1737
1738
  * - `endurance-prior-case`: a prior names a case that the layer does not have.
1738
1739
  * - `endurance-cycle`: converters make a resource from itself, through one converter or a chain. One fault names each cycle.
@@ -1899,12 +1900,15 @@ function checkEndurance(layer, stack) {
1899
1900
  if (cut.duration === void 0) {
1900
1901
  add("warning", "endurance-cut-no-curve", at, `The cut "${at}" has no curve of its duration, so the draws that it can stop are no read.`);
1901
1902
  if (cut.band !== void 0) add("error", "endurance-curve", at, `The cut "${at}" has a band and no curve of its duration.`);
1903
+ if (cut.counts !== void 0) add("error", "endurance-curve", at, `The cut "${at}" has counts and no curve of its duration.`);
1902
1904
  continue;
1903
1905
  }
1904
1906
  const fault = curveFault$1(cut.duration);
1905
1907
  if (fault !== void 0) add("error", "endurance-curve", at, `The duration of the cut "${at}": ${fault}`);
1906
1908
  const band = cut.band === void 0 || fault !== void 0 ? void 0 : bandFault(cut.duration, cut.band);
1907
1909
  if (band !== void 0) add("error", "endurance-curve", at, `The band of the cut "${at}": ${band}`);
1910
+ const counts = cut.counts === void 0 || fault !== void 0 ? void 0 : countsFault(cut.duration, cut.counts);
1911
+ if (counts !== void 0) add("error", "endurance-curve", at, `The counts of the cut "${at}": ${counts}`);
1908
1912
  }
1909
1913
  for (const [need, factor] of Object.entries(item.factors ?? {})) range(`${item.case}/${need}`, "factor", factor);
1910
1914
  if (item.leadSeconds !== void 0) range(item.case, "lead time", item.leadSeconds);
@@ -2043,4 +2047,4 @@ function joinEndurance(pieces) {
2043
2047
  }
2044
2048
  export { deviceUse as A, fixStops as C, storeCapacities as D, seasonPlan as E, addTo as F, dense as I, exact as L, fewestRow as M, reachOf as N, Program as O, valueAt as P, deviceKey as R, firstStop as S, seasonJoint as T, seasonSupply as _, hasEnduranceError as a, storeAmounts as b, caseStopped as c, giftNeed as d, giftResource as f, monthlyShares as g, monthOf as h, curveFault as i, drawBlock as j, caseParts as k, drawDemand as l, monthEdges as m, ENDURANCE_CODES as n, SEASON_HORIZON_DAYS as o, hasSeason as p, checkEndurance as r, caseDraws as s, joinEndurance as t, enduranceOf as u, shareOf as v, seasonBest as w, fewestOpen as x, sowDays as y, isSource as z };
2045
2049
 
2046
- //# sourceMappingURL=join-BwTee3Ue.js.map
2050
+ //# sourceMappingURL=join-r5ht3vQ9.js.map