P0 셀프서비스 결정론 리포트 — 적산·물질수지 폐합·cleaning 마스크 (+ P1 온라인 스펙) #1
Reference in New Issue
Block a user
Delete Branch "feat/p0-selfservice-report"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
개요
운전원이 DCS/MES·전산팀 없이 기간 선택만으로 결정론 분석·리포트를 받는 셀프서비스 레이어(P0).
같은 메트릭 엔진을 history_table(60s)·fast_record(s/min) 양쪽에 적용(동일 long 포맷, source만 교체).
포함
검증 (풀기간 폐합)
마스크 후 6/7 컬럼 99~100% (C-6211 216.8→100.0, C-9111 133.2→99.9, C-9211 97.8→99.9, C-10211 121.9→99.1).
C-10111 91.4%는 C-9111↔C-10111 연결라인 시운전 중 홀드업 축적(정상 비정상상태, KPI가 표시).
라이브: C-9111 일일(04-10) 99.46%, C-6111 일일(05-15) 99.04%.
현장사실 규명
C-9111↔C-10111 잇는 라인 추가·시운전 중 — C-9111 drawdown 시 인출물이 C-10111 feed로 유입(FICQ-10101 0→~1090, 진공 750→45). 개별 컬럼 풀기간 수지 불성립의 주원인.
주의
문서
🤖 Generated with Claude Code
=== 민감단온도(T_C) 전환복귀제어 (작업플랜 구현) === - FeedforwardModels: TempLowLimit, TcReturnRebTarget/Band, TcReturnDeltaAdRef/Band 추가 - FeedforwardEngine: sigTLow (T_C 하한 트리거, -1e9=비활성) + 온도기반 복귀게이트(tcRecovered) -> Recovering→Returning 전이: mbRecovered(물질수지) OR tcRecovered(reb-A+ΔT+T_C) - FeedRampCalculator: 하강 램프 전면 구현 (RateUpPerMin/RateDnPerMin 분리, θ_up/θ_dn 분기, floor clamp) - FeedRampExecutorService: 하강 램프 step 방향 지원 - FeedforwardConfigStore: 신규 6개 컬럼 SELECT/INSERT/UPDATE - Hc900DbContext: temp_low_limit, tc_return_reb_target/band, tc_return_delta_ad_ref/band - FeedforwardController: API 노출 + feed-ramp start/cancel/status === SteamAdvisor === - SteamAdvisorController: steam map 로드/시각화/제품매칭/온도프로파일 - steam.js, steam.html: SteamAdvisor 전용 UI 패널 === Feed Ramp 실행 === - FeedRampExecutorService: BG service (BackgroundService) - FeedRampJobStore: in-memory job store - FfTrackingStore: ramp tracking DB - FeedforwardSupervisor/WriteGuard: SP 쓰기 advisory + rate-limit === 분석 스크립트 === - gen_temp_profiles.py: 컬럼 온도 프로파일 기준 산출 → c{prefix}_tempref.json - export_plotdata.py: analysis 결과 plot data export - gen_instrument_ranges.py: 계기 범위 생성 - c6111_extract.py: C-6111 추출/운전모드 분류 - run_column.py: 전체 분석 파이프라인 === Web UI === - ff.js/ff.html/ff.css: 전환류 상태기계 UI, TagBrowser, config save - fast.js: Fast 조작 패널 - trend.js, pb.js, llmchat.js: 각 패널 확장=== 컬럼명칭 통일 (c{prefix} → C-{prefix}11) === Python 분석스크립트: data pkl 경로 → gen_temp_profiles: tempref 파일명 → SteamAdvisorController: TagsFor() 숫자서픽스 → 풀컬럼키(C-6111), ToSuffix() 변환 steam.js: ST_TEMP_COLS ['61',...] → ['C-6111',...], selectbox defaultColumn appsettings.json: Columns 키 c61/c62/... → C-6111/C-6211/..., DefaultColumn c6111→C-6111 run_column.py: 추출/분석시 col_key = f"C-{{prefix}}11" C-{x}11_{model,tempref}.json: 신규 명칭 기준 기준프로파일/모델 7컬럼분 === SteamAdvisor 수정 === SteamModel: [JsonPropertyName] 매핑(snake_case → PascalCase 역직렬화) 예외처리: LinearCoeffs.Count < 3 방어코드 steam.js: catch(_) {} → 에러메시지 표시, missing_tags 응답처리 === Feedforward Controller 개선 === ff.js: 상승/하강 양방향 램프 confirm, 방향뱃지(↑↓), Normal 모드 표시 FeedforwardController: 업램프 단독제한 제거(양방향), tcReturnTcTarget/Band 노출 === DB === Hc900DbContext: realtime_table_tagname_key 레거시 UNIQUE 제약/인덱스 DROP 로직 Hc900Controllers: ToDictionaryAsync → GroupBy 변환 (중복 tagname 대응) === SIGPIPE 대응 === gateway.cpp: signal(SIGPIPE, SIG_IGN) 메인스레드 설치 modbus_tcp.cpp: send() flags 0 → MSG_NOSIGNAL (EPIPE 복구) sigpipe_ignore.c: LD_PRELOAD 우회 공유라이브러리 Hc900GatewayProcessService: LD_PRELOAD 환경변수 설정- z-score 추세 미니차트 제거 → time scrubber(슬라이더) 방식으로 전환 - 5초 폴링은 stTempLive만 갱신, 렌더링은 유저 액션(슬라이더/실시간버튼)으로만 - 실시간(thick blue) / 과거(thick amber + thin dashed live) 모드 분리 - 날짜 선택(date input) 추가 — 과거일 선택 시 00:00~23:59 전일 조회 - 실시간 버튼 클릭 시 오늘로 리셋 + 조회 재실행 - 타임스탬프 KST(UTC+9) 표시 - time_bucket → date_trunc('second', recorded_at) (TimescaleDB 의존성 제거) - 히스토리 조회 제한 4h→24h, 500→2000행- 제품 라벨(P0/P1)에 MSDS 화학물질명(PMA/PGMEA/EL) 매핑 레이어 추가 (product_labels.json, 플랜트=컬럼별). 통계 기준밴드는 데이터 산출 유지 - 운전원용 ⚙제품명 설정 모달: GET/POST /api/steam/productlabels/{col} - 온도기반 자동매칭 폐지 → 운전원이 고른 제품만 기준밴드로 비교, 미선택 시작 - 드롭다운: 탭 진입/컬럼변경 시 즉시 채움, 선택은 플랜트별 localStorage 유지 - 중복 '제품(수동)' 배지 제거(헤더 줄바꿈 해소) - 설계·검수 문서 추가 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>운전원이 올린 엑셀 템플릿의 {{ metric=...; column=... }} 토큰을, 선택한 날짜의 결정론 계산값으로 채워 다운로드하는 셀프서비스 리포트 레이어(P0). - 메트릭 3종: energy_efficiency·yield·control_residual (분 버킷 피벗, 클린필터, KST→UTC 경계). history_table(60s)·fast_record(s/min) 동일 long 포맷이라 source만 교체. - 컬럼→태그 매핑은 기존 appsettings SteamAdvisor:Columns 재사용(7컬럼 무료). - EPPlus 토큰 치환 + 셀 주석에 해상도 메타(source/sampling/n/keep) 부착. - report_template/report_run 테이블 + cells_json 감사 박제. - 리포트 탭(웹 UI) + 샘플 템플릿. 검증: 빌드 0에러. E2E 라운드트립 실동작(2026-05-15 C-6111 효율 0.778·수율 0.872· 잔차 mean 0.746 — 오프라인 검증값과 일치). 결정론 검증 게이트 준수(표본0=N/A, 0 날조 금지). ⚠️ EPPlus는 NonCommercial 컨텍스트 — 상용 출시 전 라이선스 정리 필요. 설계: docs/작업플랜-셀프서비스-분석리포트-MVP-P0-상세설계.md Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>온라인 히스토리안 2계층: history_1s(최근 14일, 고해상) + history_1min(장기, 60초). - history_1min 연속집계(timescaledb.continuous): time_bucket('1 min') + last(value)/last(controller_id). refresh 정책(start 3h, end 10min, 5분마다) → 집계 lag ≪ 보존윈도(14일)이라 1초 raw evict 전 materialize. - Hc900FastHistoryService.EnsureSchemaAsync에 cagg 생성+정책 멱등 추가. SQL 파일 동기화. 검증: 2계층 값 일치(1s last == 1min cagg), 정책 활성, 무손실 불변식 충족. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.