@operato/twin-figure-capabilities 0.0.0-stage → 0.5.3
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/dist/entity.d.ts +59 -0
- package/dist/entity.js +101 -0
- package/dist/generate.d.ts +56 -0
- package/dist/generate.js +104 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +13 -0
- package/dist/mobile.d.ts +1 -0
- package/dist/mobile.js +19 -0
- package/dist/module.d.ts +8 -0
- package/dist/module.js +16 -0
- package/dist/operable.d.ts +1 -0
- package/dist/operable.js +20 -0
- package/dist/storable.d.ts +30 -0
- package/dist/storable.js +49 -0
- package/dist/twin-capabilities.module.mjs +1472 -0
- package/dist/values.d.ts +16 -0
- package/dist/values.js +34 -0
- package/dist/words.d.ts +13 -0
- package/dist/words.js +42 -0
- package/package.json +43 -4
- package/README.md +0 -3
|
@@ -0,0 +1,1472 @@
|
|
|
1
|
+
// ../ops-contract/dist/capability.js
|
|
2
|
+
var CAPABILITIES = {
|
|
3
|
+
operable: {
|
|
4
|
+
key: "operable",
|
|
5
|
+
label: "twin.capability.operable",
|
|
6
|
+
semantics: "\uB2A5\uB3D9 \uC790\uC6D0\uC758 \uC6B4\uC601 \uC0C1\uD0DC(\uC720\uD734/\uAC00\uB3D9/\uACE0\uC7A5). status \uAD50\uCC28 \uAD00\uC2EC\uC0AC\uB97C \uC5EC\uAE30 \uD558\uB098\uB85C.",
|
|
7
|
+
commands: ["resource.hold", "resource.resume", "resource.down", "resource.repair", "resource.reset-metrics"],
|
|
8
|
+
stateFields: ["status"],
|
|
9
|
+
results: ["statusChanged"]
|
|
10
|
+
},
|
|
11
|
+
storable: {
|
|
12
|
+
key: "storable",
|
|
13
|
+
label: "twin.capability.storable",
|
|
14
|
+
semantics: "\uC544\uC774\uD15C\uC744 \uBCF4\uC720\uD558\uB294 \uC704\uCE58 \u2014 \uC810\uC720/\uC6A9\uB7C9. (\uC52C \uAE30\uC81C: Capacity)",
|
|
15
|
+
commands: [],
|
|
16
|
+
stateFields: ["occupancy", "capacity"],
|
|
17
|
+
invariants: ["0 <= occupancy <= capacity (capacity>0)"],
|
|
18
|
+
results: ["occupancyChanged"]
|
|
19
|
+
},
|
|
20
|
+
mobile: {
|
|
21
|
+
key: "mobile",
|
|
22
|
+
label: "twin.capability.mobile",
|
|
23
|
+
semantics: "\uC790\uC6D0 \uC790\uC2E0\uC774 \uC790\uB9AC \uAC04 \uC774\uB3D9. Transferable(\uC544\uC774\uD15C \uC774\uB3D9)\uACFC \uB2E4\uB984. (\uC52C \uAE30\uC81C: CarrierLine)",
|
|
24
|
+
commands: [],
|
|
25
|
+
stateFields: ["location", "motion"],
|
|
26
|
+
models: ["Motion"],
|
|
27
|
+
results: ["moved", "motionTick"]
|
|
28
|
+
},
|
|
29
|
+
processable: {
|
|
30
|
+
key: "processable",
|
|
31
|
+
label: "twin.capability.processable",
|
|
32
|
+
semantics: "\uBCC0\uD658/\uAC00\uACF5 \uC218\uD589 \u2014 \uC0B0\uCD9C(\uC591\uD488/\uBD88\uB7C9). \uC6B4\uC601 status \uB294 Operable \uC870\uD569. progress \uBC29\uCD9C\uC740 \uD6C4\uC18D.",
|
|
33
|
+
commands: [],
|
|
34
|
+
stateFields: ["output"],
|
|
35
|
+
results: ["completed"]
|
|
36
|
+
},
|
|
37
|
+
/*
|
|
38
|
+
* ── 「위치를 읽는다」 ≠ 「조작할 수 있다」 (2026-08-14) ─────────────────────
|
|
39
|
+
* 차단기는 이 둘이 갈리는 자리다. 상태를 읽어 계통 구성을 알지만 **우리는 조작하지 않는다**
|
|
40
|
+
* (안전 계통은 범위 밖: profiles/ems.md §1). 그런데 능력을 `operable` 로 주면 저작면이 그 설비에
|
|
41
|
+
* **제어 컴포넌트를 권한다** — 화면이 우리가 하지 않기로 한 것을 하라고 부추긴다.
|
|
42
|
+
*
|
|
43
|
+
* 그래서 개폐 기기의 관측을 따로 세운다. 이름을 `observable` 로 하지 않은 이유: 그러면 상태 필드가
|
|
44
|
+
* `status` 여야 하고 그건 `operable` 의 것이다(원칙 ② 직교). 없는 필드를 지어내는 대신 **표준이 주는
|
|
45
|
+
* 이름**을 쓴다 — 개폐 기기의 관측은 `Pos`(위치)다.
|
|
46
|
+
*
|
|
47
|
+
* `operable` 은 그대로 「명령을 받는 능동 자원」의 자리로 남는다.
|
|
48
|
+
*/
|
|
49
|
+
switching: {
|
|
50
|
+
key: "switching",
|
|
51
|
+
label: "twin.capability.switching",
|
|
52
|
+
semantics: "\uD68C\uB85C\uB97C \uC5F4\uACE0 \uB2EB\uB294 \uAE30\uAE30\uC758 **\uC704\uCE58\uB97C \uC77D\uB294\uB2E4** \u2014 \uC6B0\uB9AC\uB294 \uC870\uC791\uD558\uC9C0 \uC54A\uB294\uB2E4(\uBA85\uB839 \uC5C6\uC74C). IEC 61850 XCBR/XSWI Pos.",
|
|
53
|
+
commands: [],
|
|
54
|
+
stateFields: ["position"],
|
|
55
|
+
models: ["SwitchingState"],
|
|
56
|
+
results: ["positionChanged"]
|
|
57
|
+
},
|
|
58
|
+
trackable: {
|
|
59
|
+
key: "trackable",
|
|
60
|
+
label: "twin.capability.trackable",
|
|
61
|
+
semantics: "\uC624\uB354/\uC544\uC774\uD15C \uC0DD\uC560 \uCD94\uC801 \u2014 \uC0DD\uC560\uB2E8\uACC4(\uB3C4\uBA54\uC778 \uB77C\uBCA8, \uBB34\uBC29\uC5B8)\xB7\uC9C4\uD589\xB7\uBCF4\uB958.",
|
|
62
|
+
commands: ["order.hold", "order.resume", "order.release"],
|
|
63
|
+
stateFields: ["lifecycle", "progress", "held"],
|
|
64
|
+
results: ["lifecycleChanged"]
|
|
65
|
+
},
|
|
66
|
+
/*
|
|
67
|
+
* ── 에너지 능력 넷 ──────────────────────────────────────────────────────
|
|
68
|
+
* 상태 필드는 기존 능력과 **직교**한다(원칙 ②) — 어느 필드도 두 능력에 겹치지 않는다.
|
|
69
|
+
* 계량은 `operable`(가동 상태)과도 직교한다: 도는 것과 재는 것은 다른 사실이고, 멈춘 설비도
|
|
70
|
+
* 대기전력을 쓴다.
|
|
71
|
+
*/
|
|
72
|
+
metered: {
|
|
73
|
+
key: "metered",
|
|
74
|
+
label: "twin.capability.metered",
|
|
75
|
+
semantics: "\uC790\uAE30 \uC18C\uBE44\uB97C \uC7B0\uB2E4 \u2014 \uC720\uD6A8\uC804\uB825\xB7\uB204\uC801\uB7C9\xB7\uC5ED\uB960. \uAC12\uC774 \uC5C6\uC73C\uBA74 \uBAA8\uB974\uB294 \uAC83\uC774\uB2E4(0 \uC774 \uC544\uB2C8\uB2E4).",
|
|
76
|
+
commands: [],
|
|
77
|
+
stateFields: ["kW", "kWh", "powerFactor"],
|
|
78
|
+
models: ["MeteredState"],
|
|
79
|
+
results: ["measured"]
|
|
80
|
+
},
|
|
81
|
+
curtailable: {
|
|
82
|
+
key: "curtailable",
|
|
83
|
+
label: "twin.capability.curtailable",
|
|
84
|
+
semantics: "\uC904\uC77C \uC218 \uC788\uB2E4 \u2014 \uCD5C\uC18C \uC720\uC9C0 \uC544\uB798\uB85C\uB294 \uB0B4\uB9AC\uC9C0 \uC54A\uB294\uB2E4. \uD310\uC815\uB9CC \uD558\uACE0 \uC9D1\uD589\uC740 \uC0AC\uB78C\uACFC \uADF8 \uC2DC\uC2A4\uD15C\uC758 \uBAAB\uC774\uB2E4.",
|
|
85
|
+
commands: [],
|
|
86
|
+
stateFields: ["curtailable", "minKW"],
|
|
87
|
+
models: ["CurtailableState"],
|
|
88
|
+
invariants: ["minKW >= 0"],
|
|
89
|
+
results: ["drSuggested"]
|
|
90
|
+
},
|
|
91
|
+
energyGenerating: {
|
|
92
|
+
key: "energyGenerating",
|
|
93
|
+
label: "twin.capability.energyGenerating",
|
|
94
|
+
semantics: "\uC804\uAE30\uB97C \uB9CC\uB4E0\uB2E4 \u2014 \uC5ED\uC1A1\uC740 \uC18C\uBE44\uC758 \uC74C\uC218\uAC00 \uC544\uB2C8\uB77C \uBCC4\uAC1C \uC0AC\uC2E4\uC774\uB2E4.",
|
|
95
|
+
commands: [],
|
|
96
|
+
/*
|
|
97
|
+
* ── 적산을 더한다 (2026-08-26) ─────────────────────────────────────────────
|
|
98
|
+
* 이 능력이 순시 출력만 선언하고 있었다. 그래서 「지금 발전 중」은 말하고 「얼마나 발전했나」는 말할
|
|
99
|
+
* 수 없었다 — 사건 이름(`energy.generated`)과 설계 문서에는 처음부터 있던 사실이다.
|
|
100
|
+
*
|
|
101
|
+
* 계량 능력(`metered`)이 `kW` 와 `kWh` 를 함께 선언한 것과 같은 짝이다. 적산은 발전 설비의 보편적
|
|
102
|
+
* 사실이고(태양광·열병합·디젤), 그것이 없으면 성능비·발전시간 같은 성과를 아무도 셀 수 없다.
|
|
103
|
+
*/
|
|
104
|
+
stateFields: ["generatedKW", "exportKW", "generatedKWh", "generatedKWhResetAt", "generatedKWhSince", "generatedKWhBasis", "generatedKWhAccumulation", "generatedKWhLastPeriod", "generatedKWhLastPeriodEnd", "generatedKWhLastPeriodObservedFrom", "generatedKWhLastPeriodObservedTo", "dcVoltage", "dcCurrent", "acVoltage", "acCurrent"],
|
|
105
|
+
models: ["GeneratingState"],
|
|
106
|
+
results: ["generated"]
|
|
107
|
+
},
|
|
108
|
+
/*
|
|
109
|
+
* ── 왜 `storing` 이 아니라 `energyStoring` 인가 (2026-08-15) ────────────────
|
|
110
|
+
* 같은 카탈로그에 `storable`(물건을 담는 자리)이 있다. 전기를 담는 것과 물건을 담는 것이 한 글자
|
|
111
|
+
* 차이로 붙어 있어서, 컴포넌트를 만들 때 `twin-storage` 를 피해 `twin-storage-energy` 로 도망쳤다 —
|
|
112
|
+
* 한 이름을 두 번 피해 갔다면 그 이름이 틀린 것이다.
|
|
113
|
+
*
|
|
114
|
+
* 도메인(EMS)이 아니라 **양(에너지)** 을 이름에 넣는다. 그래서 MES 트윈 안의 디젤 발전기도 그대로
|
|
115
|
+
* `energyGenerating` 이다 — 능력은 도메인이 아니라 관측의 면이다(방언 없음).
|
|
116
|
+
*/
|
|
117
|
+
energyStoring: {
|
|
118
|
+
key: "energyStoring",
|
|
119
|
+
label: "twin.capability.energyStoring",
|
|
120
|
+
semantics: "\uB2F4\uACE0 \uB0B8\uB2E4 \u2014 \uCDA9\uC804\uACFC \uBC29\uC804\uC744 \uB098\uB208\uB2E4(\uC190\uC2E4\xB7\uC218\uBA85 \uD310\uB2E8\uC774 \uB458\uC744 \uAD6C\uBCC4\uD574\uC57C \uD55C\uB2E4).",
|
|
121
|
+
commands: [],
|
|
122
|
+
stateFields: ["soc", "chargeKW", "dischargeKW"],
|
|
123
|
+
models: ["StoringState"],
|
|
124
|
+
invariants: ["0 <= soc <= 100"],
|
|
125
|
+
results: ["stored", "discharged"]
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
// ../ops-contract/dist/contract.js
|
|
130
|
+
var MATERIAL_LOT_USE = ["allowed", "blocked"];
|
|
131
|
+
var DISPOSITION_DECISION = [
|
|
132
|
+
/** 원 규격으로 되돌린다 — 공정에 다시 들어가고, 산출물은 원 품목이다. */
|
|
133
|
+
"rework",
|
|
134
|
+
/**
|
|
135
|
+
* 쓸 수 있게 만들되 **원 규격은 아니다** — 공정에 다시 들어가지만 산출물이 원 품목이 아니다.
|
|
136
|
+
*
|
|
137
|
+
* `rework` 와 나눈 이유는 이름이 아니라 **효과**다. 되돌린 것과 고쳐 쓴 것은 산출물의 정체성이
|
|
138
|
+
* 다르고, 그것을 한 낱말로 묶으면 계보가 「원 품목을 만들었다」고 거짓을 말한다.
|
|
139
|
+
*/
|
|
140
|
+
"repair",
|
|
141
|
+
/** 그대로 쓴다 — 공정도 정체성도 바뀌지 않는다. */
|
|
142
|
+
"use-as-is",
|
|
143
|
+
/**
|
|
144
|
+
* **등급을 내려 다른 품목으로 판다** — 공정에 다시 들어가지 않고, 그 자리에서 품목 정의가 바뀐다.
|
|
145
|
+
*
|
|
146
|
+
* 다른 넷과 축이 다르다. 폐기도 특채도 아니고 **자재의 품목 자체가 달라진다**(GTIN 이 바뀐다).
|
|
147
|
+
* 식품·철강·섬유에서 일상이다.
|
|
148
|
+
*/
|
|
149
|
+
"regrade",
|
|
150
|
+
/** 재고에서 뺀다. */
|
|
151
|
+
"scrap",
|
|
152
|
+
/** 공급자에게 돌려보낸다 — 재고에서 빠지되 폐기와 다른 사실이다. */
|
|
153
|
+
"return-to-supplier",
|
|
154
|
+
/** 아직 정하지 않았다 — 묶어 두고 쓰지 않는다. */
|
|
155
|
+
"hold"
|
|
156
|
+
];
|
|
157
|
+
var PRIORITY_UNSET = Number.POSITIVE_INFINITY;
|
|
158
|
+
var OP_EVENT = {
|
|
159
|
+
task: "task.status",
|
|
160
|
+
equipment: "equipment.status",
|
|
161
|
+
/** 사람 상태 전이 — 설비와 별개 채널(어휘가 다르다: 고장이 아니라 교대·투입). */
|
|
162
|
+
person: "person.status",
|
|
163
|
+
/** 물리 자산 상태 전이 — 어디 있나·무엇을 싣고 있나(빈 팔레트인가). */
|
|
164
|
+
asset: "asset.status",
|
|
165
|
+
order: "order.status",
|
|
166
|
+
quality: "quality.output",
|
|
167
|
+
// 품질 산출(양품/불량) — OEE quality 입력. live 누적기가 이걸로 good/scrap 정확 추적.
|
|
168
|
+
/**
|
|
169
|
+
* **시험 결과** — 어느 대상을 어느 기준으로 재고 판정했나.
|
|
170
|
+
*
|
|
171
|
+
* `quality.output` 과 **다른 사실이다.** 그것은 생산의 양품·불량 수(가동률 입력)이고, 이것은 선언된
|
|
172
|
+
* 기준에 대한 검사 판정이다. 한 낱말이 두 일을 하면 어느 쪽 어휘도 옳지 않게 된다.
|
|
173
|
+
*
|
|
174
|
+
* **대상을 가리킨다**(`testableObjectId`) — 표준 `TestResult.TestableObjectID` 그대로. 로트·설비·
|
|
175
|
+
* 사람·자리에 두루 쓰이므로 주체를 이름에 넣지 않았다.
|
|
176
|
+
*
|
|
177
|
+
* 이 채널이 없으면 시험 결과는 **상태에만 있는 축**이 된다 — 재기동에서 사라지고, 폴드가 되살릴 수
|
|
178
|
+
* 없고, 미러가 이어받지 못한다(§상태 ⊆ 이벤트).
|
|
179
|
+
*/
|
|
180
|
+
/**
|
|
181
|
+
* **마감된 설비 상태 구간** — 이 설비가 이 구간 동안 이 상태였다.
|
|
182
|
+
*
|
|
183
|
+
* 시점의 전이(`equipment.status`)와 다른 사실이다. 전이는 설비가 내고, 이것은 **사람이 나중에
|
|
184
|
+
* 적는다.** 자재 대기처럼 신호를 내지 않는 정지는 이 길로만 들어온다.
|
|
185
|
+
*
|
|
186
|
+
* ISO 22400-2 의 가동률 계산이 이 구간들을 읽는다.
|
|
187
|
+
*/
|
|
188
|
+
equipmentPeriod: "equipment.state.period",
|
|
189
|
+
test: "test.result",
|
|
190
|
+
/**
|
|
191
|
+
* **부적합 처분** — 재고 판정을 받은 것을 어떻게 하기로 정했나(재작업 · 특채 · 폐기 · 반품).
|
|
192
|
+
*
|
|
193
|
+
* ── 판정과 다른 사실이다 (2026-08-30) ─────────────────────────────────────
|
|
194
|
+
* `test.result` 에 필드로 붙이지 않는다. 셋 중 둘을 표현할 수 없게 되기 때문이다.
|
|
195
|
+
*
|
|
196
|
+
* 한 판정에 처분이 여럿 일부는 재작업하고 일부는 폐기한다
|
|
197
|
+
* 처분 없는 판정 기록만 하고 결정은 나중에 한다
|
|
198
|
+
* 판정 없는 처분 현장 재량으로 뺀다
|
|
199
|
+
*
|
|
200
|
+
* ── 왜 커널이 아는가 ──────────────────────────────────────────────────────
|
|
201
|
+
* 처분은 **자원에 효과를 준다.** 재작업은 자재를 다시 공정에 넣고, 폐기는 재고에서 뺀다. 효과를 주는
|
|
202
|
+
* 사실은 커널 1급이다.
|
|
203
|
+
*
|
|
204
|
+
* EPCIS 의 `disposition` 과 헷갈리지 않는다 — 그것은 **개체의 상태**(`damaged`·`destroyed`)이고
|
|
205
|
+
* 이것은 **결정**이다. 누가·언제·왜 그렇게 정했는지의 자리는 그쪽에 없다.
|
|
206
|
+
*/
|
|
207
|
+
disposition: "nonconformance.disposition",
|
|
208
|
+
/**
|
|
209
|
+
* **로트 상태** — ISA-95 `MaterialLot.Status`(B2MML-Material.xsd). 「이 로트가 지금 어떤 것이냐」의 결정.
|
|
210
|
+
*
|
|
211
|
+
* ── `nonconformance.disposition` 과 다른 사실이다 (2026-09-16) ──────────────
|
|
212
|
+
* 그것은 표준 `Disposition` — **부적합을 어떻게 처리하나**(재작업·특채·폐기). 이것은 표준 `Status` — 적합한
|
|
213
|
+
* 로트에도 붙는 상태(released · quarantine · on-hold …). 출하 승인(batch release)이 이 축이다. 처분에 실으면
|
|
214
|
+
* 정상 출하가 전부 부적합 이력이 된다 — 진짜 term 을 틀린 뜻으로 쓰는 것이 자리가 없는 것보다 나쁘다.
|
|
215
|
+
*
|
|
216
|
+
* ── 낱말은 열려 있고, **효과는 닫혀 있다** (2026-09-19, ADR-0080 결정 2) ────
|
|
217
|
+
* `status` 는 도메인이 소유한다 — 오더 상태와 같은 규율이다. 커널은 그 낱말로 계산하지 않는다.
|
|
218
|
+
*
|
|
219
|
+
* 계산하는 것은 **`use`** 다(§`MATERIAL_LOT_USE`): 닫힌 둘이고, 「이 로트를 쓸 수 있나」만 말한다.
|
|
220
|
+
* 낱말을 읽어 효과를 정하면 현장이 `quarantine` · `검사대기` 를 쓰는 날 조용히 새기 때문이다 —
|
|
221
|
+
* 자원 속성에서 이미 선 원칙 그대로다(속성은 열리고 효과는 닫힌다). 둘은 같은 레코드에 함께 오고,
|
|
222
|
+
* 그 낱말의 주인이 짝을 정한다.
|
|
223
|
+
*
|
|
224
|
+
* ── 출발과 다른 사실이다 ─────────────────────────────────────────────────
|
|
225
|
+
* 승인은 자재를 움직이지 않는다. 자재가 트윈 밖으로 나가는 것은 EPCIS `shipping` 사건이다. 둘을 한 사건으로
|
|
226
|
+
* 접지 않는다 — 승인됐는데 안 나간 배치가 트윈이 보여야 할 상태다.
|
|
227
|
+
*/
|
|
228
|
+
materialLot: "material-lot.status",
|
|
229
|
+
// 레코드: { lotId(표준 MaterialLotID = ItemState.epc 의 값), status, use?, decidedBy?, reason?, decidedAt? }
|
|
230
|
+
/**
|
|
231
|
+
* **이 목록이 전부다** — 연결된 시스템이 현재 목록을 한 바퀴 다 보낸 뒤 그것을 알린다.
|
|
232
|
+
*
|
|
233
|
+
* ── 왜 필요한가 (2026-08-25 실측) ────────────────────────────────────────
|
|
234
|
+
* 연결된 시스템은 매 주기 현재 재고를 전부 보낸다. 그런데 트윈은 그것을 낱낱의 관측으로 받아
|
|
235
|
+
* **더하기만 했다.** 「그리고 이것 말고는 없다」를 받는 곳이 없어서, 목록에서 빠진 줄은 아무 말도
|
|
236
|
+
* 오지 않은 것이 되고 트윈에 영원히 남았다.
|
|
237
|
+
*
|
|
238
|
+
* 실측: 실제 재고 1,704건인데 트윈이 10,038건을 갖고 있었다.
|
|
239
|
+
*
|
|
240
|
+
* ── 왜 「사라진 것을 알려 주기」가 아니라 이 방식인가 ──────────────────────
|
|
241
|
+
* 연결 쪽이 앞 주기와 비교해 사라진 줄을 찾아 알리는 방법도 있다. 그런데 그것은 **하나 빠뜨리면
|
|
242
|
+
* 그 줄이 영원히 남는다.** 이 방식은 주기마다 스스로 바로잡는다 — 이미 잘못 쌓인 것도 다음 주기에
|
|
243
|
+
* 사라진다.
|
|
244
|
+
*
|
|
245
|
+
* ── 보내는 쪽이 지킬 것 ─────────────────────────────────────────────────
|
|
246
|
+
* **끝까지 읽었을 때만 보낸다.** 읽다가 끊긴 주기에 이것을 보내면 **살아 있는 재고를 지운다.**
|
|
247
|
+
* 그리고 `since` 는 그 주기를 **시작한** 시각이다(끝낸 시각이 아니다) — 주기 도중에 들어온 관측이
|
|
248
|
+
* 지워지지 않아야 한다.
|
|
249
|
+
*/
|
|
250
|
+
complete: "axis.complete",
|
|
251
|
+
/**
|
|
252
|
+
* 주목 신호 확인(ack) — **사람이 한 행위**라 파생될 수 없다.
|
|
253
|
+
*
|
|
254
|
+
* 다른 파생 상태는 상태에서 다시 계산된다(주목 신호 자체가 그렇다). 그런데 "누가 이것을 봤다" 는
|
|
255
|
+
* 계산으로 되살릴 수 없다. 저널에 남기지 않으면 재기동하면 확인해 둔 신호가 다시 빨개지고,
|
|
256
|
+
* 과거를 다시 계산해도 그때 무엇을 확인했는지 알 수 없다 — 저널이 현실을 불완전하게 담는 자리였다.
|
|
257
|
+
*/
|
|
258
|
+
/*
|
|
259
|
+
* 값이 커맨드(`CMD.attentionAck='attention.ack'`)와 겹치지 않게 **과거형**으로 둔다 — 커맨드는
|
|
260
|
+
* "확인해라"(요청)이고 이벤트는 "확인했다"(사실)다. 같은 문자열을 쓰면 저널에서 요청과 사실이
|
|
261
|
+
* 구별되지 않는다.
|
|
262
|
+
*/
|
|
263
|
+
attentionAck: "attention.acked",
|
|
264
|
+
/**
|
|
265
|
+
* **자리에서 관측된 물리량** — 냉장실 온도·습도, 세척수 유량 같은 것(§`LocationObservation`).
|
|
266
|
+
*
|
|
267
|
+
* ── 왜 채널이 필요한가 ────────────────────────────────────────────────────
|
|
268
|
+
* `LocationState.observations` 를 상태에 두었는데 그것을 낳는 사건이 없었다. 그러면 **상태 ⊆ 이벤트**
|
|
269
|
+
* 가 깨진다: 채워도 재기동에서 사라지고, 폴드가 되살릴 수 없고, 미러가 이어받을 수도 없다. 상태에만
|
|
270
|
+
* 있는 축은 조용히 사라지는 축이다.
|
|
271
|
+
*
|
|
272
|
+
* 이름을 `energy.measured` 와 같은 결로 둔다 — 그쪽이 에너지 계량의 도착이고 이쪽이 그 일반형이다.
|
|
273
|
+
* 두 채널을 합치지 않는 이유는 에너지 쪽이 **구간에 누적되는 표본**이라 처리가 다르기 때문이다.
|
|
274
|
+
*/
|
|
275
|
+
observation: "location.measured"
|
|
276
|
+
};
|
|
277
|
+
var EQUIPMENT_STATUS = ["busy", "setup", "down", "idle", "planned-stop"];
|
|
278
|
+
var PERSON_STATUS = ["idle", "busy"];
|
|
279
|
+
var ASSET_STATUS = ["idle", "in-use"];
|
|
280
|
+
var MATERIAL_ACTUAL_USE = ["consumed", "produced"];
|
|
281
|
+
var BASIS_UNKNOWN = ["BEFORE_BASELINE"];
|
|
282
|
+
|
|
283
|
+
// ../ops-contract/dist/epcis.js
|
|
284
|
+
var DISP = {
|
|
285
|
+
in_progress: "urn:epcglobal:cbv:disp:in_progress",
|
|
286
|
+
sellable: "urn:epcglobal:cbv:disp:sellable_accessible",
|
|
287
|
+
reserved: "urn:epcglobal:cbv:disp:reserved",
|
|
288
|
+
in_transit: "urn:epcglobal:cbv:disp:in_transit",
|
|
289
|
+
non_sellable: "urn:epcglobal:cbv:disp:non_sellable_other",
|
|
290
|
+
// 불량/scrap
|
|
291
|
+
/**
|
|
292
|
+
* **기한이 지났다** — CBV `expired`.
|
|
293
|
+
*
|
|
294
|
+
* ── 왜 `non_sellable` 로 계산하지 않나 (2026-08-24) ─────────────────────────────
|
|
295
|
+
* 커널의 `non_sellable` 은 CBV 의 `non_sellable_other`, 즉 **「그 밖의 이유」**다. 기한 지남을 거기
|
|
296
|
+
* 넣으면 「기한이 지나 못 판다」와 「깨져서 못 판다」가 같은 값이 되고, 화면은 회수·폐기의 사유를
|
|
297
|
+
* 구별할 수 없다. 식품에서 그 둘은 다른 조치다.
|
|
298
|
+
*
|
|
299
|
+
* 그리고 표준에 **정확한 낱말이 있다** — 합치는 것은 있는 낱말을 버리는 것이다.
|
|
300
|
+
*
|
|
301
|
+
* ── 기한 날짜와 다른 축이다 ────────────────────────────────────────────────
|
|
302
|
+
* `ItemState.expiry` 는 **날짜**이고 이것은 **상태**다. 날짜가 있으면 「지났나」는 파생이지만, 원본이
|
|
303
|
+
* 「기한 지남」을 상태로 선언하는 시스템이 있다 — 그때 이 값은 관측이다.
|
|
304
|
+
*
|
|
305
|
+
* 둘이 어긋나면(날짜는 남았는데 상태가 지남, 또는 그 반대) **어느 쪽이 맞다고 정하지 않는다** —
|
|
306
|
+
* 아직 그 판정을 세울 근거가 없다. 어긋남의 구분을 없애지 않는 것이 지금의 규율이다.
|
|
307
|
+
*
|
|
308
|
+
* ── 원문으로 확인했다 (2026-08-24) ────────────────────────────────────────
|
|
309
|
+
* 1차 출처: **CBV Standard Release 2.0, Ratified Jun 2022** §7.2.3 처분 값 표(38개). 이 객체의
|
|
310
|
+
* 다른 값들(`in_progress`·`sellable_accessible`·`reserved`·`in_transit`·`non_sellable_other`)도
|
|
311
|
+
* 그 표에 있다.
|
|
312
|
+
*
|
|
313
|
+
* **`non_sellable_expired` 를 쓰지 않는 이유**: 그 값은 CBV 1.0 의 것이고 표준이 **폐기**했다 —
|
|
314
|
+
* 「deprecated in favour of new disposition values expired, damaged, disposed, … introduced in
|
|
315
|
+
* CBV 1.1」. 폐기된 값을 쓰면 새 소비처가 읽지 못한다.
|
|
316
|
+
*
|
|
317
|
+
* 참고: GS1 어휘 등록처(`ref.gs1.org/cbv/…`)로는 확인할 수 없었다 — **없는 값에도 같은 응답**을
|
|
318
|
+
* 준다(지어낸 값의 JSON-LD 가 실재 값과 바이트까지 같았다). 그 경로를 근거로 삼지 말 것.
|
|
319
|
+
*/
|
|
320
|
+
expired: "urn:epcglobal:cbv:disp:expired",
|
|
321
|
+
/**
|
|
322
|
+
* **폐기됐다 — 남은 것이 없다.** CBV `destroyed` (CBV ontology, `Disp-destroyed`), with the step
|
|
323
|
+
* `CBV_BIZSTEP.destroying`. Ruled 2026-09-24, shape from plant: the disposition belongs to the quantity
|
|
324
|
+
* **observed**, which is what is left. A partial scrap leaves the rest `in_progress`; only the last of it —
|
|
325
|
+
* nothing left — is `destroyed`. Putting it on a remainder would say sound goods were thrown away.
|
|
326
|
+
*/
|
|
327
|
+
destroyed: "urn:epcglobal:cbv:disp:destroyed",
|
|
328
|
+
/**
|
|
329
|
+
* **검사에 합격했다 / 불합격했다** — CBV `conformant` / `non_conformant`.
|
|
330
|
+
*
|
|
331
|
+
* 1차 출처(CBV 2.0 §7.2.3) 정의 그대로다.
|
|
332
|
+
*
|
|
333
|
+
* conformant Outcome of a successful/passed inspection in an inspecting or repairing step
|
|
334
|
+
* non_conformant Outcome of an unsuccessful/failed inspection in an inspecting or repairing step
|
|
335
|
+
*
|
|
336
|
+
* ── 왜 시험 결과 축을 자원에 더하지 않고 이것을 쓰나 (2026-08-24) ────────────
|
|
337
|
+
* 로트의 검사 판정을 담을 자리를 찾다가 `ItemState.testResults` 를 더하려 했다. 그런데 표준은 그
|
|
338
|
+
* 사실을 **이미 처분으로 말한다**: `bizStep: inspecting` 사건에 이 처분이 붙는다.
|
|
339
|
+
*
|
|
340
|
+
* 처분을 쓰면 두 가지가 공짜로 성립한다.
|
|
341
|
+
* ① **상태 ⊆ 이벤트** — 처분은 이미 사건에서 온다. 상태에만 있는 축을 만들지 않는다
|
|
342
|
+
* ② **운영에 곧 닿는다** — 「이 자재를 쓸 수 있나」가 처분으로 답해진다(판정을 따로 읽지 않는다)
|
|
343
|
+
*
|
|
344
|
+
* 시험의 **자세한 내용**(어느 명세로, 무엇을 재어)은 다른 물음이고, 표준은 그것을 `TestResult` 로
|
|
345
|
+
* 두며 결과가 대상을 가리킨다(`TestableObjectID`) — 대상이 결과를 들지 않는다. 그 축이 필요해지면
|
|
346
|
+
* 그때 열되, **판정 자체는 여기서 끝난다.**
|
|
347
|
+
*/
|
|
348
|
+
conformant: "urn:epcglobal:cbv:disp:conformant",
|
|
349
|
+
non_conformant: "urn:epcglobal:cbv:disp:non_conformant",
|
|
350
|
+
/**
|
|
351
|
+
* **Sent back** — CBV `returned`. Primary source: the CBV ontology (gs1/EPCIS `Ontology/CBV.ttl`, versionInfo 2.0,
|
|
352
|
+
* `cbv:Disp-returned`, read 2026-10-23): "Object has been sent or brought back for various reasons. It may or may not
|
|
353
|
+
* be sellable." It is what goods going back to their supplier carry when they leave (`RETURN_TO_SUPPLIER`), and what
|
|
354
|
+
* a customer's return may carry when it arrives. Added for the warehouse's return to supplier (operato-application
|
|
355
|
+
* ADR-0154 decision 2, ruled: the words before the document).
|
|
356
|
+
*/
|
|
357
|
+
returned: "urn:epcglobal:cbv:disp:returned"
|
|
358
|
+
};
|
|
359
|
+
var HATIOLAB_VOCABULARY = "https://hatiolab.com/voc/";
|
|
360
|
+
var PRIVATE_BIZSTEP = {
|
|
361
|
+
/** 공정에 자재가 들어갔다 — ISA-95 `MaterialUse: Consumed`. */
|
|
362
|
+
consuming: `${HATIOLAB_VOCABULARY}bizstep/consuming`
|
|
363
|
+
};
|
|
364
|
+
|
|
365
|
+
// ../ops-contract/dist/wms-profile.js
|
|
366
|
+
var BIZSTEP = {
|
|
367
|
+
receiving: "urn:epcglobal:cbv:bizstep:receiving",
|
|
368
|
+
storing: "urn:epcglobal:cbv:bizstep:storing",
|
|
369
|
+
picking: "urn:epcglobal:cbv:bizstep:picking",
|
|
370
|
+
packing: "urn:epcglobal:cbv:bizstep:packing",
|
|
371
|
+
staging_outbound: "urn:epcglobal:cbv:bizstep:staging_outbound",
|
|
372
|
+
shipping: "urn:epcglobal:cbv:bizstep:shipping",
|
|
373
|
+
/**
|
|
374
|
+
* **Replenishment** — moving goods to where they are picked from. CBV has no `replenishing`; this contract
|
|
375
|
+
* wrote one until 2026-09-24, and the closed-list test found it. CBV `stocking` is the step that means it:
|
|
376
|
+
* "…within a location to make an object available to the customer or for order fulfilment within a DC"
|
|
377
|
+
* (CBV ontology, `BizStep-stocking`). Ruled by the chief architect; no reader branches on the value, and
|
|
378
|
+
* the journal keeps what it already wrote (ADR-0038).
|
|
379
|
+
*/
|
|
380
|
+
stocking: "urn:epcglobal:cbv:bizstep:stocking",
|
|
381
|
+
/**
|
|
382
|
+
* **Counted, and the book set to the count** — CBV `cycle_counting`. Primary source: the CBV ontology
|
|
383
|
+
* (gs1/EPCIS `Ontology/CBV.ttl`, `cbv:BizStep-cycle_counting`, also served at ref.gs1.org/cbv): "Process of
|
|
384
|
+
* counting objects within a location in order to obtain an accurate inventory for business needs other
|
|
385
|
+
* than accounting purposes (e.g., replenishment and allocation)."
|
|
386
|
+
*
|
|
387
|
+
* **Only for an event somebody actually counted** (chief architect, 2026-09-24). A person correcting the
|
|
388
|
+
* book without counting is `CBV_BIZSTEP.other` with the reason carried as a value — `epcis.ts` says why:
|
|
389
|
+
* writing that as `cycle_counting` records a count that never happened. A count for the accounts is a
|
|
390
|
+
* different CBV step (`stock_taking`) and is not this one.
|
|
391
|
+
*/
|
|
392
|
+
cycle_counting: "urn:epcglobal:cbv:bizstep:cycle_counting"
|
|
393
|
+
};
|
|
394
|
+
var BTT = {
|
|
395
|
+
/** Purchase Order — the document an inbound receipt is made against. */
|
|
396
|
+
po: "urn:epcglobal:cbv:btt:po",
|
|
397
|
+
/** Purchase Order Confirmation — the seller's sales order. */
|
|
398
|
+
poc: "urn:epcglobal:cbv:btt:poc",
|
|
399
|
+
/** Despatch Advice (ASN) — announces an inbound delivery; also attached when shipping. */
|
|
400
|
+
desadv: "urn:epcglobal:cbv:btt:desadv",
|
|
401
|
+
/** Receiving Advice — the reply once an inbound receipt is complete. */
|
|
402
|
+
recadv: "urn:epcglobal:cbv:btt:recadv",
|
|
403
|
+
/** Return Merchandise Authorization — what a return is received against. */
|
|
404
|
+
rma: "urn:epcglobal:cbv:btt:rma",
|
|
405
|
+
/** Bill of Lading — the carrier's document, attached when shipping. */
|
|
406
|
+
bol: "urn:epcglobal:cbv:btt:bol"
|
|
407
|
+
};
|
|
408
|
+
var RETURN_TO_SUPPLIER = {
|
|
409
|
+
bizStep: BIZSTEP.shipping,
|
|
410
|
+
disposition: DISP.returned,
|
|
411
|
+
bizTransactionType: BTT.rma
|
|
412
|
+
};
|
|
413
|
+
var WMS_ORDER_KIND = {
|
|
414
|
+
/**
|
|
415
|
+
* Expected receipt (ASN) — what was promised to arrive, and how much of it has.
|
|
416
|
+
*
|
|
417
|
+
* Flow metrics leave it out: the arrival both raises and fulfils it, so counting it would add a
|
|
418
|
+
* completed order per arrival and never clear the backlog (`isFlowOrder`).
|
|
419
|
+
*/
|
|
420
|
+
inbound: "inbound",
|
|
421
|
+
/** Outbound order — what the kernel's sales order is. */
|
|
422
|
+
outbound: "outbound",
|
|
423
|
+
/** Receipt of returned goods. */
|
|
424
|
+
return: "return",
|
|
425
|
+
/** Stock transfer between sites. CBV has no document type for it: carry the id without a type. */
|
|
426
|
+
transfer: "transfer"
|
|
427
|
+
};
|
|
428
|
+
var WMS_RECEIVING_ORDER_KINDS = [WMS_ORDER_KIND.inbound, WMS_ORDER_KIND.return];
|
|
429
|
+
var WMS_LOCATION_TYPES = ["dock", "storage", "staging", "dock-ship", "vas-station"];
|
|
430
|
+
var WMS_LOCATION_LEVEL = {
|
|
431
|
+
dock: "StorageZone",
|
|
432
|
+
storage: "StorageUnit",
|
|
433
|
+
staging: "StorageZone",
|
|
434
|
+
"dock-ship": "StorageZone",
|
|
435
|
+
"vas-station": "WorkCell"
|
|
436
|
+
};
|
|
437
|
+
var WMS_TYPES = [
|
|
438
|
+
...WMS_LOCATION_TYPES.filter((k) => k !== "vas-station").map((k) => ({ key: k, role: "location", label: `twin.type.${k}`, standardClass: { epcis: "bizLocation" }, identity: { scheme: "gs1:SGLN" }, level: WMS_LOCATION_LEVEL[k], capabilities: ["storable"] })),
|
|
439
|
+
{ key: "vas-station", role: "location", label: "twin.type.vas-station", standardClass: { epcis: "bizLocation", isa95: "WorkCenter" }, identity: { scheme: "gs1:SGLN" }, level: WMS_LOCATION_LEVEL["vas-station"], capabilities: ["storable", "processable"] },
|
|
440
|
+
{ key: "forklift", role: "equipment", label: "twin.type.forklift", standardClass: { epcis: "object", iso55000: "Asset" }, identity: { scheme: "gs1:GIAI" }, capabilities: ["mobile", "operable"] },
|
|
441
|
+
/** 유통가공 작업자·작업대 설비 — 가공을 수행하는 능동 자원(ISA-95 `Equipment`). */
|
|
442
|
+
{ key: "packer", role: "equipment", label: "twin.type.packer", standardClass: { epcis: "object", isa95: "Equipment" }, identity: { scheme: "gs1:GIAI" }, capabilities: ["processable", "operable"] }
|
|
443
|
+
];
|
|
444
|
+
|
|
445
|
+
// ../ops-contract/dist/yms-profile.js
|
|
446
|
+
var YARD_PRIVATE_BIZSTEP = {
|
|
447
|
+
staging: `${HATIOLAB_VOCABULARY}bizstep/staging`
|
|
448
|
+
// 야드 슬롯 주차·대기
|
|
449
|
+
};
|
|
450
|
+
var YMS_LOCATION_TYPES = ["gate", "yard-slot", "dock-door", "staging"];
|
|
451
|
+
var YMS_LOCATION_LEVEL = {
|
|
452
|
+
gate: "Other",
|
|
453
|
+
"yard-slot": "StorageUnit",
|
|
454
|
+
"dock-door": "StorageUnit",
|
|
455
|
+
staging: "StorageZone"
|
|
456
|
+
};
|
|
457
|
+
var YMS_TYPES = [
|
|
458
|
+
...YMS_LOCATION_TYPES.map((k) => ({ key: k, role: "location", label: `twin.type.${k}`, standardClass: { epcis: "bizLocation" }, identity: { scheme: "gs1:SGLN" }, level: YMS_LOCATION_LEVEL[k], capabilities: ["storable"] })),
|
|
459
|
+
{ key: "hostler", role: "equipment", label: "twin.type.hostler", standardClass: { epcis: "object", iso55000: "Asset" }, identity: { scheme: "gs1:GIAI" }, capabilities: ["mobile", "operable"] }
|
|
460
|
+
];
|
|
461
|
+
|
|
462
|
+
// ../ops-contract/dist/mes-profile.js
|
|
463
|
+
var MES_LOCATION_TYPES = ["raw-store", "cut-station", "weld-station", "paint-booth", "assembly-line", "fg-store"];
|
|
464
|
+
var MES_LOCATION_CLS = {
|
|
465
|
+
"raw-store": { epcis: "bizLocation" },
|
|
466
|
+
"cut-station": { isa95: "WorkCenter", epcis: "bizLocation" },
|
|
467
|
+
"weld-station": { isa95: "WorkCenter", epcis: "bizLocation" },
|
|
468
|
+
"paint-booth": { isa95: "WorkCenter", epcis: "bizLocation" },
|
|
469
|
+
"assembly-line": { isa95: "WorkCenter", epcis: "bizLocation" },
|
|
470
|
+
"fg-store": { epcis: "bizLocation" }
|
|
471
|
+
};
|
|
472
|
+
var MES_LOCATION_LEVEL = {
|
|
473
|
+
"raw-store": "StorageZone",
|
|
474
|
+
"cut-station": "WorkCell",
|
|
475
|
+
"weld-station": "WorkCell",
|
|
476
|
+
"paint-booth": "WorkCell",
|
|
477
|
+
"assembly-line": "ProductionLine",
|
|
478
|
+
"fg-store": "StorageZone"
|
|
479
|
+
};
|
|
480
|
+
var MES_TYPES = [
|
|
481
|
+
...MES_LOCATION_TYPES.map((k) => ({ key: k, role: "location", label: `twin.type.${k}`, standardClass: MES_LOCATION_CLS[k] ?? {}, identity: { scheme: "gs1:SGLN" }, level: MES_LOCATION_LEVEL[k], capabilities: ["storable"] })),
|
|
482
|
+
{ key: "cutter", role: "equipment", label: "twin.type.cutter", standardClass: { isa95: "Equipment", iso55000: "Asset" }, identity: { scheme: "gs1:GIAI" }, capabilities: ["processable", "operable"] },
|
|
483
|
+
{ key: "welder", role: "equipment", label: "twin.type.welder", standardClass: { isa95: "Equipment", iso55000: "Asset" }, identity: { scheme: "gs1:GIAI" }, capabilities: ["processable", "operable"] },
|
|
484
|
+
{ key: "painter", role: "equipment", label: "twin.type.painter", standardClass: { isa95: "Equipment", iso55000: "Asset" }, identity: { scheme: "gs1:GIAI" }, capabilities: ["processable", "operable"] },
|
|
485
|
+
{ key: "assembler", role: "equipment", label: "twin.type.assembler", standardClass: { isa95: "Equipment", iso55000: "Asset" }, identity: { scheme: "gs1:GIAI" }, capabilities: ["processable", "operable"] }
|
|
486
|
+
];
|
|
487
|
+
|
|
488
|
+
// ../ops-contract/dist/ems-profile.js
|
|
489
|
+
var EMS_PROPERTY = {
|
|
490
|
+
/** 계약전력(kW) — 수전·분기 자리에 선언한다. 없으면 계약 대비 판정을 하지 않는다. */
|
|
491
|
+
contractKW: "contract.kW",
|
|
492
|
+
/*
|
|
493
|
+
* ── 계량 지점의 방향 (2026-08-25) ──────────────────────────────────────────
|
|
494
|
+
* **요금은 계통 접속점의 순 유입에 매겨진다.** 그러니 그 지점의 계량기가 무엇을 재는지 모르면
|
|
495
|
+
* 요금을 사실대로 말할 수 없다 — 내보낸 양을 쓴 양으로 세면 계약 대비 판단이 반대로 뒤집힌다.
|
|
496
|
+
*
|
|
497
|
+
* 이 축이 없는 동안 계량 지점의 kW 를 전부 부하로 셌다. 상계 거래를 하는 현장, 축전지를 붙인 현장,
|
|
498
|
+
* 열병합이 있는 현장 — 접속점 계량기가 양쪽을 재는 곳은 늘 있다.
|
|
499
|
+
*
|
|
500
|
+
* **발전기를 계량기로 만드는 것과 다른 일이다.** 발전은 설비의 사실이고(`energyGenerating`), 그것을
|
|
501
|
+
* 계량 지점으로 보내는 것은 여전히 하지 않는다. 이 축은 **접속점 계량기**가 무엇을 재는지 말하는
|
|
502
|
+
* 자리다.
|
|
503
|
+
*
|
|
504
|
+
* 방향은 **관측이 아니라 선언**이다. 표본마다 바뀌는 값이 아니고, 그 계량기가 무엇을 재도록
|
|
505
|
+
* 설치되었는지는 현장이 안다. 그래서 표본(`EnergyRecord`)에 넣지 않고 자원 속성으로 둔다.
|
|
506
|
+
*
|
|
507
|
+
* 값은 계량기 자신의 낱말을 쓴다(적산 레지스터가 그렇게 갈려 있다). §`METER_DIRECTION`.
|
|
508
|
+
*/
|
|
509
|
+
meterDirection: "meter.direction",
|
|
510
|
+
/*
|
|
511
|
+
* ── 부하 계수 — 시뮬레이션이 전기를 만들 수 있게 (2026-08-14) ───────────────
|
|
512
|
+
* 「이 설비가 돌면 몇 kW 인가」는 **현장이 아는 값**이다. 그래서 타입 기본값을 두지 않는다:
|
|
513
|
+
* 선언하지 않은 설비는 부하를 만들지 않는다. 기본값을 두면 아무도 그 수가 짐작인 줄 모른 채
|
|
514
|
+
* 요금 판정이 그 위에 선다.
|
|
515
|
+
*/
|
|
516
|
+
/** 가동 중 소비(kW). */
|
|
517
|
+
ratedKW: "power.ratedKW",
|
|
518
|
+
/** 멈춰 있을 때의 소비(kW). 없으면 멈춘 동안을 **비운다** — 0 이라고 주장하지 않는다. */
|
|
519
|
+
standbyKW: "power.standbyKW",
|
|
520
|
+
/*
|
|
521
|
+
* ── 요금 단가 — 수를 금액으로 바꾸는 선언 (2026-08-17) ─────────────────────
|
|
522
|
+
*
|
|
523
|
+
* 그동안 트윈은 「최대수요 328kW」·「전력량 1,547kWh」까지 말하고 멈췄다. 그런데 피크를 깎는 일이
|
|
524
|
+
* 돈이 되는 이유는 **요금이 둘로 나뉘기** 때문이다: 사용량(kWh)에 붙는 요금과 **최대수요(kW)에 붙는
|
|
525
|
+
* 기본요금**. 단가가 없으면 그 절반을 말할 수 없고, 그래서 「피크를 깎아 얼마를 아끼나」에 답하지 못했다.
|
|
526
|
+
*
|
|
527
|
+
* 단가는 **현장의 계약**이다(같은 나라 안에서도 사업자·요금제마다 다르다). 그래서 기본값을 두지
|
|
528
|
+
* 않는다 — 선언하지 않으면 금액을 계산하지 않는다. 짐작한 단가로 낸 금액은 숫자가 있다는 것만으로
|
|
529
|
+
* 사람을 결정으로 밀어붙인다.
|
|
530
|
+
*
|
|
531
|
+
* 계약전력(`contract.kW`)과 같은 자리(수전)에 선언한다.
|
|
532
|
+
*/
|
|
533
|
+
/** 기본요금 단가 — 최대수요 1kW 당(청구 주기 기준). */
|
|
534
|
+
demandChargePerKW: "tariff.demandChargePerKW",
|
|
535
|
+
/**
|
|
536
|
+
* **요금적용전력**(kW) — 기본요금이 실제로 매겨지는 기준. 계약전력과 다른 값이다.
|
|
537
|
+
*
|
|
538
|
+
* 기본요금이 걸리는 수는 이 주기에 잰 최대가 아닌 경우가 많다 — 지난 몇 달의 최고를 끌고 가거나,
|
|
539
|
+
* 약정 용량으로 매기거나, 사업자가 따로 정한다. 그 규칙은 나라와 계약마다 다르므로 커널이 계산하지
|
|
540
|
+
* 않고 **계산된 결과를 받는다.** 이 값이 있으면 기본요금이 조건부 파생이 아니라 사실이 된다.
|
|
541
|
+
*
|
|
542
|
+
* 계약전력(`contract.kW`)을 이 자리에 넣지 말 것. 넘었을 때의 뜻이 다르다 — 계약 초과는 약정
|
|
543
|
+
* 위반이고, 이쪽은 다음 주기의 기본요금이 오른다는 뜻이다.
|
|
544
|
+
*/
|
|
545
|
+
billingDemandKW: "tariff.billingDemandKW",
|
|
546
|
+
/** 사용량 단가 — 1kWh 당. */
|
|
547
|
+
energyChargePerKWh: "tariff.energyChargePerKWh",
|
|
548
|
+
/** 통화 — ISO 4217 코드(USD·KRW…). 없으면 금액에 단위를 붙이지 않는다. */
|
|
549
|
+
currency: "tariff.currency",
|
|
550
|
+
/*
|
|
551
|
+
* ── 축전지의 용량과 방전 정책 (2026-08-17) ─────────────────────────────────
|
|
552
|
+
*
|
|
553
|
+
* 「배터리로 피크를 깎는다」를 시뮬이 보이려면 방전을 만들어야 하고, 그것은 **선언에서** 나와야 한다.
|
|
554
|
+
* 임계·최대율·예비를 우리가 정하면 그 수가 어디서 왔는지 아무도 설명할 수 없다.
|
|
555
|
+
*
|
|
556
|
+
* ── 선언한다는 것은 「그 자동화가 있다」는 주장이다 ─────────────────────────
|
|
557
|
+
* 이 정책을 모델에 적으면 **라이브가 아닌 모든 구동이 그 규칙으로 돈다.** 현장에 BESS 제어기가 없는데
|
|
558
|
+
* 적으면 파생 부하가 실제보다 낙관적으로 나온다(피크가 깎인 것으로 보인다). 그러니 「도입하면?」을
|
|
559
|
+
* 묻는 것이라면 선언이 아니라 **what-if 가 덮어쓸 일**이다.
|
|
560
|
+
*
|
|
561
|
+
* 용량이 없으면 방전하지 않는다 — 용량을 모르면 「얼마나 버티나」를 답할 수 없고, 버티는 시간을
|
|
562
|
+
* 모른 채 깎으면 무한히 깎을 수 있다고 주장하는 셈이다.
|
|
563
|
+
*/
|
|
564
|
+
/** 축전지 용량(kWh) — SOC 를 에너지로 바꾸는 값. 없으면 방전을 만들지 않는다. */
|
|
565
|
+
capacityKWh: "storage.capacityKWh",
|
|
566
|
+
/** 이 순수요를 넘으면 방전한다(kW) — 피크 억제 임계. */
|
|
567
|
+
dischargeAboveKW: "dispatch.dischargeAboveKW",
|
|
568
|
+
/** 최대 방전율(kW) — 인버터가 낼 수 있는 한계. */
|
|
569
|
+
maxDischargeKW: "dispatch.maxDischargeKW",
|
|
570
|
+
/** 예비 SOC(%) — 이 아래로는 쓰지 않는다(비상 대비). 없으면 0 으로 본다. */
|
|
571
|
+
reserveSoc: "dispatch.reserveSoc",
|
|
572
|
+
/**
|
|
573
|
+
* 시뮬레이션이 **출발할 때의 SOC(%)** — 씨앗값이다.
|
|
574
|
+
*
|
|
575
|
+
* 계측이 SOC 를 알려 주는 트윈에는 필요 없다(잰 값이 진실이다). 시뮬 트윈에는 알려 줄 것이 없어서
|
|
576
|
+
* 「SOC 를 모르면 방전하지 않는다」는 규율에 걸려 **배터리가 아무 일도 하지 못했다** — 정책을 선언해도
|
|
577
|
+
* 피크가 한 톨도 깎이지 않았다(실화면에서 그렇게 났다).
|
|
578
|
+
*
|
|
579
|
+
* 이것은 상태의 씨앗이지 계측이 아니다. 그래서 계측이 들어오는 순간 그것이 이긴다.
|
|
580
|
+
*/
|
|
581
|
+
initialSoc: "storage.initialSoc",
|
|
582
|
+
/*
|
|
583
|
+
* ── 발전 — 태양광이 서 있기만 하던 자리 (2026-08-18) ────────────────────────
|
|
584
|
+
*
|
|
585
|
+
* 계통도에 태양광을 그려 놓고 시뮬에서는 한 톨도 만들지 못했다. 미러는 원천이 발전량을 보내 주지만,
|
|
586
|
+
* 시뮬 트윈에는 그것을 만들 근거가 없었다 — 그래서 「태양광을 늘리면 피크가 얼마나 내려가나」를 물을 수
|
|
587
|
+
* 없었다(what-if 의 값이 절반만 성립했다).
|
|
588
|
+
*
|
|
589
|
+
* **형상을 우리가 지어내지 않는다.** 위도·계절·날씨로 곡선을 만들면 그 수가 어디서 왔는지 아무도
|
|
590
|
+
* 설명할 수 없고, 흐린 날 현장의 실적과 어긋난다. 그래서 현장이 **하루 형상을 적는다**: 24개 비율
|
|
591
|
+
* (0~1)이면 그것이 그 현장의 곡선이다(측정한 형상을 그대로 붙일 수 있다).
|
|
592
|
+
*
|
|
593
|
+
* 정격만 있고 형상이 없으면 발전하지 않는다 — 하루 종일 정격으로 발전하는 태양광은 없다.
|
|
594
|
+
*/
|
|
595
|
+
/**
|
|
596
|
+
* 발전 정격(kW) — **교류 쪽 최대 출력**. 계통으로 나가는 값이다.
|
|
597
|
+
*
|
|
598
|
+
* 이용률의 분모가 이 값이다(만든 양 ÷ 정격 × 시간). **직류 쪽 정격(§`genRatedKWdc`)과 다르고 더 작다** —
|
|
599
|
+
* 두 값을 한 이름에 담으면 이용률이 그 차이만큼 틀리고, 틀린 이유가 아무 데도 표시되지 않는다.
|
|
600
|
+
*
|
|
601
|
+
* 설비마다 선언하거나, 설비별 값을 모르는 현장은 **자리(수전)에 합계로** 선언한다.
|
|
602
|
+
*/
|
|
603
|
+
genRatedKW: "generation.ratedKW",
|
|
604
|
+
/**
|
|
605
|
+
* 발전 정격(kW) — **직류 쪽**. 변환기(인버터)의 입력 쪽 정격이고, 태양광이면 패널 정격의 합이다.
|
|
606
|
+
*
|
|
607
|
+
* 이용률의 분모로 쓰지 않는다. 이 값이 교류 정격보다 큰 것은 설계이고(변환기를 그렇게 고른다),
|
|
608
|
+
* 그 차이가 「맑은 정오에도 교류 출력이 더 오르지 않는 이유」를 설명한다.
|
|
609
|
+
*/
|
|
610
|
+
genRatedKWdc: "generation.ratedKWdc",
|
|
611
|
+
/**
|
|
612
|
+
* 하루 형상 — 쉼표로 나눈 **24개 비율**(0~1). 시각(현장 시간대)의 정격 대비 출력이다.
|
|
613
|
+
*
|
|
614
|
+
* 예: `0,0,0,0,0,0,0.05,0.2,0.45,0.7,0.9,1,1,0.95,0.8,0.6,0.35,0.12,0.02,0,0,0,0,0`
|
|
615
|
+
*/
|
|
616
|
+
genDailyProfile: "generation.dailyProfile"
|
|
617
|
+
};
|
|
618
|
+
var EMS_PROPERTY_SPEC = {
|
|
619
|
+
[EMS_PROPERTY.contractKW]: { uom: "kW", dataType: "xs:double", note: "contracted power at the metering point, in kW." },
|
|
620
|
+
/* 값이 셋 중 하나여야 한다 — 그 밖의 낱말은 받지 않는다(뜻이 통할 것 같은 말도 받지 않는다). */
|
|
621
|
+
[EMS_PROPERTY.meterDirection]: {
|
|
622
|
+
dataType: "xs:string",
|
|
623
|
+
note: 'what this metering point measures: "import" (drawn from the grid), "export" (generation sent out), or "bidirectional" (one meter for both, sign carries the direction). Left undeclared, the point counts as load \u2014 leaving it out never makes demand look smaller than it is.'
|
|
624
|
+
},
|
|
625
|
+
[EMS_PROPERTY.ratedKW]: { uom: "kW", dataType: "xs:double", note: "power drawn while running, in kW." },
|
|
626
|
+
[EMS_PROPERTY.standbyKW]: { uom: "kW", dataType: "xs:double", note: "power drawn while idle, in kW." },
|
|
627
|
+
[EMS_PROPERTY.demandChargePerKW]: { dataType: "xs:double", note: "demand charge per kW of billing-period peak, in the declared currency." },
|
|
628
|
+
[EMS_PROPERTY.billingDemandKW]: {
|
|
629
|
+
uom: "kW",
|
|
630
|
+
dataType: "xs:double",
|
|
631
|
+
note: "billing demand in kW \u2014 the basis the demand charge is actually billed on (often a rolling 12-month peak). Not the contracted power."
|
|
632
|
+
},
|
|
633
|
+
[EMS_PROPERTY.energyChargePerKWh]: { dataType: "xs:double", note: "energy charge per kWh, in the declared currency." },
|
|
634
|
+
[EMS_PROPERTY.currency]: { dataType: "xs:string", note: "ISO 4217 currency code, e.g. USD or KRW." },
|
|
635
|
+
[EMS_PROPERTY.capacityKWh]: { uom: "kWh", dataType: "xs:double", note: "usable energy of the storage, in kWh." },
|
|
636
|
+
[EMS_PROPERTY.dischargeAboveKW]: { uom: "kW", dataType: "xs:double", note: "net demand above which the storage discharges, in kW." },
|
|
637
|
+
[EMS_PROPERTY.maxDischargeKW]: { uom: "kW", dataType: "xs:double", note: "inverter limit on discharge rate, in kW." },
|
|
638
|
+
/* 퍼센트다 — 0.8 은 0.8% 이고 80% 가 아니다. 이 한 줄이 없어서 배터리가 조용히 비어 있었다. */
|
|
639
|
+
[EMS_PROPERTY.reserveSoc]: { uom: "%", dataType: "xs:double", range: [0, 100], note: "reserve state of charge as a percentage 0-100 (20 means 20%), never discharged below." },
|
|
640
|
+
[EMS_PROPERTY.initialSoc]: { uom: "%", dataType: "xs:double", range: [0, 100], note: "starting state of charge as a percentage 0-100 (80 means 80%, not 0.8)." },
|
|
641
|
+
[EMS_PROPERTY.genRatedKW]: {
|
|
642
|
+
uom: "kW",
|
|
643
|
+
dataType: "xs:double",
|
|
644
|
+
note: "rated AC generation output, in kW \u2014 the denominator of capacity factor. Declare per equipment, or on the incoming location as a site total."
|
|
645
|
+
},
|
|
646
|
+
[EMS_PROPERTY.genRatedKWdc]: {
|
|
647
|
+
uom: "kW",
|
|
648
|
+
dataType: "xs:double",
|
|
649
|
+
note: "rated DC generation capacity, in kW (panel rating for PV). Larger than the AC rating by design; not the capacity-factor denominator."
|
|
650
|
+
},
|
|
651
|
+
[EMS_PROPERTY.genDailyProfile]: {
|
|
652
|
+
dataType: "xs:string",
|
|
653
|
+
note: "daily shape as 24 comma-separated fractions of rated output (0-1), one per hour of local time \u2014 the site declares its own curve; we do not invent one."
|
|
654
|
+
}
|
|
655
|
+
};
|
|
656
|
+
var EMS_TYPES = [
|
|
657
|
+
/* ── 자리: 전기적 구간 ─────────────────────────────────────────────────── */
|
|
658
|
+
{
|
|
659
|
+
key: "incoming",
|
|
660
|
+
role: "location",
|
|
661
|
+
/* 전기 계통의 구간은 **설비 계층의 단이 아니다** — 표준의 탈출구(`Other`)를 쓴다(아래 주석). */
|
|
662
|
+
level: "Other",
|
|
663
|
+
label: "twin.type.incoming",
|
|
664
|
+
/* 수전 지점 — 계약전력이 걸리는 자리이고, 요금의 근거가 되는 수요는 여기서 잰다.
|
|
665
|
+
ISO 50001 의 「에너지 유입」 경계이기도 하다(조직의 에너지 검토가 여기서 시작한다). */
|
|
666
|
+
standardClass: { iec61850: "MMTR", iso50001: "EnergyInput" },
|
|
667
|
+
identity: { scheme: "kernel:id" },
|
|
668
|
+
capabilities: ["metered"]
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
key: "feeder",
|
|
672
|
+
role: "location",
|
|
673
|
+
/* 전기 계통의 구간은 **설비 계층의 단이 아니다** — 표준의 탈출구(`Other`)를 쓴다(아래 주석). */
|
|
674
|
+
level: "Other",
|
|
675
|
+
label: "twin.type.feeder",
|
|
676
|
+
/* 분기 회로 — 부하 분해의 단위. 계약전력의 하위 배분이 여기서 정해진다. */
|
|
677
|
+
standardClass: { iec61850: "Feeder", iso50001: "EnergyUse" },
|
|
678
|
+
identity: { scheme: "kernel:id" },
|
|
679
|
+
capabilities: ["metered"]
|
|
680
|
+
},
|
|
681
|
+
{
|
|
682
|
+
key: "submeter-zone",
|
|
683
|
+
role: "location",
|
|
684
|
+
/* 전기 계통의 구간은 **설비 계층의 단이 아니다** — 표준의 탈출구(`Other`)를 쓴다(아래 주석). */
|
|
685
|
+
level: "Other",
|
|
686
|
+
label: "twin.type.submeter-zone",
|
|
687
|
+
/*
|
|
688
|
+
* 구역 계량 — 여러 부하를 한 계량기로 묶어 재는 자리(공조·조명처럼 개별 계량이 없는 것들).
|
|
689
|
+
*
|
|
690
|
+
* ISO 50001 의 **SEU**(유의 에너지 사용처)가 대개 이 알갱이다. 개별 설비까지 재지 못하는 현장이
|
|
691
|
+
* 많고, 그것을 「모른다」로 두는 대신 **묶음으로 아는 것**이 정직하다.
|
|
692
|
+
*/
|
|
693
|
+
standardClass: { iec61850: "MMXU", iso50001: "SEU" },
|
|
694
|
+
identity: { scheme: "kernel:id" },
|
|
695
|
+
capabilities: ["metered"]
|
|
696
|
+
},
|
|
697
|
+
/* ── 설비: 계량 지점과 에너지 자원 ──────────────────────────────────────── */
|
|
698
|
+
{
|
|
699
|
+
key: "meter",
|
|
700
|
+
role: "equipment",
|
|
701
|
+
label: "twin.type.meter",
|
|
702
|
+
/* 계량기 — 측정 논리 노드(MMXU=측정단위, MMTR=적산). 자산으로도 하나다(ISO 55000). */
|
|
703
|
+
standardClass: { iec61850: "MMXU", iso55000: "Asset", iso50001: "MeasurementPoint" },
|
|
704
|
+
identity: { scheme: "kernel:id" },
|
|
705
|
+
capabilities: ["metered", "operable"]
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
key: "breaker",
|
|
709
|
+
role: "equipment",
|
|
710
|
+
label: "twin.type.breaker",
|
|
711
|
+
/*
|
|
712
|
+
* 차단기 — IEC 61850 `XCBR`. **우리는 이것을 조작하지 않는다**(안전 계통은 범위 밖: ems.md §1).
|
|
713
|
+
* 상태를 읽어 계통 구성을 알 뿐이다.
|
|
714
|
+
*
|
|
715
|
+
* 능력은 `switching` 이다 — `operable` 이 아니다(2026-08-14). `operable` 이던 동안 저작면이 차단기에
|
|
716
|
+
* **제어 컴포넌트**를 권했다: 우리가 하지 않기로 한 조작을 화면이 부추긴 것이다. 「위치를 읽는다」와
|
|
717
|
+
* 「명령을 받는다」는 다른 능력이고, 이제 그 둘이 갈려 있다(capability.ts 주석).
|
|
718
|
+
*/
|
|
719
|
+
standardClass: { iec61850: "XCBR", iso55000: "Asset" },
|
|
720
|
+
identity: { scheme: "kernel:id" },
|
|
721
|
+
capabilities: ["switching"]
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
key: "pv-array",
|
|
725
|
+
role: "equipment",
|
|
726
|
+
label: "twin.type.pv-array",
|
|
727
|
+
/* 태양광 어레이 — IEC 61850-7-420(분산자원)의 `DPVA`. 발전과 계량은 다른 능력이다. */
|
|
728
|
+
standardClass: { iec61850: "DPVA", iso55000: "Asset", iso50001: "RenewableSupply" },
|
|
729
|
+
identity: { scheme: "kernel:id" },
|
|
730
|
+
capabilities: ["energyGenerating", "metered", "operable"]
|
|
731
|
+
},
|
|
732
|
+
{
|
|
733
|
+
key: "battery",
|
|
734
|
+
role: "equipment",
|
|
735
|
+
label: "twin.type.battery",
|
|
736
|
+
/* 축전지(ESS) — `ZBAT`. 충전·방전을 나눠 재고, 저장은 보관(`storable`)이 아니다(물건이 아니다). */
|
|
737
|
+
standardClass: { iec61850: "ZBAT", iso55000: "Asset" },
|
|
738
|
+
identity: { scheme: "kernel:id" },
|
|
739
|
+
capabilities: ["energyStoring", "metered", "operable"]
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
key: "utility",
|
|
743
|
+
role: "equipment",
|
|
744
|
+
label: "twin.type.utility",
|
|
745
|
+
/*
|
|
746
|
+
* 공통 설비 — 공조·컴프레서·칠러·조명·폐수처리처럼 **어느 공정에도 귀속되지 않는** 소비처.
|
|
747
|
+
*
|
|
748
|
+
* ── 왜 따로 있나 (2026-08-14) ────────────────────────────────────────────
|
|
749
|
+
* 물류·생산 트윈에서 이런 것들은 **설비가 아니다**(공정에 매핑되지 않으므로 자원 축에 없다).
|
|
750
|
+
* 그런데 에너지에서는 소비의 절반을 차지하고 감축 후보 1순위다 — 담을 자리가 반드시 있어야 한다.
|
|
751
|
+
*
|
|
752
|
+
* 처음에는 `curtailable-load` 하나로 받으려 했다. 그런데 그 이름은 **「줄일 수 있다」고 주장**한다:
|
|
753
|
+
* 폐수처리·방폭 환기·서버실 냉방은 공통이지만 줄일 수 없고, 그것을 감축 가능으로 두면 트윈이
|
|
754
|
+
* 「이걸 줄이면 됩니다」라는 거짓 제안을 한다. 공통성과 감축 가능성은 **다른 축**이다.
|
|
755
|
+
*
|
|
756
|
+
* 표준: IEC 61850 에 「공통 설비」라는 논리 노드는 없다(설비 종류마다 다른 노드다) — 비운다.
|
|
757
|
+
* ISO 50001 의 SEU 는 이 부류를 가장 많이 가리킨다(유의 에너지 사용처).
|
|
758
|
+
*/
|
|
759
|
+
standardClass: { iso50001: "SEU", iso55000: "Asset" },
|
|
760
|
+
identity: { scheme: "kernel:id" },
|
|
761
|
+
capabilities: ["metered", "operable"]
|
|
762
|
+
},
|
|
763
|
+
{
|
|
764
|
+
key: "curtailable-load",
|
|
765
|
+
role: "equipment",
|
|
766
|
+
label: "twin.type.curtailable-load",
|
|
767
|
+
/*
|
|
768
|
+
* 감축 가능 부하 — 줄일 수 있는 소비처(공조·충전기·비상시 미가동 라인).
|
|
769
|
+
*
|
|
770
|
+
* 표준에 이 이름은 없다: IEC 61850 은 설비를 종류로 부르고 「감축 가능」은 **운영 정책**이다.
|
|
771
|
+
* 그래서 `iec61850` 칸을 비우고 ISO 50001 의 SEU 로만 대응한다 — 억지로 논리 노드를 적으면
|
|
772
|
+
* 적합성 표가 거짓을 말한다.
|
|
773
|
+
*/
|
|
774
|
+
standardClass: { iso50001: "SEU" },
|
|
775
|
+
identity: { scheme: "kernel:id" },
|
|
776
|
+
capabilities: ["curtailable", "metered", "operable"]
|
|
777
|
+
}
|
|
778
|
+
];
|
|
779
|
+
|
|
780
|
+
// ../ops-contract/dist/domain-catalog.js
|
|
781
|
+
var locationKeys = (types) => types.filter((t) => t.role === "location").map((t) => t.key);
|
|
782
|
+
var DOMAIN_CATALOG = {
|
|
783
|
+
// label 은 언어 중립 i18n 키(twin.system.<code>) — 사람 언어는 표현계층이 렌더(L2).
|
|
784
|
+
wms: { system: "wms", label: "twin.system.wms", types: WMS_TYPES, locationTypes: locationKeys(WMS_TYPES) },
|
|
785
|
+
yms: { system: "yms", label: "twin.system.yms", types: YMS_TYPES, locationTypes: locationKeys(YMS_TYPES) },
|
|
786
|
+
mes: { system: "mes", label: "twin.system.mes", types: MES_TYPES, locationTypes: locationKeys(MES_TYPES) },
|
|
787
|
+
ems: { system: "ems", label: "twin.system.ems", types: EMS_TYPES, locationTypes: locationKeys(EMS_TYPES) }
|
|
788
|
+
};
|
|
789
|
+
|
|
790
|
+
// ../ops-contract/dist/order-fold.js
|
|
791
|
+
var ORDER_FOLD_HOUR_MS = 60 * 60 * 1e3;
|
|
792
|
+
var ORDER_FOLD_DEFAULT = Object.freeze({ afterMs: 24 * 60 * 60 * 1e3, maxTerminal: 1e3 });
|
|
793
|
+
|
|
794
|
+
// ../ops-contract/dist/operational-ingest.js
|
|
795
|
+
var TASK_STATUS = ["created", "assigned", "in-progress", "completed"];
|
|
796
|
+
var SPECS = {
|
|
797
|
+
task: {
|
|
798
|
+
eventType: OP_EVENT.task,
|
|
799
|
+
match: ["taskId"],
|
|
800
|
+
matchOrder: 50,
|
|
801
|
+
identity: "taskId",
|
|
802
|
+
/* 종류가 없으면 성과를 종류별로 모을 수 없고(선언된 시간·수율이 종류로 붙는다) 지어낼 수도 없다. */
|
|
803
|
+
required: ["taskId", "kind", "status"],
|
|
804
|
+
fields: {
|
|
805
|
+
taskId: "string",
|
|
806
|
+
kind: "string",
|
|
807
|
+
status: "string",
|
|
808
|
+
fromNode: "string",
|
|
809
|
+
toNode: "string",
|
|
810
|
+
itemRefs: "string[]",
|
|
811
|
+
resourceRef: "string",
|
|
812
|
+
resources: "string[]",
|
|
813
|
+
personnel: "string[]",
|
|
814
|
+
assets: "string[]",
|
|
815
|
+
orderId: "string",
|
|
816
|
+
intent: "string",
|
|
817
|
+
progress: "number",
|
|
818
|
+
remainingMs: "number",
|
|
819
|
+
durationMs: "number",
|
|
820
|
+
startedAtSimMs: "number",
|
|
821
|
+
outcome: "string",
|
|
822
|
+
priority: "number",
|
|
823
|
+
startTime: "string",
|
|
824
|
+
endTime: "string",
|
|
825
|
+
materialActual: "object[]",
|
|
826
|
+
recordTime: "string",
|
|
827
|
+
workShiftBasis: "object"
|
|
828
|
+
},
|
|
829
|
+
/*
|
|
830
|
+
* **자재 줄의 안쪽** — 계약의 `MaterialActual` 그대로다.
|
|
831
|
+
*
|
|
832
|
+
* `definitionId` 를 요구하는 이유: 이 이름이 없으면 그 줄이 무엇을 가리키는지 아무도 모른다.
|
|
833
|
+
* 실제로 `materialDefinitionId` 로 온 줄이 저널에 앉았고, 계약의 타입으로 읽으면 비어 있었다.
|
|
834
|
+
*
|
|
835
|
+
* `quantity` 를 `positive` 에 두는 이유: 「모른다」는 **비워서** 말한다. 0 으로 실으면 받는
|
|
836
|
+
* 쪽에서 「0개」와 구별되지 않고, 소요량 집계가 조용히 틀린다.
|
|
837
|
+
*
|
|
838
|
+
* `uom` 은 요구하지 않는다 — 계약에서 선택이다(§`MaterialActual`). ERP 경로는 요구하는데
|
|
839
|
+
* 그것은 **그 경로의 규칙**이다(정산에 단위 없는 수량을 쓸 수 없다). 커널이 그 규칙을 통째로
|
|
840
|
+
* 물려받으면 단위를 모르는 현장의 사실이 통째로 거절된다.
|
|
841
|
+
*/
|
|
842
|
+
shapes: {
|
|
843
|
+
workShiftBasis: {
|
|
844
|
+
required: ["basisId", "arrangementId", "revisionId", "revisionNumber", "planId", "contentHash", "businessTime", "timezone", "shifts", "workDate"],
|
|
845
|
+
fields: { basisId: "string", arrangementId: "string", revisionId: "string", revisionNumber: "number", planId: "string", contentHash: "string", businessTime: "string", timezone: "string", workDate: "string" }
|
|
846
|
+
// Full nested content and selected occurrence are checked by isWorkShiftExecutionBasis below.
|
|
847
|
+
},
|
|
848
|
+
materialActual: {
|
|
849
|
+
required: ["definitionId", "use"],
|
|
850
|
+
fields: { definitionId: "string", lotId: "string", quantity: "number", uom: "string" },
|
|
851
|
+
enums: { use: MATERIAL_ACTUAL_USE },
|
|
852
|
+
positive: ["quantity"]
|
|
853
|
+
}
|
|
854
|
+
},
|
|
855
|
+
enums: {
|
|
856
|
+
status: TASK_STATUS,
|
|
857
|
+
intent: ["transport", "process", "dwell"],
|
|
858
|
+
/* 품질 판정은 **있었던 작업만** — 없음은 「양품」이 아니라 「판정하지 않았다」다. */
|
|
859
|
+
outcome: ["good", "scrap"]
|
|
860
|
+
}
|
|
861
|
+
},
|
|
862
|
+
equipment: {
|
|
863
|
+
eventType: OP_EVENT.equipment,
|
|
864
|
+
match: ["moverId"],
|
|
865
|
+
matchOrder: 20,
|
|
866
|
+
identity: "moverId",
|
|
867
|
+
// vocabulary-guard: allow 저널 와이어 필드(델타의 이름이 계약이다)
|
|
868
|
+
required: ["moverId", "kind", "status"],
|
|
869
|
+
// vocabulary-guard: allow 위와 같은 이유
|
|
870
|
+
fields: {
|
|
871
|
+
moverId: "string",
|
|
872
|
+
kind: "string",
|
|
873
|
+
status: "string",
|
|
874
|
+
location: "string",
|
|
875
|
+
homeLocation: "string",
|
|
876
|
+
// vocabulary-guard: allow
|
|
877
|
+
taskId: "string",
|
|
878
|
+
held: "boolean",
|
|
879
|
+
effectiveStart: "string",
|
|
880
|
+
effectiveEnd: "string",
|
|
881
|
+
recordTime: "string",
|
|
882
|
+
/* 왜 이 상태가 됐나 — 설비가 알려 주면 싣는다. 사람이 나중에 정하는 사유는 구간 사실에 적는다. */
|
|
883
|
+
reasonCode: "string",
|
|
884
|
+
/* 이동 구간 — 실 시스템도 줄 수 있는 사실이다(AGV·RTLS 가 출발·도착·소요를 낸다). 안쪽 필드까지
|
|
885
|
+
재검사하지는 않는다: 그 모양은 `EquipmentMotion` 계약이고, 여기서 두 번 지키면 두 벌이 된다. */
|
|
886
|
+
motion: "object"
|
|
887
|
+
},
|
|
888
|
+
enums: { status: EQUIPMENT_STATUS }
|
|
889
|
+
},
|
|
890
|
+
person: {
|
|
891
|
+
eventType: OP_EVENT.person,
|
|
892
|
+
match: ["personId"],
|
|
893
|
+
matchOrder: 30,
|
|
894
|
+
identity: "personId",
|
|
895
|
+
required: ["personId", "status"],
|
|
896
|
+
fields: {
|
|
897
|
+
personId: "string",
|
|
898
|
+
status: "string",
|
|
899
|
+
personnelClassIds: "string[]",
|
|
900
|
+
taskId: "string",
|
|
901
|
+
location: "string",
|
|
902
|
+
offShift: "boolean",
|
|
903
|
+
effectiveStart: "string",
|
|
904
|
+
effectiveEnd: "string",
|
|
905
|
+
recordTime: "string"
|
|
906
|
+
},
|
|
907
|
+
enums: { status: PERSON_STATUS }
|
|
908
|
+
},
|
|
909
|
+
asset: {
|
|
910
|
+
eventType: OP_EVENT.asset,
|
|
911
|
+
match: ["assetId"],
|
|
912
|
+
matchOrder: 40,
|
|
913
|
+
identity: "assetId",
|
|
914
|
+
required: ["assetId", "status"],
|
|
915
|
+
fields: {
|
|
916
|
+
assetId: "string",
|
|
917
|
+
status: "string",
|
|
918
|
+
assetClassIds: "string[]",
|
|
919
|
+
location: "string",
|
|
920
|
+
taskId: "string",
|
|
921
|
+
carrying: "string",
|
|
922
|
+
effectiveStart: "string",
|
|
923
|
+
effectiveEnd: "string",
|
|
924
|
+
recordTime: "string"
|
|
925
|
+
},
|
|
926
|
+
enums: { status: ASSET_STATUS }
|
|
927
|
+
},
|
|
928
|
+
order: {
|
|
929
|
+
eventType: OP_EVENT.order,
|
|
930
|
+
match: ["orderId"],
|
|
931
|
+
matchOrder: 60,
|
|
932
|
+
identity: "orderId",
|
|
933
|
+
/*
|
|
934
|
+
* 요청량·이행량을 **함께** 받는다. 없으면 리듀서가 진척을 0 으로 적는데(`requested ? … : 0`),
|
|
935
|
+
* 그것은 「모른다」가 아니라 「아무것도 안 됐다」로 읽힌다 — 결측을 0 으로 메우지 않는다.
|
|
936
|
+
*/
|
|
937
|
+
required: ["orderId", "kind", "status", "requested", "fulfilled"],
|
|
938
|
+
fields: {
|
|
939
|
+
orderId: "string",
|
|
940
|
+
kind: "string",
|
|
941
|
+
status: "string",
|
|
942
|
+
requested: "number",
|
|
943
|
+
fulfilled: "number",
|
|
944
|
+
gtin: "string",
|
|
945
|
+
held: "boolean",
|
|
946
|
+
lines: "object[]",
|
|
947
|
+
priority: "number",
|
|
948
|
+
startTime: "string",
|
|
949
|
+
endTime: "string",
|
|
950
|
+
/* 확보분은 `{ epc, qty }` 줄이다(2026-09-19, ADR-0076 보탬) — 옛 EPC 목록은 받지 않는다. */
|
|
951
|
+
allocated: "object[]",
|
|
952
|
+
bizTransaction: "string",
|
|
953
|
+
operationsRequestId: "string",
|
|
954
|
+
dockDoor: "string",
|
|
955
|
+
windowStartMs: "number",
|
|
956
|
+
recordTime: "string",
|
|
957
|
+
/*
|
|
958
|
+
* 이 오더를 어느 레시피로 돌리나 — 「이 로트를 무엇으로 만들었나」가 이 칸을 지나 답한다.
|
|
959
|
+
*
|
|
960
|
+
* ── 왜 뒤늦게 생겼나 (2026-09-07 측정) ─────────────────────────────────
|
|
961
|
+
* EPCIS 변환 사건에는 레시피 자리가 없다(표준이 그렇다). 그래서 이력추적이 **변환 → 거래
|
|
962
|
+
* 식별자 → 그 오더의 `recipeKey`** 로 건너간다(`twin-lineage-query.ts:296-315`).
|
|
963
|
+
*
|
|
964
|
+
* 변환이 오더를 가리키게 만든 뒤에 재보니, **가리켜진 오더 행에 그 칸이 없었다.** 실으면
|
|
965
|
+
* 레코드가 통째로 거절됐다 — `order: 계약에 없는 필드 — recipeKey`. 조용히 버리지 않은 것은
|
|
966
|
+
* 맞지만, 그래서 실 시스템에서는 그 물음이 계속 답이 없었다.
|
|
967
|
+
*
|
|
968
|
+
* 값은 원본에 있다: `job_orders.recipe_key` 35개 중 20개 채움
|
|
969
|
+
* (`WO-ECU-STD-2609A` = `RECIPE-ECU-STD`).
|
|
970
|
+
*
|
|
971
|
+
* 새 어휘가 아니다 — 계약이 `recipeKey` 를 네 자리에서 이미 쓴다. 오더 관측에만 자리가 없었다.
|
|
972
|
+
*/
|
|
973
|
+
recipeKey: "string",
|
|
974
|
+
recipeBasis: "object",
|
|
975
|
+
materialBasis: "object[]",
|
|
976
|
+
/* 근거 칸이 빈 까닭 — 닫힌 낱말이다(§`BASIS_UNKNOWN`). 투입이 근거 장치보다 먼저였던 오더도 이행은 사실이다. */
|
|
977
|
+
basisUnknown: "string"
|
|
978
|
+
},
|
|
979
|
+
/* 상태·종류는 도메인이 소유한다 — 닫지 않는다. 근거가 빈 까닭은 커널이 읽으므로 닫는다. */
|
|
980
|
+
enums: { basisUnknown: BASIS_UNKNOWN },
|
|
981
|
+
/*
|
|
982
|
+
* 확보분의 안쪽을 본다 — 열쇠와 수 둘이다(§`AllocatedQuantity`). 안 보면 틀린 이름이 조용히
|
|
983
|
+
* 지나가고(`epcs`·`quantity` 따위), 미러는 잡힌 수를 0 으로 읽는다.
|
|
984
|
+
*/
|
|
985
|
+
shapes: {
|
|
986
|
+
materialBasis: {
|
|
987
|
+
required: ["basisId", "materialId", "revisionId", "revisionNumber", "planId", "contentHash", "businessTime", "material"],
|
|
988
|
+
fields: { basisId: "string", materialId: "string", revisionId: "string", revisionNumber: "number", planId: "string", contentHash: "string", businessTime: "string" }
|
|
989
|
+
// Recursive material properties and reference lists are checked by isMaterialExecutionBasis.
|
|
990
|
+
},
|
|
991
|
+
recipeBasis: {
|
|
992
|
+
required: ["basisId", "recipeId", "revisionId", "planId", "contentHash", "businessTime", "recipe"],
|
|
993
|
+
fields: { basisId: "string", recipeId: "string", revisionId: "string", planId: "string", contentHash: "string", businessTime: "string" }
|
|
994
|
+
// Owned composition and captured route are additionally checked by isRecipeExecutionBasis below.
|
|
995
|
+
},
|
|
996
|
+
allocated: {
|
|
997
|
+
required: ["epc", "qty"],
|
|
998
|
+
fields: { epc: "string", qty: "number" },
|
|
999
|
+
positive: ["qty"]
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
},
|
|
1003
|
+
quality: {
|
|
1004
|
+
eventType: OP_EVENT.quality,
|
|
1005
|
+
match: ["moverId", "good"],
|
|
1006
|
+
matchOrder: 15,
|
|
1007
|
+
identity: "moverId",
|
|
1008
|
+
// vocabulary-guard: allow 저널 와이어 필드
|
|
1009
|
+
/* 누적 카운터가 없으면 OEE 가 양품률을 못 센다 — 판정 하나만으로는 비율이 나오지 않는다. */
|
|
1010
|
+
required: ["moverId", "good", "goodCount", "nonconformingCount"],
|
|
1011
|
+
// vocabulary-guard: allow
|
|
1012
|
+
/*
|
|
1013
|
+
* `taskId` 는 **귀속**이다 — 이 산출이 어느 작업의 것인가. 수량의 뜻은 바뀌지 않는다(설비 누적).
|
|
1014
|
+
*
|
|
1015
|
+
* 왜 필요한가: 작업자가 올리는 실적은 작업 단위인데 이 갈래의 정체는 설비뿐이라, 두 사실이 만나는
|
|
1016
|
+
* 자리가 없었다. 귀속이 없으면 「이 작업에서 몇 개 나왔나」를 저널에서 되짚을 방법이 없다.
|
|
1017
|
+
*
|
|
1018
|
+
* 정체를 `taskId` 로 바꾸지 않는 이유는 OEE 가 설비 단위여서다. 정체를 옮기면 설비 누적을 셀 수
|
|
1019
|
+
* 없어진다.
|
|
1020
|
+
*/
|
|
1021
|
+
fields: { moverId: "string", good: "boolean", goodCount: "number", nonconformingCount: "number", taskId: "string", recordTime: "string" }
|
|
1022
|
+
// vocabulary-guard: allow
|
|
1023
|
+
},
|
|
1024
|
+
/*
|
|
1025
|
+
* **시험 결과** — 대상을 가리켜 들어온다(표준 `TestResult.TestableObjectID`).
|
|
1026
|
+
*
|
|
1027
|
+
* `result` 를 **요구하지 않는다**: 재기만 하고 판정하지 않는 원천이 정상이고, 요구하면 그 원천의
|
|
1028
|
+
* 사실을 아예 담을 수 없다(§`TestResult.result`). 비어 있으면 커널이 선언된 기준으로 판정하고
|
|
1029
|
+
* `derived` 를 세운다 — 판정하지 못하면 비워 둔다.
|
|
1030
|
+
*
|
|
1031
|
+
* `propertyMeasurements` 안쪽은 재검사하지 않는다 — 그 모양은 `PropertyMeasurement` 계약이고,
|
|
1032
|
+
* 여기서 두 번 지키면 두 벌이 된다(설비 `motion` 과 같은 규율).
|
|
1033
|
+
*/
|
|
1034
|
+
/*
|
|
1035
|
+
* **마감된 설비 상태 구간** — 이 설비가 이 구간 동안 이 상태였다.
|
|
1036
|
+
*
|
|
1037
|
+
* ── 전이만으로는 안 되는 이유 (2026-08-30) ───────────────────────────────
|
|
1038
|
+
* 세 가지다. 셋째가 결정적이다.
|
|
1039
|
+
*
|
|
1040
|
+
* 사유가 붙을 자리가 없다 기계가 서는 순간에는 왜 섰는지 아무도 모른다. 작업자가 라인이 다시
|
|
1041
|
+
* 돈 뒤에 적는다. 그 사이에 전이가 더 있으면 어느 전이에 붙일지 정할 수 없다
|
|
1042
|
+
* 계획·비계획을 나중에 정한다 ISO 22400 은 계획정지를 계획 조업 시간에서 빼고 고장은 빼지 않는다.
|
|
1043
|
+
* 그 분류는 전이가 일어난 순간에 모른다
|
|
1044
|
+
* 전이를 내지 않는 정지가 많다 자재 대기 · 앞 공정 대기 · 작업자 부재. 기계는 전원이 켜진 채 `idle`
|
|
1045
|
+
* 이고 신호가 하나도 안 나온다. OEE 에서 가장 크게 깎이는 것이 보통 이 시간이다
|
|
1046
|
+
*
|
|
1047
|
+
* 마지막이 감시 시스템과 MES 가 갈리는 자리이기도 하다. 설비가 말하는 것만 모으면 감시이고,
|
|
1048
|
+
* **설비가 말하지 못하는 것을 사람이 적어 넣는 자리**가 MES 다.
|
|
1049
|
+
*
|
|
1050
|
+
* ── 이름이 `downtime` 이 아닌 이유 ────────────────────────────────────────
|
|
1051
|
+
* 이 구간은 `setup` 과 `planned-stop` 도 나른다. 그 둘은 정지가 아니다. 담는 것은 **상태 구간**이고,
|
|
1052
|
+
* 어느 상태인지는 `status` 가 말한다.
|
|
1053
|
+
*
|
|
1054
|
+
* ── 되돌아가 적는 사실이다 ───────────────────────────────────────────────
|
|
1055
|
+
* 봉투의 사건 시각은 **구간의 끝**(그때 성립한다)이고, 적은 시각은 `recordTime` 이다. 둘이 갈려 있어야
|
|
1056
|
+
* 「언제 일어났나」와 「언제 알았나」를 구별할 수 있다.
|
|
1057
|
+
*/
|
|
1058
|
+
"equipment-period": {
|
|
1059
|
+
eventType: OP_EVENT.equipmentPeriod,
|
|
1060
|
+
match: ["moverId", "status", "from", "to"],
|
|
1061
|
+
matchOrder: 10,
|
|
1062
|
+
identity: "moverId",
|
|
1063
|
+
// vocabulary-guard: allow 저널 와이어 필드 — 전이와 같은 이름을 쓴다
|
|
1064
|
+
required: ["moverId", "status", "from", "to"],
|
|
1065
|
+
// vocabulary-guard: allow 위와 같은 이유
|
|
1066
|
+
fields: {
|
|
1067
|
+
moverId: "string",
|
|
1068
|
+
status: "string",
|
|
1069
|
+
from: "string",
|
|
1070
|
+
to: "string",
|
|
1071
|
+
// vocabulary-guard: allow
|
|
1072
|
+
/* 사람이 정한 사유 — 없을 수 있다(적지 않은 것과 사유가 없는 것은 다르므로 지어내지 않는다). */
|
|
1073
|
+
reasonCode: "string",
|
|
1074
|
+
decidedBy: "string",
|
|
1075
|
+
recordTime: "string",
|
|
1076
|
+
workShiftBasis: "object"
|
|
1077
|
+
},
|
|
1078
|
+
shapes: {
|
|
1079
|
+
workShiftBasis: {
|
|
1080
|
+
required: ["basisId", "arrangementId", "revisionId", "revisionNumber", "planId", "contentHash", "businessTime", "timezone", "shifts", "workDate"],
|
|
1081
|
+
fields: { basisId: "string", arrangementId: "string", revisionId: "string", revisionNumber: "number", planId: "string", contentHash: "string", businessTime: "string", timezone: "string", workDate: "string" }
|
|
1082
|
+
}
|
|
1083
|
+
},
|
|
1084
|
+
enums: { status: EQUIPMENT_STATUS }
|
|
1085
|
+
},
|
|
1086
|
+
/*
|
|
1087
|
+
* **부적합 처분** — 재고 판정을 받은 것을 어떻게 하기로 정했나.
|
|
1088
|
+
*
|
|
1089
|
+
* ── 이 통이 늦게 생긴 이유 (2026-08-30) ──────────────────────────────────
|
|
1090
|
+
* 사건 이름(`OP_EVENT.disposition`)과 모양(`DispositionFact`)을 먼저 만들고 **여기로 오는 길을
|
|
1091
|
+
* 내지 않았다.** 그래서 처분 사실을 보내면 어느 통도 아니어서 떨어진 목록에도 남지 않고 사라졌다.
|
|
1092
|
+
* MES 전문가가 소스를 읽다 찾았다.
|
|
1093
|
+
*
|
|
1094
|
+
* 이 파일의 위 주석이 말한 부류 그대로다 — `OP_EVENT.test` 와 `OP_EVENT.observation` 이 같은 일을
|
|
1095
|
+
* 겪었고 이번이 셋째다. **계약에 자리를 만드는 것과 그 자리로 가는 길을 내는 것은 다른 일이다.**
|
|
1096
|
+
*
|
|
1097
|
+
* ── 판정과 다른 사실이다 ─────────────────────────────────────────────────
|
|
1098
|
+
* 근거가 된 판정(`specId`)을 가리킬 수 있지만 **필수가 아니다** — 판정 없이 현장 재량으로 빼는 일이
|
|
1099
|
+
* 정상이다. 그래서 정체성은 처분 대상(`subjectId`)이다.
|
|
1100
|
+
*/
|
|
1101
|
+
disposition: {
|
|
1102
|
+
eventType: OP_EVENT.disposition,
|
|
1103
|
+
match: ["subjectId", "decision"],
|
|
1104
|
+
matchOrder: 80,
|
|
1105
|
+
identity: "subjectId",
|
|
1106
|
+
/* 무엇을 어떻게 하기로 했나 — 둘 중 하나가 없으면 그 결정은 아무 데도 붙지 못한다. */
|
|
1107
|
+
required: ["subjectId", "decision"],
|
|
1108
|
+
fields: {
|
|
1109
|
+
subjectId: "string",
|
|
1110
|
+
decision: "string",
|
|
1111
|
+
quantity: "number",
|
|
1112
|
+
uom: "string",
|
|
1113
|
+
specId: "string",
|
|
1114
|
+
decidedBy: "string",
|
|
1115
|
+
reason: "string",
|
|
1116
|
+
decidedAt: "string",
|
|
1117
|
+
recordTime: "string"
|
|
1118
|
+
},
|
|
1119
|
+
enums: { decision: DISPOSITION_DECISION }
|
|
1120
|
+
},
|
|
1121
|
+
/*
|
|
1122
|
+
* **로트 상태** — ISA-95 `MaterialLot.Status`. 출하 승인(batch release)이 들어오는 문(§`OP_EVENT.materialLot`).
|
|
1123
|
+
*
|
|
1124
|
+
* `disposition`(subjectId + decision) 과 필드가 겹치지 않는다 — 여기는 `lotId` + `status`. 정체 이름이 표준
|
|
1125
|
+
* `MaterialLotID` 인 이유가 하나 더 있다: 이 문은 `epc` 를 든 레코드를 EPCIS 어휘로 보고 받지 않는다
|
|
1126
|
+
* (§`operationalKindOf`). 값은 로트의 식별자(`ItemState.epc` 와 같은 값)다. 상태 낱말은 열려 있어 enum 이
|
|
1127
|
+
* 없다(오더 상태와 같은 규율). 로트 전체의 사실이므로 부분(`subLotId`)은 받지 않는다 — 부분마다 다른 상태가
|
|
1128
|
+
* 필요해지면 그것은 다른 사실이다.
|
|
1129
|
+
*
|
|
1130
|
+
* ── 낱말은 열리고 **효과는 닫힌다** (2026-09-19, ADR-0080 결정 2) ────────────
|
|
1131
|
+
* `status` 는 현장의 낱말이다(`on-hold` · `quarantine` · `검사대기` — 도메인이 소유한다). 커널이 그
|
|
1132
|
+
* 낱말을 읽어 「보류면 할당에서 뺀다」를 정하면, 현장이 다른 낱말을 쓰는 날 조용히 샌다.
|
|
1133
|
+
*
|
|
1134
|
+
* 그래서 **효과를 따로 싣는다**: `use` 는 닫힌 둘(`allowed` · `blocked`)이고 기계가 읽는다. 낱말의
|
|
1135
|
+
* 주인이 둘을 같이 정한다 — 자원 속성에서 이미 선 원칙 그대로다(속성은 열리고 효과는 닫힌다).
|
|
1136
|
+
*
|
|
1137
|
+
* **`use` 가 없는 레코드는 `allowed` 가 아니라 「모름」이다.** 그래서 필수로 만들지 않는다: 이 문을
|
|
1138
|
+
* 이미 쓰고 있는 원본이 있으면 그 사실이 통째로 거절되는 것이 더 나쁘다. 모르는 것을 할당이 어떻게
|
|
1139
|
+
* 다루는지는 커널이 한 곳에서 정하고 그 수를 센다.
|
|
1140
|
+
*/
|
|
1141
|
+
"material-lot": {
|
|
1142
|
+
eventType: OP_EVENT.materialLot,
|
|
1143
|
+
match: ["lotId", "status"],
|
|
1144
|
+
matchOrder: 85,
|
|
1145
|
+
identity: "lotId",
|
|
1146
|
+
required: ["lotId", "status"],
|
|
1147
|
+
fields: { lotId: "string", status: "string", use: "string", decidedBy: "string", reason: "string", decidedAt: "string", recordTime: "string" },
|
|
1148
|
+
enums: { use: MATERIAL_LOT_USE }
|
|
1149
|
+
},
|
|
1150
|
+
test: {
|
|
1151
|
+
eventType: OP_EVENT.test,
|
|
1152
|
+
match: ["testableObjectId"],
|
|
1153
|
+
matchOrder: 70,
|
|
1154
|
+
identity: "testableObjectId",
|
|
1155
|
+
/* 무엇을 어느 기준으로 시험했나 — 둘 중 하나가 없으면 그 결과는 아무 데도 붙지 못한다. */
|
|
1156
|
+
required: ["testableObjectId", "specId"],
|
|
1157
|
+
fields: {
|
|
1158
|
+
testableObjectId: "string",
|
|
1159
|
+
specId: "string",
|
|
1160
|
+
result: "string",
|
|
1161
|
+
at: "string",
|
|
1162
|
+
expiresAt: "string",
|
|
1163
|
+
derived: "boolean",
|
|
1164
|
+
propertyMeasurements: "object[]",
|
|
1165
|
+
specificationBasis: "object",
|
|
1166
|
+
recordTime: "string"
|
|
1167
|
+
},
|
|
1168
|
+
shapes: {
|
|
1169
|
+
specificationBasis: {
|
|
1170
|
+
required: ["id", "revisionId", "planId", "contentHash", "businessTime", "criteria"],
|
|
1171
|
+
fields: { id: "string", revisionId: "string", planId: "string", contentHash: "string", businessTime: "string" }
|
|
1172
|
+
}
|
|
1173
|
+
},
|
|
1174
|
+
enums: { result: ["pass", "fail"] }
|
|
1175
|
+
},
|
|
1176
|
+
/*
|
|
1177
|
+
* **자리의 물리 관측** — 어느 자리의 어느 속성을 언제 얼마로 쟀나.
|
|
1178
|
+
*
|
|
1179
|
+
* 값에 **단위를 함께** 받는다(`ValueType`). 단위 없는 물리량은 판정의 재료가 못 된다 — 3 이 섭씨인지
|
|
1180
|
+
* 화씨인지 모르면 어떤 기준으로도 판정할 수 없다. 다만 **요구하지는 않는다**: 단위를 비우는 실 원본이
|
|
1181
|
+
* 흔하고, 요구하면 그 원본의 관측을 아예 담지 못한다(그때 판정은 커널이 거부한다 — `outsideLimit`).
|
|
1182
|
+
*
|
|
1183
|
+
* `effectiveTime` 도 요구하지 않는다. 없으면 봉투의 시각이 그 자리를 대신한다(§`resolve`) — 원본이
|
|
1184
|
+
* 시각을 말하지 않는 수기 점검이 실재하고, 그때 지어낸 시각보다 폴링 시각이 정직하다.
|
|
1185
|
+
*/
|
|
1186
|
+
/*
|
|
1187
|
+
* **이 목록이 전부다** — 연결된 시스템이 현재 목록을 한 바퀴 다 보낸 뒤 알린다.
|
|
1188
|
+
*
|
|
1189
|
+
* 둘 다 요구한다: 어느 목록인지와 그 주기를 **시작한** 시각. 시각이 없으면 무엇을 지울지 가릴 수
|
|
1190
|
+
* 없고, 그때 지우면 전부 지운다 — 받지 않는 것이 옳다.
|
|
1191
|
+
*/
|
|
1192
|
+
complete: {
|
|
1193
|
+
eventType: OP_EVENT.complete,
|
|
1194
|
+
match: ["completeAxis"],
|
|
1195
|
+
matchOrder: 100,
|
|
1196
|
+
identity: "completeAxis",
|
|
1197
|
+
required: ["completeAxis", "since"],
|
|
1198
|
+
fields: { completeAxis: "string", since: "string", recordTime: "string" }
|
|
1199
|
+
},
|
|
1200
|
+
observation: {
|
|
1201
|
+
eventType: OP_EVENT.observation,
|
|
1202
|
+
match: ["locationId", "propertyId"],
|
|
1203
|
+
matchOrder: 90,
|
|
1204
|
+
identity: "locationId",
|
|
1205
|
+
/* 자리와 속성 — 둘 중 하나가 없으면 그 관측은 아무 데도 붙지 못한다. */
|
|
1206
|
+
required: ["locationId", "propertyId"],
|
|
1207
|
+
fields: {
|
|
1208
|
+
locationId: "string",
|
|
1209
|
+
propertyId: "string",
|
|
1210
|
+
value: "string",
|
|
1211
|
+
dataType: "string",
|
|
1212
|
+
uom: "string",
|
|
1213
|
+
effectiveTime: "string",
|
|
1214
|
+
effectiveEndTime: "string",
|
|
1215
|
+
recordTime: "string",
|
|
1216
|
+
source: "string",
|
|
1217
|
+
derived: "boolean"
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
};
|
|
1221
|
+
var MATCH_ORDER = Object.keys(SPECS).sort((a, b) => (SPECS[a].matchOrder ?? 1e3) - (SPECS[b].matchOrder ?? 1e3));
|
|
1222
|
+
|
|
1223
|
+
// src/values.ts
|
|
1224
|
+
var STATE_VALUE_LISTS = {
|
|
1225
|
+
status: EQUIPMENT_STATUS
|
|
1226
|
+
};
|
|
1227
|
+
var STATE_FIELD_WORDS = {
|
|
1228
|
+
status: { ko: "\uC6B4\uC601 \uC0C1\uD0DC", en: "Operating status", ja: "\u904B\u7528\u72B6\u614B", zh: "\u8FD0\u884C\u72B6\u6001", es: "Estado operativo", ms: "Status operasi" }
|
|
1229
|
+
};
|
|
1230
|
+
var VALUE_COLOURS = {
|
|
1231
|
+
busy: "#1a8f4c",
|
|
1232
|
+
setup: "#d99a1c",
|
|
1233
|
+
down: "#c93f30",
|
|
1234
|
+
idle: "#8a959c",
|
|
1235
|
+
"planned-stop": "#3b6fb6"
|
|
1236
|
+
};
|
|
1237
|
+
var DEFAULT_VALUE_COLOUR = "#d5dade";
|
|
1238
|
+
function legendRowsOf(field) {
|
|
1239
|
+
const values = STATE_VALUE_LISTS[field] ?? [];
|
|
1240
|
+
return {
|
|
1241
|
+
...Object.fromEntries(values.map((value) => [value, { color: VALUE_COLOURS[value] ?? DEFAULT_VALUE_COLOUR }])),
|
|
1242
|
+
default: { color: DEFAULT_VALUE_COLOUR }
|
|
1243
|
+
};
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1246
|
+
// src/words.ts
|
|
1247
|
+
var unusedSettingWords = (key) => ({
|
|
1248
|
+
ko: `${key}\uC740(\uB294) \uC774 \uB2A5\uB825\uC5D0\uC11C \uC0AC\uC6A9\uD558\uC9C0 \uC54A\uB294 \uC124\uC815\uC785\uB2C8\uB2E4. \uC0AD\uC81C\uD558\uC138\uC694.`,
|
|
1249
|
+
en: `${key} is not a setting of this capability. Remove it.`,
|
|
1250
|
+
ja: `${key} \u306F\u3053\u306E\u6A5F\u80FD\u3067\u306F\u4F7F\u308F\u306A\u3044\u8A2D\u5B9A\u3067\u3059\u3002\u524A\u9664\u3057\u3066\u304F\u3060\u3055\u3044\u3002`,
|
|
1251
|
+
zh: `${key} \u4E0D\u662F\u6B64\u80FD\u529B\u4F7F\u7528\u7684\u8BBE\u7F6E\u3002\u8BF7\u5220\u9664\u3002`,
|
|
1252
|
+
es: `${key} no es un ajuste de esta capacidad. Elim\xEDnelo.`,
|
|
1253
|
+
ms: `${key} bukan tetapan keupayaan ini. Padamkannya.`
|
|
1254
|
+
});
|
|
1255
|
+
var noPartWords = (field) => ({
|
|
1256
|
+
ko: `${field.ko}\uC744(\uB97C) \uD45C\uC2DC\uD560 \uBD80\uD488\uC744 \uD558\uB098 \uC774\uC0C1 \uC120\uD0DD\uD558\uC138\uC694.`,
|
|
1257
|
+
en: `Choose at least one part to show ${field.en.toLowerCase()}.`,
|
|
1258
|
+
ja: `${field.ja}\u3092\u8868\u793A\u3059\u308B\u90E8\u54C1\u3092\u4E00\u3064\u4EE5\u4E0A\u9078\u3093\u3067\u304F\u3060\u3055\u3044\u3002`,
|
|
1259
|
+
zh: `\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u663E\u793A${field.zh}\u7684\u90E8\u4EF6\u3002`,
|
|
1260
|
+
es: `Elija al menos una pieza que muestre ${field.es.toLowerCase()}.`,
|
|
1261
|
+
ms: `Pilih sekurang-kurangnya satu bahagian untuk menunjukkan ${field.ms.toLowerCase()}.`
|
|
1262
|
+
});
|
|
1263
|
+
var missingPartWords = (part) => ({
|
|
1264
|
+
ko: `${part} \uBD80\uD488\uC774 \uC774 \uD53C\uADDC\uC5B4\uC5D0 \uC5C6\uC2B5\uB2C8\uB2E4. \uB2E4\uB978 \uBD80\uD488\uC744 \uC120\uD0DD\uD558\uC138\uC694.`,
|
|
1265
|
+
en: `This figure has no part ${part}. Choose another part.`,
|
|
1266
|
+
ja: `\u3053\u306E\u56F3\u5F62\u306B\u90E8\u54C1 ${part} \u306F\u3042\u308A\u307E\u305B\u3093\u3002\u5225\u306E\u90E8\u54C1\u3092\u9078\u3093\u3067\u304F\u3060\u3055\u3044\u3002`,
|
|
1267
|
+
zh: `\u6B64\u56FE\u5F62\u6CA1\u6709\u90E8\u4EF6 ${part}\u3002\u8BF7\u9009\u62E9\u5176\u4ED6\u90E8\u4EF6\u3002`,
|
|
1268
|
+
es: `Esta figura no tiene la pieza ${part}. Elija otra pieza.`,
|
|
1269
|
+
ms: `Figura ini tiada bahagian ${part}. Pilih bahagian lain.`
|
|
1270
|
+
});
|
|
1271
|
+
var NO_ENTITY_TYPE_WORDS = {
|
|
1272
|
+
ko: "\uC774 \uD53C\uADDC\uC5B4\uAC00 \uB098\uD0C0\uB0B4\uB294 \uC5D4\uD2F0\uD2F0 \uC885\uB958\uB97C \uD558\uB098 \uC774\uC0C1 \uC120\uD0DD\uD558\uC138\uC694.",
|
|
1273
|
+
en: "Choose at least one entity type this figure draws.",
|
|
1274
|
+
ja: "\u3053\u306E\u56F3\u5F62\u304C\u8868\u3059\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306E\u7A2E\u985E\u3092\u4E00\u3064\u4EE5\u4E0A\u9078\u3093\u3067\u304F\u3060\u3055\u3044\u3002",
|
|
1275
|
+
zh: "\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u6B64\u56FE\u5F62\u8868\u793A\u7684\u5B9E\u4F53\u7C7B\u578B\u3002",
|
|
1276
|
+
es: "Elija al menos un tipo de entidad que represente esta figura.",
|
|
1277
|
+
ms: "Pilih sekurang-kurangnya satu jenis entiti yang dilukis oleh figura ini."
|
|
1278
|
+
};
|
|
1279
|
+
|
|
1280
|
+
// src/generate.ts
|
|
1281
|
+
var TWIN_ENTITY_NAME = "twin.Entity";
|
|
1282
|
+
var TWIN_COMMAND_ACTION = "twin.command";
|
|
1283
|
+
var COMMAND_WORDS = Object.freeze({
|
|
1284
|
+
"resource.hold": { ko: "\uACC4\uD68D \uC815\uC9C0", en: "Plan stop", ja: "\u8A08\u753B\u505C\u6B62", zh: "\u8BA1\u5212\u505C\u673A", es: "Parada planificada", ms: "Henti terancang" },
|
|
1285
|
+
"resource.resume": { ko: "\uC7AC\uAC1C", en: "Resume", ja: "\u518D\u958B", zh: "\u6062\u590D", es: "Reanudar", ms: "Sambung semula" },
|
|
1286
|
+
"resource.down": { ko: "\uACE0\uC7A5 \uC8FC\uC785", en: "Inject fault", ja: "\u6545\u969C\u6CE8\u5165", zh: "\u6CE8\u5165\u6545\u969C", es: "Inyectar fallo", ms: "Suntik kerosakan" },
|
|
1287
|
+
"resource.repair": { ko: "\uC218\uB9AC", en: "Repair", ja: "\u4FEE\u7406", zh: "\u7EF4\u4FEE", es: "Reparar", ms: "Baiki" },
|
|
1288
|
+
"resource.reset-metrics": { ko: "\uC9C0\uD45C \uB9AC\uC14B", en: "Reset metrics", ja: "\u6307\u6A19\u30EA\u30BB\u30C3\u30C8", zh: "\u91CD\u7F6E\u6307\u6807", es: "Reiniciar m\xE9tricas", ms: "Set semula metrik" }
|
|
1289
|
+
});
|
|
1290
|
+
var commandInteractionsOf = (key) => CAPABILITIES[key].commands.map((command) => ({ meaning: "actions", action: TWIN_COMMAND_ACTION, value: command, label: COMMAND_WORDS[command] }));
|
|
1291
|
+
var twinCapabilityName = (key) => `twin.${key[0].toUpperCase()}${key.slice(1)}`;
|
|
1292
|
+
var legendRoleOf = (field) => `twin-${field}`;
|
|
1293
|
+
var partsSettingOf = (field) => `${field}Parts`;
|
|
1294
|
+
var listedFieldsOf = (key) => CAPABILITIES[key].stateFields.filter((field) => STATE_VALUE_LISTS[field]);
|
|
1295
|
+
var partsOf = (settings, field) => {
|
|
1296
|
+
const parts = (settings ?? {})[partsSettingOf(field)];
|
|
1297
|
+
return Array.isArray(parts) ? parts.filter((p) => typeof p === "string") : [];
|
|
1298
|
+
};
|
|
1299
|
+
function listedSettingsIssues(key, settings, asset) {
|
|
1300
|
+
const fields = listedFieldsOf(key);
|
|
1301
|
+
const keys = fields.map(partsSettingOf);
|
|
1302
|
+
const parts = new Set(asset.appearance.map((a) => a.target));
|
|
1303
|
+
const out = [];
|
|
1304
|
+
for (const k of Object.keys(settings ?? {})) if (!keys.includes(k)) out.push(unusedSettingWords(k));
|
|
1305
|
+
for (const field of fields) {
|
|
1306
|
+
const chosen = partsOf(settings, field);
|
|
1307
|
+
if (!chosen.length) out.push(noPartWords(STATE_FIELD_WORDS[field]));
|
|
1308
|
+
for (const part of chosen) if (!parts.has(part)) out.push(missingPartWords(part));
|
|
1309
|
+
}
|
|
1310
|
+
return out;
|
|
1311
|
+
}
|
|
1312
|
+
function listedDataInterface(key, settings) {
|
|
1313
|
+
const fields = listedFieldsOf(key).filter((field) => partsOf(settings, field).length);
|
|
1314
|
+
if (!fields.length) return void 0;
|
|
1315
|
+
return {
|
|
1316
|
+
schema: fields.map((field) => ({ name: field, label: STATE_FIELD_WORDS[field].ko, kind: "text" })),
|
|
1317
|
+
bindings: fields.map((field) => ({
|
|
1318
|
+
id: legendRoleOf(field),
|
|
1319
|
+
label: STATE_FIELD_WORDS[field].ko,
|
|
1320
|
+
accessor: field,
|
|
1321
|
+
rule: "table",
|
|
1322
|
+
lookup: "code",
|
|
1323
|
+
targets: { parts: partsOf(settings, field) },
|
|
1324
|
+
table: legendRowsOf(field),
|
|
1325
|
+
legend: { role: legendRoleOf(field) }
|
|
1326
|
+
}))
|
|
1327
|
+
};
|
|
1328
|
+
}
|
|
1329
|
+
function twinCapability(spec) {
|
|
1330
|
+
const { key } = spec;
|
|
1331
|
+
const fields = listedFieldsOf(key);
|
|
1332
|
+
return {
|
|
1333
|
+
name: twinCapabilityName(key),
|
|
1334
|
+
label: spec.label,
|
|
1335
|
+
note: spec.note,
|
|
1336
|
+
version: spec.version,
|
|
1337
|
+
needs: [TWIN_ENTITY_NAME, ...spec.needs ?? []],
|
|
1338
|
+
data: [...CAPABILITIES[key].stateFields, ...spec.moreData ?? []].map((name) => ({ name })),
|
|
1339
|
+
...fields.length ? {
|
|
1340
|
+
settings: fields.map((field) => ({ key: partsSettingOf(field), kind: "parts", label: STATE_FIELD_WORDS[field], required: true })),
|
|
1341
|
+
check: (settings, asset) => listedSettingsIssues(key, settings, asset),
|
|
1342
|
+
dataInterface: (settings) => listedDataInterface(key, settings)
|
|
1343
|
+
} : {},
|
|
1344
|
+
...spec.cards?.length ? { cards: () => spec.cards } : {},
|
|
1345
|
+
...CAPABILITIES[key].commands.length ? { interactions: () => commandInteractionsOf(key) } : {},
|
|
1346
|
+
takes: (settings) => ({
|
|
1347
|
+
...spec.takesItems ? { items: true } : {},
|
|
1348
|
+
...fields.length ? { parts: fields.flatMap((field) => partsOf(settings, field)) } : {}
|
|
1349
|
+
})
|
|
1350
|
+
};
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
// src/entity.ts
|
|
1354
|
+
var TWIN_ACTIONS = {
|
|
1355
|
+
preview: "twin.preview-entity",
|
|
1356
|
+
info: "twin.entity-info",
|
|
1357
|
+
open: "twin.open-entity",
|
|
1358
|
+
command: TWIN_COMMAND_ACTION
|
|
1359
|
+
};
|
|
1360
|
+
var PREVIEW_WORDS = { ko: "\uBBF8\uB9AC\uBCF4\uAE30", en: "Preview", ja: "\u30D7\u30EC\u30D3\u30E5\u30FC", zh: "\u9884\u89C8", es: "Vista previa", ms: "Pratonton" };
|
|
1361
|
+
var INFO_WORDS = { ko: "\uC815\uBCF4", en: "Info", ja: "\u60C5\u5831", zh: "\u4FE1\u606F", es: "Informaci\xF3n", ms: "Maklumat" };
|
|
1362
|
+
var OPEN_WORDS = { ko: "360 \uC5F4\uAE30", en: "Open 360", ja: "360 \u3092\u958B\u304F", zh: "\u6253\u5F00 360", es: "Abrir 360", ms: "Buka 360" };
|
|
1363
|
+
var TWIN_ENTITY_INTERACTIONS = Object.freeze([
|
|
1364
|
+
{ meaning: "preview", action: TWIN_ACTIONS.preview, label: PREVIEW_WORDS },
|
|
1365
|
+
{ meaning: "select", action: TWIN_ACTIONS.info, label: INFO_WORDS },
|
|
1366
|
+
{ meaning: "enter", action: TWIN_ACTIONS.open, label: OPEN_WORDS },
|
|
1367
|
+
/* The actions menu (amendment 1 decision 8): these two, then each capability's commands (`commandInteractionsOf`) */
|
|
1368
|
+
{ meaning: "actions", action: TWIN_ACTIONS.info, label: INFO_WORDS },
|
|
1369
|
+
{ meaning: "actions", action: TWIN_ACTIONS.open, label: OPEN_WORDS }
|
|
1370
|
+
]);
|
|
1371
|
+
var ENTITY_TYPES_SETTING = "types";
|
|
1372
|
+
function entityTypesOf(settings) {
|
|
1373
|
+
const types = (settings ?? {})[ENTITY_TYPES_SETTING];
|
|
1374
|
+
return Array.isArray(types) ? types.filter((t) => typeof t === "string" && t.trim() !== "") : [];
|
|
1375
|
+
}
|
|
1376
|
+
function entitySettingsIssues(settings) {
|
|
1377
|
+
const out = [];
|
|
1378
|
+
for (const key of Object.keys(settings ?? {})) if (key !== ENTITY_TYPES_SETTING) out.push(unusedSettingWords(key));
|
|
1379
|
+
if (!entityTypesOf(settings).length) out.push(NO_ENTITY_TYPE_WORDS);
|
|
1380
|
+
return out;
|
|
1381
|
+
}
|
|
1382
|
+
var ENTITY = {
|
|
1383
|
+
name: TWIN_ENTITY_NAME,
|
|
1384
|
+
label: { ko: "\uD2B8\uC708 \uC5D4\uD2F0\uD2F0", en: "Twin entity", ja: "\u30C4\u30A4\u30F3\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3", zh: "\u5B6A\u751F\u5B9E\u4F53", es: "Entidad del gemelo", ms: "Entiti kembar" },
|
|
1385
|
+
note: {
|
|
1386
|
+
ko: "\uC774 \uD53C\uADDC\uC5B4\uAC00 \uB098\uD0C0\uB0B4\uB294 \uD2B8\uC708 \uC5D4\uD2F0\uD2F0 \uC885\uB958\uB97C \uC815\uD569\uB2C8\uB2E4. \uD2B8\uC708\uC740 \uC774 \uC885\uB958\uC758 \uC5D4\uD2F0\uD2F0\uB97C \uC774 \uD53C\uADDC\uC5B4\uB85C \uADF8\uB9BD\uB2C8\uB2E4. \uC6B4\uC601 \uC0C1\uD0DC \xB7 \uBCF4\uAD00 \xB7 \uC774\uB3D9 \uB2A5\uB825\uC740 \uC774 \uB2A5\uB825 \uC704\uC5D0 \uCF2D\uB2C8\uB2E4.",
|
|
1387
|
+
en: "Sets the twin entity types this figure draws. The twin draws entities of these types with it. Operating status, storage and motion are turned on over this capability.",
|
|
1388
|
+
ja: "\u3053\u306E\u56F3\u5F62\u304C\u8868\u3059\u30C4\u30A4\u30F3\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306E\u7A2E\u985E\u3092\u6C7A\u3081\u307E\u3059\u3002\u30C4\u30A4\u30F3\u306F\u3053\u306E\u7A2E\u985E\u306E\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u3092\u3053\u306E\u56F3\u5F62\u3067\u63CF\u304D\u307E\u3059\u3002\u904B\u7528\u72B6\u614B\u30FB\u4FDD\u7BA1\u30FB\u79FB\u52D5\u306E\u6A5F\u80FD\u306F\u3053\u306E\u6A5F\u80FD\u306E\u4E0A\u3067\u30AA\u30F3\u306B\u3057\u307E\u3059\u3002",
|
|
1389
|
+
zh: "\u8BBE\u7F6E\u6B64\u56FE\u5F62\u8868\u793A\u7684\u5B6A\u751F\u5B9E\u4F53\u7C7B\u578B\u3002\u5B6A\u751F\u7528\u6B64\u56FE\u5F62\u7ED8\u5236\u8FD9\u4E9B\u7C7B\u578B\u7684\u5B9E\u4F53\u3002\u8FD0\u884C\u72B6\u6001\u3001\u5B58\u653E\u548C\u79FB\u52A8\u80FD\u529B\u5728\u6B64\u80FD\u529B\u4E4B\u4E0A\u5F00\u542F\u3002",
|
|
1390
|
+
es: "Define los tipos de entidad del gemelo que dibuja esta figura. El gemelo dibuja con ella las entidades de esos tipos. El estado operativo, el almacenamiento y el movimiento se activan sobre esta capacidad.",
|
|
1391
|
+
ms: "Menetapkan jenis entiti kembar yang dilukis oleh figura ini. Kembar melukis entiti jenis tersebut dengan figura ini. Status operasi, simpanan dan pergerakan dihidupkan di atas keupayaan ini."
|
|
1392
|
+
},
|
|
1393
|
+
version: "2",
|
|
1394
|
+
needs: [],
|
|
1395
|
+
/* The marker the twin sends with every entity's data (headless-twin entity-delta `entity`) */
|
|
1396
|
+
data: [{ name: "entity" }],
|
|
1397
|
+
settings: [{ key: ENTITY_TYPES_SETTING, kind: "choice", label: { ko: "\uC5D4\uD2F0\uD2F0 \uC885\uB958", en: "Entity types", ja: "\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306E\u7A2E\u985E", zh: "\u5B9E\u4F53\u7C7B\u578B", es: "Tipos de entidad", ms: "Jenis entiti" }, multiple: true, required: true }],
|
|
1398
|
+
check: (settings) => entitySettingsIssues(settings),
|
|
1399
|
+
takes: () => ({}),
|
|
1400
|
+
/*
|
|
1401
|
+
* 엔티티 공통의 상호작용(ADR-0209 결정 4, ADR-0208 개정 1 결정 12): 미리보기는 이름과 핵심 상태, 선택은 정보 창, 들어가기는 엔티티 360, 동작
|
|
1402
|
+
* 메뉴는 그 엔티티에 할 수 있는 일. 무엇을 할지는 트윈 보드에 등록된 동작이 정한다 — 다른 보드에서는 정의만 남고 아무 일도 하지 않는다.
|
|
1403
|
+
*/
|
|
1404
|
+
interactions: () => TWIN_ENTITY_INTERACTIONS
|
|
1405
|
+
};
|
|
1406
|
+
|
|
1407
|
+
// src/mobile.ts
|
|
1408
|
+
var MOBILE = twinCapability({
|
|
1409
|
+
key: "mobile",
|
|
1410
|
+
label: { ko: "\uC774\uB3D9", en: "Mobile", ja: "\u79FB\u52D5", zh: "\u79FB\u52A8", es: "Movimiento", ms: "Pergerakan" },
|
|
1411
|
+
note: {
|
|
1412
|
+
ko: "\uD2B8\uC708\uC774 \uAD00\uCE21\uD55C \uC704\uCE58\uC640 \uC774\uB3D9\uC73C\uB85C \uD53C\uADDC\uC5B4\uB97C \uC790\uB9AC \uC0AC\uC774\uC5D0\uC11C \uC6C0\uC9C1\uC785\uB2C8\uB2E4. \uD53C\uADDC\uC5B4\uC758 \uC55E\uBA74\uC774 \uC9C4\uD589 \uBC29\uD5A5\uC744 \uD5A5\uD569\uB2C8\uB2E4.",
|
|
1413
|
+
en: "Moves the figure between locations as the twin observes it moving, its front face ahead.",
|
|
1414
|
+
ja: "\u30C4\u30A4\u30F3\u304C\u89B3\u6E2C\u3057\u305F\u4F4D\u7F6E\u3068\u79FB\u52D5\u3067\u3001\u56F3\u5F62\u3092\u5834\u6240\u306E\u9593\u3067\u52D5\u304B\u3057\u307E\u3059\u3002\u56F3\u5F62\u306E\u524D\u9762\u304C\u9032\u884C\u65B9\u5411\u3092\u5411\u304D\u307E\u3059\u3002",
|
|
1415
|
+
zh: "\u6309\u5B6A\u751F\u89C2\u6D4B\u5230\u7684\u4F4D\u7F6E\u548C\u79FB\u52A8,\u5728\u4F4D\u7F6E\u4E4B\u95F4\u79FB\u52A8\u56FE\u5F62\u3002\u56FE\u5F62\u7684\u6B63\u9762\u671D\u5411\u524D\u8FDB\u65B9\u5411\u3002",
|
|
1416
|
+
es: "Mueve la figura entre ubicaciones seg\xFAn el gemelo la observa moverse, con su cara frontal por delante.",
|
|
1417
|
+
ms: "Menggerakkan figura antara lokasi seperti yang diperhatikan oleh kembar, dengan muka hadapannya menghala ke arah pergerakan."
|
|
1418
|
+
},
|
|
1419
|
+
version: "2"
|
|
1420
|
+
});
|
|
1421
|
+
|
|
1422
|
+
// src/operable.ts
|
|
1423
|
+
var OPERABLE = twinCapability({
|
|
1424
|
+
key: "operable",
|
|
1425
|
+
label: { ko: "\uC6B4\uC601 \uC0C1\uD0DC", en: "Operable", ja: "\u904B\u7528\u72B6\u614B", zh: "\u8FD0\u884C\u72B6\u6001", es: "Estado operativo", ms: "Status operasi" },
|
|
1426
|
+
note: {
|
|
1427
|
+
ko: "\uD2B8\uC708\uC774 \uAD00\uCE21\uD55C \uC124\uBE44 \uC0C1\uD0DC(\uAC00\uB3D9 \xB7 \uC900\uBE44 \xB7 \uACE0\uC7A5 \xB7 \uB300\uAE30 \xB7 \uACC4\uD68D\uC815\uC9C0)\uB97C \uC120\uD0DD\uD55C \uBD80\uD488\uC758 \uC0C9\uC73C\uB85C \uD45C\uC2DC\uD569\uB2C8\uB2E4. \uC0C9\uC740 \uC124\uBE44 \uC0C1\uD0DC \uBC94\uB840\uB97C \uB530\uB985\uB2C8\uB2E4.",
|
|
1428
|
+
en: "Shows the equipment status the twin observes (busy, setup, down, idle, planned stop) as the colour of the parts you pick, by the equipment status legend.",
|
|
1429
|
+
ja: "\u30C4\u30A4\u30F3\u304C\u89B3\u6E2C\u3057\u305F\u8A2D\u5099\u72B6\u614B(\u7A3C\u50CD\u30FB\u6BB5\u53D6\u308A\u30FB\u6545\u969C\u30FB\u5F85\u6A5F\u30FB\u8A08\u753B\u505C\u6B62)\u3092\u3001\u9078\u3093\u3060\u90E8\u54C1\u306E\u8272\u3067\u8868\u793A\u3057\u307E\u3059\u3002\u8272\u306F\u8A2D\u5099\u72B6\u614B\u306E\u51E1\u4F8B\u306B\u5F93\u3044\u307E\u3059\u3002",
|
|
1430
|
+
zh: "\u7528\u6240\u9009\u90E8\u4EF6\u7684\u989C\u8272\u663E\u793A\u5B6A\u751F\u89C2\u6D4B\u5230\u7684\u8BBE\u5907\u72B6\u6001(\u8FD0\u884C\u3001\u51C6\u5907\u3001\u6545\u969C\u3001\u7A7A\u95F2\u3001\u8BA1\u5212\u505C\u673A)\u3002\u989C\u8272\u9075\u5FAA\u8BBE\u5907\u72B6\u6001\u56FE\u4F8B\u3002",
|
|
1431
|
+
es: "Muestra el estado del equipo que observa el gemelo (en marcha, preparaci\xF3n, averiado, inactivo, parada planificada) con el color de las piezas que elija, seg\xFAn la leyenda de estado del equipo.",
|
|
1432
|
+
ms: "Menunjukkan status peralatan yang diperhatikan oleh kembar (sibuk, persediaan, rosak, melahu, henti terancang) dengan warna bahagian yang anda pilih, mengikut petunjuk status peralatan."
|
|
1433
|
+
},
|
|
1434
|
+
version: "3",
|
|
1435
|
+
/* 설비 상태 배지 — 피규어 위 */
|
|
1436
|
+
cards: [{ id: "status", anchor: "top", label: { ko: "\uC124\uBE44 \uC0C1\uD0DC", en: "Equipment status", ja: "\u8A2D\u5099\u72B6\u614B", zh: "\u8BBE\u5907\u72B6\u6001", es: "Estado del equipo", ms: "Status peralatan" } }]
|
|
1437
|
+
});
|
|
1438
|
+
|
|
1439
|
+
// src/storable.ts
|
|
1440
|
+
var STORABLE = twinCapability({
|
|
1441
|
+
key: "storable",
|
|
1442
|
+
label: { ko: "\uBCF4\uAD00", en: "Storable", ja: "\u4FDD\u7BA1", zh: "\u5B58\u653E", es: "Almacenamiento", ms: "Simpanan" },
|
|
1443
|
+
note: {
|
|
1444
|
+
ko: "\uD2B8\uC708\uC774 \uAD00\uCE21\uD55C \uC774 \uC790\uB9AC\uC758 \uBB3C\uD488\uC744 \uD53C\uADDC\uC5B4\uC758 \uC801\uC7AC \uC704\uCE58\uC5D0 \uB193\uC2B5\uB2C8\uB2E4. \uBB3C\uD488\uC758 \uBAA8\uC591\uC740 \uC0AC\uC5C5\uC7A5\uC758 \uC544\uC774\uD15C \uD0C0\uC785 \uD45C\uAC00 \uC815\uD569\uB2C8\uB2E4.",
|
|
1445
|
+
en: "Puts the items the twin observes at this location in the figure's places. How an item looks is set by the workspace's item type table.",
|
|
1446
|
+
ja: "\u30C4\u30A4\u30F3\u304C\u89B3\u6E2C\u3057\u305F\u3053\u306E\u5834\u6240\u306E\u7269\u54C1\u3092\u3001\u56F3\u5F62\u306E\u7A4D\u8F09\u4F4D\u7F6E\u306B\u7F6E\u304D\u307E\u3059\u3002\u7269\u54C1\u306E\u5F62\u306F\u4E8B\u696D\u6240\u306E\u30A2\u30A4\u30C6\u30E0\u30BF\u30A4\u30D7\u8868\u304C\u6C7A\u3081\u307E\u3059\u3002",
|
|
1447
|
+
zh: "\u628A\u5B6A\u751F\u89C2\u6D4B\u5230\u7684\u6B64\u4F4D\u7F6E\u7684\u7269\u54C1\u653E\u5230\u56FE\u5F62\u7684\u88C5\u8F7D\u4F4D\u7F6E\u3002\u7269\u54C1\u7684\u5916\u89C2\u7531\u5DE5\u4F5C\u533A\u7684\u7269\u54C1\u7C7B\u578B\u8868\u51B3\u5B9A\u3002",
|
|
1448
|
+
es: "Coloca en los puestos de la figura los art\xEDculos que el gemelo observa en esta ubicaci\xF3n. El aspecto de cada art\xEDculo lo define la tabla de tipos de art\xEDculo del espacio de trabajo.",
|
|
1449
|
+
ms: "Meletakkan item yang diperhatikan oleh kembar di lokasi ini pada tempat muatan figura. Rupa item ditetapkan oleh jadual jenis item ruang kerja."
|
|
1450
|
+
},
|
|
1451
|
+
version: "2",
|
|
1452
|
+
needs: [
|
|
1453
|
+
["Holdable", "FlowNode"],
|
|
1454
|
+
["Capacity", "FlowNode"]
|
|
1455
|
+
],
|
|
1456
|
+
moreData: ["items"],
|
|
1457
|
+
takesItems: true,
|
|
1458
|
+
/* 점유 게이지 — 피규어 아래(상태 배지와 겹치지 않게) */
|
|
1459
|
+
cards: [{ id: "occupancy", anchor: "bottom", label: { ko: "\uC810\uC720", en: "Occupancy", ja: "\u5360\u6709", zh: "\u5360\u7528", es: "Ocupaci\xF3n", ms: "Penghunian" } }]
|
|
1460
|
+
});
|
|
1461
|
+
|
|
1462
|
+
// src/module.ts
|
|
1463
|
+
var provider = "twin";
|
|
1464
|
+
var label = { ko: "\uD2B8\uC708", en: "Twin", ja: "\u30C4\u30A4\u30F3", zh: "\u5B6A\u751F", es: "Gemelo", ms: "Kembar" };
|
|
1465
|
+
var version = "0.5.3";
|
|
1466
|
+
var capabilities = [ENTITY, OPERABLE, STORABLE, MOBILE];
|
|
1467
|
+
export {
|
|
1468
|
+
capabilities,
|
|
1469
|
+
label,
|
|
1470
|
+
provider,
|
|
1471
|
+
version
|
|
1472
|
+
};
|