Files
HC900-Crawler/src/Infrastructure/Control/FeedRampJobStore.cs
windpacer 7b21c35af6 feat: 민감단온도 전환복귀제어 + SteamAdvisor + FeedRamp 전면 구현
=== 민감단온도(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: 각 패널 확장
2026-06-06 18:33:56 +09:00

39 lines
1.2 KiB
C#

using System.Collections.Concurrent;
using Hc900Crawler.Core.Application.Feedforward;
namespace Hc900Crawler.Infrastructure.Control;
/// <summary>작업 B: 컬럼별 활성 FEED 램프 작업 인메모리 저장소(싱글턴).</summary>
public sealed class FeedRampJobStore : IFeedRampJobStore
{
private readonly ConcurrentDictionary<int, FeedRampJob> _jobs = new();
public FeedRampJob Start(int columnId, double targetFeed, string op, bool dryRun)
{
var job = new FeedRampJob
{
ColumnId = columnId,
TargetFeed = targetFeed,
State = FeedRampState.Ramping,
StartedAt = DateTime.UtcNow,
Operator = op,
DryRun = dryRun
};
_jobs[columnId] = job;
return job;
}
public FeedRampJob? Get(int columnId) => _jobs.TryGetValue(columnId, out var j) ? j : null;
public IReadOnlyCollection<FeedRampJob> GetAll() => _jobs.Values.ToArray();
public void Update(FeedRampJob job) => _jobs[job.ColumnId] = job;
public bool Cancel(int columnId)
{
if (!_jobs.TryGetValue(columnId, out var j)) return false;
_jobs[columnId] = j with { State = FeedRampState.Canceled };
return true;
}
}