oltc-selector 2.3.2 → 2.4.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.
- package/README.md +1 -2
- package/bin/oltc.js +6 -24
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@ Output is in Chinese by default; `--lang en` gives English. Every run asks npm f
|
|
|
46
46
|
|------|---------|---------|
|
|
47
47
|
| `--line "text"` | Tender line: MVA, kV ratio with ±N×x%, vector group. Flags given beside it win. | |
|
|
48
48
|
| `--iu` / `--imax` | Max through-current Imax (A). **No** safety factor. | required unless `--mva` |
|
|
49
|
-
| `--mva` `--kv` | Transformer MVA + tap-side kV → Imax (min tap + `--k`). With `--iu`, `--kv` alone sets the winding voltage for the 220/330 kV
|
|
49
|
+
| `--mva` `--kv` | Transformer MVA + tap-side kV → Imax (min tap + `--k`). With `--iu`, `--kv` alone sets the winding voltage for the 220/330 kV rules | |
|
|
50
50
|
| `--k` | Safety factor ≥ 1, **capacity path only** | 1.0 |
|
|
51
51
|
| `--step-pct` | Step as a percent (1.25 means 1.25 %), capacity path only | 1.25 |
|
|
52
52
|
| `--os-imax` | Capacity path: the Imax the OS or maker states at the lowest tap (`--imax` beside `--mva` means this) | |
|
|
@@ -55,7 +55,6 @@ Output is in Chinese by default; `--lang en` gives English. Every run asks npm f
|
|
|
55
55
|
| `--winding star\|delta` | Tapped winding connection (two-winding) | star |
|
|
56
56
|
| `--hv` `--mv` | Autotransformer HV / MV rated kV | |
|
|
57
57
|
| `--earth-um` | OLTC insulation to earth from the OS; overrides the rule | |
|
|
58
|
-
| `--market` | Buyer's country for a neutral's assumed Um. Rules exist for `IT` and `TR`; another code prints a note and is not used | |
|
|
59
58
|
| `--across-li` `--across-ac` | Stated LI / AC withstand across the tap winding (kV): sets the selector grade B/C/D/DE | |
|
|
60
59
|
| `--um` | Equipment Um (kV) | derived from `--kv` if omitted |
|
|
61
60
|
| `--ust` | Step voltage (V) | 0, or derived on MVA path |
|
package/bin/oltc.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
// lib/appVersion.ts
|
|
4
|
-
var APP_VERSION = "2.
|
|
4
|
+
var APP_VERSION = "2.4.0";
|
|
5
5
|
|
|
6
6
|
// lib/decimal.ts
|
|
7
7
|
var GROUPED = /^\d{1,3}([,,]\d{3})+$/;
|
|
@@ -4155,12 +4155,9 @@ function parseCliArgs(rawArgv) {
|
|
|
4155
4155
|
continue;
|
|
4156
4156
|
}
|
|
4157
4157
|
if (a === "--market") {
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
out.market = v.toUpperCase();
|
|
4162
|
-
i = n;
|
|
4163
|
-
continue;
|
|
4158
|
+
throw new CliError(
|
|
4159
|
+
"--market is removed. State the insulation to earth with --earth-um, and the across-tap levels with --across-li / --across-ac."
|
|
4160
|
+
);
|
|
4164
4161
|
}
|
|
4165
4162
|
if (a === "--across-li" || a === "--across-ac") {
|
|
4166
4163
|
const key = a === "--across-li" ? "acrossLi" : "acrossAc";
|
|
@@ -4539,7 +4536,7 @@ Flags:
|
|
|
4539
4536
|
--line="\u2026" keeps a line that starts with a dash.
|
|
4540
4537
|
--mva MVA --kv kV Capacity path: Imax from rated I, minus steps, --step-pct, --k
|
|
4541
4538
|
With --iu, --kv alone gives the winding voltage (220 kV
|
|
4542
|
-
combined-only, 330 kV grade
|
|
4539
|
+
combined-only, 330 kV grade) and Um if omitted.
|
|
4543
4540
|
--kind two|auto Transformer kind (--auto = --kind auto). Default two-winding.
|
|
4544
4541
|
--tap P Where the OLTC sits: neutral|line (two-winding),
|
|
4545
4542
|
junction|mv-line (autotransformer, series/common junction
|
|
@@ -4551,9 +4548,6 @@ Flags:
|
|
|
4551
4548
|
--earth-um kV OLTC insulation to earth from the OS or maker (catalogue
|
|
4552
4549
|
class). Overrides the rule: line end = winding system,
|
|
4553
4550
|
neutral \u226472.5 full else 72.5 assumed, autotransformer = HV.
|
|
4554
|
-
--market CC Buyer's country for a neutral's assumed Um: IT (line
|
|
4555
|
-
class up to 252), TR (126 on 220 kV class and above).
|
|
4556
|
-
Needs --kv (or --mva/--kv).
|
|
4557
4551
|
--um kV Equipment Um (OLTC). With --kv, derived if omitted.
|
|
4558
4552
|
--ust V Step voltage. With --mva/--kv/--step-pct, derived if omitted;
|
|
4559
4553
|
given, it is the OS figure and a floor (never lowers Ust).
|
|
@@ -4683,8 +4677,7 @@ function computeCliDuty(args) {
|
|
|
4683
4677
|
...earth != null ? { earthUmKv: earth } : {},
|
|
4684
4678
|
...args.osImax != null && args.osImax > 0 ? { statedMaxA: args.osImax } : {},
|
|
4685
4679
|
// --ust used to replace Ust after deriveDuty: basis.stepV disagreed (D3).
|
|
4686
|
-
...args.ust != null && args.ust > 0 ? { statedStepV: args.ust } : {}
|
|
4687
|
-
...args.market ? { market: args.market } : {}
|
|
4680
|
+
...args.ust != null && args.ust > 0 ? { statedStepV: args.ust } : {}
|
|
4688
4681
|
});
|
|
4689
4682
|
}
|
|
4690
4683
|
function checkConflicts(args) {
|
|
@@ -4767,9 +4760,6 @@ function cliToSelectInput(args) {
|
|
|
4767
4760
|
if (args.stepPct != null && args.mva == null) {
|
|
4768
4761
|
throw new CliError("--step-pct needs --mva/--kv; give --ust on the --iu path");
|
|
4769
4762
|
}
|
|
4770
|
-
if (args.market && args.mva == null && !iuHasVoltage(args)) {
|
|
4771
|
-
throw new CliError("--market needs the winding voltage: add --kv (or --mva/--kv)");
|
|
4772
|
-
}
|
|
4773
4763
|
const duty = cliDuty(args);
|
|
4774
4764
|
let conn = args.conn;
|
|
4775
4765
|
if (duty && args.mva != null) {
|
|
@@ -4806,7 +4796,6 @@ function cliToSelectInput(args) {
|
|
|
4806
4796
|
...duty?.combinedOnly ? { combinedOnly: true } : {},
|
|
4807
4797
|
...duty?.ok && args.kind !== "auto" ? { tapWindingKv: duty.umSystemKv } : {},
|
|
4808
4798
|
// 2026-11-04 r3 ORDERS-11: buyer practice on the grade (TR 72.5C neutrals).
|
|
4809
|
-
...args.market ? { market: args.market } : {},
|
|
4810
4799
|
throughCurrentA: iu,
|
|
4811
4800
|
umKv: um,
|
|
4812
4801
|
stepVoltageV: ust,
|
|
@@ -4871,7 +4860,6 @@ function assumptionsFromArgs(args, family) {
|
|
|
4871
4860
|
items.push(`\u5BF9\u5730 Um ${args.earthUm}\uFF08\u62DB\u6807\u884C\u4E2D\u6027\u70B9 BIL ${args.line.neutralBilKv} kV\uFF09`);
|
|
4872
4861
|
}
|
|
4873
4862
|
if (duty?.umAssumed) items.push(`\u5BF9\u5730 Um ${duty.umKv}\uFF08\u672A\u6307\u5B9A\uFF09`);
|
|
4874
|
-
if (args.market) items.push(`\u5E02\u573A=${args.market}`);
|
|
4875
4863
|
} else {
|
|
4876
4864
|
const conn = cliConnection(args);
|
|
4877
4865
|
const derived = tapSetsConnection(args);
|
|
@@ -4986,7 +4974,6 @@ var ASSUMPTION_EN = [
|
|
|
4986
4974
|
[/^调压绕组 /, "tapped winding "],
|
|
4987
4975
|
[/^调压范围 /, "range "],
|
|
4988
4976
|
["\u5BF9\u5730 Um", "Um to earth"],
|
|
4989
|
-
["\u5E02\u573A=", "market="],
|
|
4990
4977
|
["\u661F\u70B9", "star point"],
|
|
4991
4978
|
["\u7EBF\u7AEF", "line end"],
|
|
4992
4979
|
["\u4E2D\u6027\u70B9", "neutral"],
|
|
@@ -5052,11 +5039,6 @@ function cliNotes(args, input, primaryUmKv, en, engineNotes = []) {
|
|
|
5052
5039
|
en ? `Um ${input.umKv} kV is not a class of this type: sized at Um ${primaryUmKv} kV.` : `Um ${input.umKv} kV \u4E0D\u662F\u8BE5\u578B\u53F7\u7684\u7535\u538B\u7B49\u7EA7\uFF0C\u6309 Um ${primaryUmKv} kV \u9009\u3002`
|
|
5053
5040
|
);
|
|
5054
5041
|
}
|
|
5055
|
-
if (args.market && args.market !== "IT" && args.market !== "TR") {
|
|
5056
|
-
notes.push(
|
|
5057
|
-
en ? `--market ${args.market} has no rule (IT and TR only): not used.` : `--market ${args.market} \u6CA1\u6709\u5BF9\u5E94\u89C4\u5219\uFF08\u53EA\u6709 IT\u3001TR\uFF09\uFF0C\u672A\u4F7F\u7528\u3002`
|
|
5058
|
-
);
|
|
5059
|
-
}
|
|
5060
5042
|
return notes;
|
|
5061
5043
|
}
|
|
5062
5044
|
function lineKindLabel(t, en) {
|