package com.hdkj.lt.bf.common;

import java.math.BigDecimal;

/**
 * 状估监测阈值常量
 * <p>
 * 馈线电压: ±7% (ratio 0.93~1.07)
 * 配变电压: -10% ~ +7% (ratio 0.90~1.07)
 * 用户0.4kV: ±10%一般, -20%~+15%严重 (ratio 0.80~1.10一般, 0.80~0.90/1.10~1.15严重)
 * 负载率: ≥80%重载, ≥100%过载
 *
 * @author lsl
 * @since 2026-07-23
 */
public final class SeMonitorThreshold {

    private SeMonitorThreshold() {}

    // === 馈线电压 ±7% ===
    public static final BigDecimal FEEDER_V_OVER = new BigDecimal("1.07");
    public static final BigDecimal FEEDER_V_UNDER = new BigDecimal("0.93");

    // === 配变电压 -10% ~ +7% ===
    public static final BigDecimal MVTRANS_V_OVER = new BigDecimal("1.07");
    public static final BigDecimal MVTRANS_V_UNDER = new BigDecimal("0.90");

    // === 用户0.4kV ±10%一般 ===
    public static final BigDecimal CONSUMER_GENERAL_V_OVER = new BigDecimal("1.10");
    public static final BigDecimal CONSUMER_GENERAL_V_UNDER = new BigDecimal("0.90");

    // === 用户0.4kV -20%~+15%严重 ===
    public static final BigDecimal CONSUMER_SEVERE_V_OVER = new BigDecimal("1.15");
    public static final BigDecimal CONSUMER_SEVERE_V_UNDER = new BigDecimal("0.80");

    // === 负载率 ===
    public static final BigDecimal LOAD_RATE_HEAVY = new BigDecimal("80");
    public static final BigDecimal LOAD_RATE_OVERLOAD = new BigDecimal("100");

    // === 持续越限触发: 时间跨度 ≥ 60分钟 ===
    public static final long TRIGGER_DURATION_MINUTES = 60L;

    // === 断面间隔(分钟) — 超过则重置 ===
    public static final long SNAP_INTERVAL_MINUTES = 15L;

    // === 量测中心分批查 consNo 每批大小 ===
    public static final int CONS_BATCH_SIZE = 50;

    // === 基准电压 ===
    public static final BigDecimal FEEDER_BASE_KV = new BigDecimal("10");
    public static final BigDecimal MVTRANS_BASE_KV = new BigDecimal("0.22");
    public static final BigDecimal CONSUMER_BASE_V = new BigDecimal("220");
}