oltc-selector 1.2.9 → 2.0.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.
Files changed (3) hide show
  1. package/README.md +97 -91
  2. package/bin/oltc.js +731 -186
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,91 +1,97 @@
1
- # OLTC Selector / 有载开关选型
2
-
3
- 填工况,给出 2025 目录里**最低满足**的型号。网页和 `oltc` CLI 共用同一份 `selectOltc` 引擎。
4
-
5
- **CLI(无报价):** `npx -y oltc-selector@1.2.9`,命令是 `oltc`。Agent 技能包在独立仓库 [`erict16/huaming-oltc-selector`](https://github.com/erict16/huaming-oltc-selector)。
6
- **网页:** [oltc-selector.vercel.app](https://oltc-selector.vercel.app/) · [GitHub Pages](https://erict16.github.io/oltc-selector/)
7
-
8
- 私人辅助,不是厂家官网。型号是起点,出 OS 前要工程确认。
9
-
10
- ![工作台](docs/assets/readme.png)
11
-
12
- ## CLI
13
-
14
- 不需要 clone 本仓库。不输出人民币、系数、报价。
15
-
16
- ```bash
17
- npm i -g oltc-selector
18
-
19
- oltc --iu 350 --um 40.5 --conn D --reg W --pm 8
20
- # CV2III-350D/40.5-10193W
21
-
22
- oltc --octc --iu 800 --um 72.5 --conn D --series II --contact 6x5
23
- oltc --iu 600 --um 72.5 --conn Y --reg W --pm 8 --structure combined
24
- oltc --mva 25 --kv 110 --conn Y --reg W --pm 8
25
- ```
26
-
27
- | Flag | Meaning | Default |
28
- |------|---------|---------|
29
- | `--iu` / `--imax` | Max through-current Imax (A). **No** safety factor. | required unless `--mva` |
30
- | `--mva` `--kv` | Transformer MVA + tap-side kV → Imax (min tap + `--k`) | |
31
- | `--k` | Safety factor, **capacity path only** | 1.2 |
32
- | `--um` | Equipment Um (kV) | derived from `--kv` on MVA path |
33
- | `--ust` | Step voltage (V) | 0, or derived on MVA path |
34
- | `--conn Y\|D` | Switch star / delta (not Dyn11) | Y |
35
- | `--reg W\|G\|0` | Reversing / coarse-fine / linear | W |
36
- | `--pm` | ± steps | 8 |
37
- | `--octc` | Off-circuit 无载 (WSL/WSG) | on-load |
38
- | `--structure` | `auto` / `combined` 组合式 / `compound` 复合式 / `cage` 笼式 / `drum` 鼓式 | `auto` |
39
- | `--series` | OCTC wiring II IV V VI VII VIII | auto (Y→IV, D→II) |
40
- | `--mount` | `in-tank` / `on-tank` / `dry` | in-tank |
41
- | `--oil` / `--vacuum` | Switching medium | vacuum (on-load) |
42
- | `--contact` | OCTC contact e.g. `6x5` | |
43
- | `--json` | Machine output, still no prices | |
44
-
45
- `--structure auto` and omitting `--octc` match the web first paint: on-load, in-tank vacuum, minimum-adequate ranking.
46
-
47
- ## Selection rules
48
-
49
- 1. **Minimum-adequate, not SHZV-by-default.** Rank **CV2 → CM2 → SHZV → SDZV → SHZVG**. SDZV (dual-break, Ust 6000 V) only when SHZV step voltage or step capacity is short. Prefer one three-phase unit over `3×` singles when a brochure III type exists.
50
- 2. **OLTC existence comes from brochure / catalogue axes** (`lib/catalog.ts`), **not price-list Y/D twins**. A 2025 list row that prices `CM2III-…D` the same as Y does **not** make `CM2III-…D` a type.
51
- 3. **No CV2-500.** CV2 III currents are 350 and 600 only.
52
- 4. **No combined III-D.** CM / CM2 / CMD / SHZV / SDZV / SHZVG three-phase strings are star-point Y. Cover delta with `3x…I-` when that I type exists. Compound **CV / CV2 / SV** and on-tank **HWV** III-D **do** exist. No SDZV II, I-1200/1500, or III-1300.
53
- 5. **Compound has no selector grade letter.** No `CV2III-350Y/40.5B-…`. Combined in-tank may have B/C/D/DE after Um.
54
- 6. **WSL / WDL existence is 2025-list row keys without prices** (`lib/listIndex.data.json`). Missing rows (no `WSLIV-2000D/126`, no `7x6E` @ 72.5) are not emitted.
55
- 7. **WSG** is catalogue axes only (no 2025 list sheet in the index).
56
- 8. **Typing Imax (`--iu`) does not apply a safety factor.** `--k` only applies on the transformer-capacity (`--mva`) path.
57
-
58
- ## Web app
59
-
60
- 预选 66 / 110 / 220 kV 带常用工况。默认真变压器容量,星/角推出 Imax(最低分接和安全系数)。调压侧电压推出 Um。点「选型」之后才出型号。
61
-
62
- ```bash
63
- npm install
64
- npm run dev # http://127.0.0.1:3000
65
- npm test
66
- npm run pack:cli
67
- ```
68
-
69
- GitHub Pages:`npm run build:gh`(`GH_PAGES=true`)。Vercel 根路径,不要设 `GH_PAGES`。
70
-
71
- 内部看价仍在网页右上角「内部」(口令)。**CLI 包不含价表。** 本地 `.env.local`:
72
-
73
- ```
74
- NEXT_PUBLIC_ADMIN_PASSWORD_SHA256=<sha256 hex of the password>
75
- ```
76
-
77
- 语言:中文、English、Tiếng Việt、Español、Türkçe、Русский。
78
-
79
- ## OS regression
80
-
81
- `docs/replay/2025-os-sales.xlsx` and `2026-os-sales.xlsx` hold sold type plus duty (Imax, Um, Ust, ±, Y/D, phases, serial). Rebuild from JSON:
82
-
83
- ```bash
84
- python scripts/os-to-excel.py
85
- ```
86
-
87
- `npm test` runs shipped `selectOltc` on every complete row: no illegal type out; a legal sold type that covers the duty must appear in ranked results.
88
-
89
- ## 许可
90
-
91
- [条款](https://erict16.github.io/oltc-selector/terms/) · [隐私](https://erict16.github.io/oltc-selector/privacy/)。仅供参考。
1
+ # OLTC Selector / 有载开关选型
2
+
3
+ 填工况,给出 2025 目录里**最低满足**的型号。网页和 `oltc` CLI 共用同一份 `selectOltc` 引擎。
4
+
5
+ **CLI:** `npx -y oltc-selector@2.0.0`,命令是 `oltc`。Agent 技能包另放,不在这个仓库里。
6
+ **网页:** [oltc-selector.vercel.app](https://oltc-selector.vercel.app/) · [GitHub Pages](https://erict16.github.io/oltc-selector/)
7
+
8
+ 私人辅助,不是厂家官网。型号是起点,出 OS 前要工程确认。
9
+
10
+ ![工作台](docs/assets/readme.png)
11
+
12
+ ## CLI
13
+
14
+ 不需要 clone 本仓库。
15
+
16
+ ```bash
17
+ npm i -g oltc-selector
18
+
19
+ oltc --iu 350 --um 40.5 --conn D --reg W --pm 8
20
+ # CV2III-350D/40.5-10193W
21
+
22
+ oltc --octc --iu 800 --um 72.5 --conn D --series II --contact 6x5
23
+ oltc --iu 600 --um 72.5 --conn Y --reg W --pm 8 --structure combined
24
+ oltc --mva 25 --kv 110 --tap neutral --reg W --pm 8
25
+ oltc --mva 16 --kv 22 --tap line --winding star
26
+ # CV2III-600D/40.5-10193W
27
+
28
+ # Autotransformer tapped at the series/common junction (sized on the HV side)
29
+ oltc --mva 125 --kind auto --hv 225 --mv 115 --tap junction
30
+ # 3xCM2I-500/252D-10193W
31
+ ```
32
+
33
+ | Flag | Meaning | Default |
34
+ |------|---------|---------|
35
+ | `--iu` / `--imax` | Max through-current Imax (A). **No** safety factor. | required unless `--mva` |
36
+ | `--mva` `--kv` | Transformer MVA + tap-side kV → Imax (min tap + `--k`) | |
37
+ | `--k` | Safety factor ≥ 1, **capacity path only** | 1.0 |
38
+ | `--kind two\|auto` | Transformer kind (`--auto` = `--kind auto`) | two-winding |
39
+ | `--tap` | Where the OLTC sits: `neutral` / `line` (two-winding), `junction` / `mv-line` (autotransformer). Sets current, Ust and Um. | neutral |
40
+ | `--winding star\|delta` | Tapped winding connection (two-winding) | star |
41
+ | `--hv` `--mv` | Autotransformer HV / MV rated kV | |
42
+ | `--earth-um` | OLTC insulation to earth from the OS; overrides the rule | |
43
+ | `--um` | Equipment Um (kV) | derived from `--kv` on MVA path |
44
+ | `--ust` | Step voltage (V) | 0, or derived on MVA path |
45
+ | `--conn Y\|D` | Switch star / delta on the `--iu` path (with `--mva`, use `--tap`) | Y |
46
+ | `--reg W\|G\|0` | Reversing / coarse-fine / linear | W |
47
+ | `--pm` | ± steps | 8 |
48
+ | `--octc` | Off-circuit 无载 (WSL/WSG) | on-load |
49
+ | `--structure` | `auto` / `combined` 组合式 / `compound` 复合式 / `cage` 笼式 / `drum` 鼓式 | `auto` |
50
+ | `--series` | OCTC wiring II IV V VI VII VIII | auto is linear IV for Y and D |
51
+ | `--mount` | `in-tank` / `on-tank` / `dry` | in-tank |
52
+ | `--oil` / `--vacuum` | Switching medium | vacuum (on-load) |
53
+ | `--contact` | OCTC contact e.g. `6x5` | |
54
+ | `--json` | Machine output | |
55
+
56
+ `--structure auto` and omitting `--octc` match the web first paint: on-load, in-tank vacuum, minimum-adequate ranking.
57
+
58
+ ## Selection rules
59
+
60
+ 1. **Minimum-adequate, not SHZV-by-default.** Rank **CV2 → CM2 → SHZV → SDZV → SHZVG**. SDZV (dual-break, Ust 6000 V) only when SHZV step voltage or step capacity is short. Prefer one three-phase unit over `3×` singles when a brochure III type exists.
61
+ 2. **OLTC existence comes from brochure / catalogue axes** (`lib/catalog.ts`), **not price-list Y/D twins**. A 2025 list row that prices `CM2III-…D` the same as Y does **not** make `CM2III-…D` a type.
62
+ 3. **No CV2-500.** CV2 III currents are 350 and 600 only.
63
+ 4. **No combined III-D.** CM / CM2 / CMD / SHZV / SDZV / SHZVG three-phase strings are star-point Y. Cover delta with `3x…I-` when that I type exists. Compound **CV / CV2 / SV** and on-tank **HWV** III-D **do** exist. No SDZV II, I-1200/1500, or III-1300.
64
+ 5. **Compound has no selector grade letter.** No `CV2III-350Y/40.5B-…`. Combined in-tank may have B/C/D/DE after Um.
65
+ 6. **WSL / WDL existence is 2025-list row keys without prices** (`lib/listIndex.data.json`). Missing rows (no `WSLIV-2000D/126`, no `7x6E` @ 72.5) are not emitted.
66
+ 7. **WSG** is catalogue axes only (no 2025 list sheet in the index).
67
+ 8. **Typing Imax (`--iu`) does not apply a safety factor.** `--k` only applies on the transformer-capacity (`--mva`) path.
68
+ 9. **Um is set where the tap changer sits** (`lib/transformer.ts`). Line end: the winding system's class (132 kV → 145, 220 kV → 252). Neutral: the full class up to 72.5; above that 72.5 is assumed and flagged. Autotransformer: the HV system's class, combined types only (no CV / CV2 / SV).
69
+
70
+ ## Web app
71
+
72
+ 预选 66 / 110 / 220 kV 带常用工况。默认真变压器容量,星/角推出 Imax(最低分接和安全系数)。调压侧电压推出 Um。点「选型」之后才出型号。
73
+
74
+ ```bash
75
+ npm install
76
+ npm run dev # http://127.0.0.1:3000
77
+ npm test
78
+ npm run pack:cli
79
+ ```
80
+
81
+ GitHub Pages:`npm run build:gh`(`GH_PAGES=true`)。Vercel 根路径,不要设 `GH_PAGES`。
82
+
83
+ 语言:中文、English、Tiếng Việt、Español、Türkçe、Bahasa Indonesia。
84
+
85
+ ## OS regression
86
+
87
+ `docs/replay/2025-os-sales.xlsx` and `2026-os-sales.xlsx` hold sold type plus duty (Imax, Um, Ust, ±, Y/D, phases, serial). Rebuild from JSON:
88
+
89
+ ```bash
90
+ python scripts/os-to-excel.py
91
+ ```
92
+
93
+ `npm test` runs shipped `selectOltc` on every complete row: no illegal type out; a legal sold type that covers the duty must appear in ranked results.
94
+
95
+ ## 许可
96
+
97
+ [条款](https://erict16.github.io/oltc-selector/terms/) · [隐私](https://erict16.github.io/oltc-selector/privacy/)。仅供参考。