import type { MeasuredEstimate } from './measured-estimator.js'; /** * UN/CEFACT 권고 20 공통코드 → m/s 변환. 모르는 코드는 변환하지 않는다(발명 금지). * * **내보내는 이유**: 선언 화면·AI 가 「어떤 단위를 받나」를 말해야 하고, 그 목록이 두 곳에 적히면 * 화면이 받아 준 단위를 추정기가 모르는 일이 생긴다(그때 공정 시간이 오류 없이 사라진다). */ export declare const SPEED_TO_MPS: Record; /** 우리가 읽는 canonical 설비 속성 ID — 표준이 속성 ID 어휘를 정하지 않으므로 한 곳에서 정한다. */ export declare const EQUIPMENT_PROPERTY: { readonly speed: "speed"; }; /** 추정기 문맥 — 커널 `DurationContext` 와 같은 모양(커널 타입에 의존하지 않기 위해 구조로 맞춘다). */ export interface DurationCtx { kind: string; fromNode: string; toNode: string; resourceKind?: string; } /** * 추정기 — 숫자(평균만) 또는 추정치 객체(퍼짐까지). 커널 `DurationEstimator` 와 같은 모양. * 거리 계산은 숫자를 내고, 실측은 관측된 퍼짐을 함께 낸다. */ export interface DurationEstimatorLike { estimate(ctx: DurationCtx): number | MeasuredEstimate | undefined; } export interface TravelEstimatorInput { /** 노드 중심 좌표(masterToTwin 산출 `model.layout`). */ layout?: Record; /** 무버(자원) — kind 와 속성. `model.equipment`. */ equipment?: { id: string; kind: string; properties?: { id: string; value: string; uom?: string; }[]; }[]; /** 좌표 단위(공간 `content.unit`). 미터가 아니면 계산하지 않는다(환산을 추측하지 않는다). */ unit?: string; } export interface TravelEstimatorResult { estimator?: { estimate(ctx: DurationCtx): number | undefined; }; /** 왜 못 만들었나(만들었으면 비어 있음) — 알리지 않고 없는 상태로 두지 않는다. */ reasons: string[]; /** 속도를 읽어낸 자원 종류들 — 무엇이 계산 대상인지 드러낸다. */ speedsByKind: Record; } /** * 이동시간 추정기를 만든다 — 만들 수 없으면 **이유와 함께** 비운다. * `estimator` 가 undefined 면 커널은 명세·상수로 굴러가고, `reasons` 가 왜 그런지 말한다. */ export declare function buildTravelEstimator(input: TravelEstimatorInput): TravelEstimatorResult; /** * 추정기 사슬 — 앞선 것이 답하면 그 값, 아니면 다음. **실측 → 계산 → (커널이) 명세 → 상수** 순서를 * 이 사슬과 커널 `durationOf` 가 함께 만든다. 앞에 둘수록 강한 근거다. */ export declare function chainEstimators(estimators: (DurationEstimatorLike | undefined)[]): DurationEstimatorLike | undefined;