ÎļþÃû´Ó src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/exceptiontype/RTExcChangeRate.kt ÐÞ¸Ä |
| | |
| | | * @date 2025/6/10 |
| | | * @author feiyu02 |
| | | */ |
| | | open class RTExcChangeRate(config: RTExcWindLevelConfig) : |
| | | abstract class BaseRTExcChangeRate(config: RTExcWindLevelConfig) : |
| | | BaseExceptionContinuous<ExceptionTag, RTExcWindLevelConfig, PollutedClue>(config, ExceptionTag::class.java) { |
| | | |
| | | constructor(config: RTExcWindLevelConfig, callback: NewPolluteClueCallback) : this(config){ |
| | |
| | | |
| | | private var callback: NewPolluteClueCallback? = null |
| | | |
| | | open var changeRate = this.config.changeRateUp |
| | | abstract var changeRate: MutableMap<FactorType, RTExcWindLevelConfig.WindLevelCondition> |
| | | |
| | | override fun getExceptionType(): ExceptionType { |
| | | return ExceptionType.TYPE9 |
| | |
| | | |
| | | val rate = changeRate[f] |
| | | |
| | | if (rate != null && n.windSpeed!! in rate.windSpeed.first..rate.windSpeed.second) { |
| | | val pValue = p.getByFactorType(f)!! |
| | | val nValue = n.getByFactorType(f)!! |
| | | // 计ç®åä¸ä¸ªæ°æ®ç¸æ¯äºåä¸ä¸ªæ°æ®çååéç |
| | | val v = (nValue - pValue) |
| | | |
| | | val b1 = if (rate != null) { |
| | | v in rate.mutationRate.first..rate.mutationRate.second |
| | | } else { |
| | | false |
| | | } |
| | | // val r = (nValue - pValue) / pValue |
| | | // val b1 = r >= con.mutationRate.first && r < con.mutationRate.second |
| | | val b1 = v in rate.mutationRate.first..rate.mutationRate.second |
| | | println("å åï¼${f.des}ï¼éçï¼${v}ï¼${b1}") |
| | | res[f] = b1 |
| | | } else { |
| | | res[f] = false |
| | | } |
| | | } |
| | | return res |
| | | } |