riku
2021-06-30 9f12f5605ebffbf6312db9d653f434d56cda20c3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package com.flightfeather.uav.model.epw
 
import com.flightfeather.uav.lightshare.bean.CompanySOP
import com.flightfeather.uav.lightshare.bean.DataVo
import com.flightfeather.uav.model.*
import com.flightfeather.uav.socket.eunm.FactorType
import java.math.BigDecimal
 
/**
 * 工业企业污染权重分析模型
 * 根据走航监测数据,结合风速、风向、监测点与企业的相对位置等因素,计算企业对监测区域的影响程度
 * @author riku
 */
class EPWModel : BaseModel<DataVo, CompanySOP>() {
 
    override var dataPrep: BaseDataPrep<DataVo, CompanySOP> = EPWDataPrep()
 
    override var factorTypes: List<FactorType> = WeightType.weightType
 
    override var weights: List<BaseWeight<DataVo, CompanySOP>> = listOf(WindDirWeight(), WindDisWeight())
 
    override var sections: List<BaseSection<DataVo, CompanySOP>> = listOf(TimeSection())
 
    override fun mDataCheck(m: DataVo): Boolean = !(m.lng == null || m.lng == 0.0 || m.lat == null || m.lat == 0.0)
 
    override fun sopCheck(s: CompanySOP): Boolean =
        !(s.ciLongitude == null || s.ciLongitude == BigDecimal(0) || s.ciLatitude == null || s.ciLatitude == BigDecimal(0))
 
}