高级算法模块代码调整

This commit is contained in:
2023-08-18 08:43:29 +08:00
parent ee5a97ac85
commit 86829c206c
3 changed files with 9 additions and 12 deletions

View File

@@ -99,7 +99,10 @@ public class EventRelevantAnalysisServiceImpl extends ServiceImpl<RmpEventAdvanc
LocalDateTime date = LocalDateTime.now(); LocalDateTime date = LocalDateTime.now();
HandleEvent handleEvent = new HandleEvent(); HandleEvent handleEvent = new HandleEvent();
// 分析的事件进行处理 // 分析的事件进行处理
List<EntityGroupEvtData> baseList = handleEvent.getData(generalDeviceInfoClient, startTime, endTime); List<EntityGroupEvtData> baseList = handleEvent.getData(startTime, endTime);
if(CollectionUtil.isEmpty(baseList)){
throw new BusinessException("当前时间段暂无可分析事件");
}
// 传入的处理事件根据物理隔绝进行分组 // 传入的处理事件根据物理隔绝进行分组
@@ -219,6 +222,8 @@ public class EventRelevantAnalysisServiceImpl extends ServiceImpl<RmpEventAdvanc
entityPqsRelevance.setTimeId(date); entityPqsRelevance.setTimeId(date);
relevantLogMapper.insert(entityPqsRelevance); relevantLogMapper.insert(entityPqsRelevance);
}else {
throw new BusinessException("当前无变压器策略,请先配置策略");
} }
log.info("事件关联分析用时:" + timeInterval.interval() / 1000 + ""); log.info("事件关联分析用时:" + timeInterval.interval() / 1000 + "");
@@ -492,7 +497,7 @@ public class EventRelevantAnalysisServiceImpl extends ServiceImpl<RmpEventAdvanc
return group_buf; return group_buf;
} }
public List<EntityGroupEvtData> getData(GeneralDeviceInfoClient generalDeviceInfoClient, LocalDateTime startTime, LocalDateTime endTime) { public List<EntityGroupEvtData> getData(LocalDateTime startTime, LocalDateTime endTime) {
List<EntityGroupEvtData> entityGroupEvtDataList = new ArrayList<>(); List<EntityGroupEvtData> entityGroupEvtDataList = new ArrayList<>();
List<DictData> advanceType = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.EVENT_TYPE.getCode()).getData(); List<DictData> advanceType = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.EVENT_TYPE.getCode()).getData();

View File

@@ -26,7 +26,7 @@ public class JnaCallDllOrSo {
int beginIndex = os != null && os.startsWith("Windows") ? 1 : 0; int beginIndex = os != null && os.startsWith("Windows") ? 1 : 0;
if(beginIndex == 0){ if(beginIndex == 0){
//linux操作系统 //linux操作系统
this.nameDll = name+".os"; this.nameDll = "lib"+name+".os";
this.path = URLDecoder.decode(this.getClass().getProtectionDomain().getCodeSource().getLocation().getPath(), "UTF-8"); this.path = URLDecoder.decode(this.getClass().getProtectionDomain().getCodeSource().getLocation().getPath(), "UTF-8");
}else { }else {
this.nameDll = name+".dll"; this.nameDll = name+".dll";

View File

@@ -18,15 +18,7 @@ public class UtilNormalization {
} }
entityMtrans.getMtrans()[i][i] = 0; entityMtrans.getMtrans()[i][i] = 0;
} }
// 根据transformer设置元素
for (i = 0; i < len; i++) {
node1 = transformer[i].getNode_h();
node2 = transformer[i].getNode_l();
con = transformer[i].getType();
//TODO
//entityMtrans.getMtrans()[node1 - 1][node2 - 1] = con;
//entityMtrans.getMtrans()[node2 - 1][node1 - 1] = con;
}
StringBuilder str = new StringBuilder(); StringBuilder str = new StringBuilder();
for (i = 0; i < FinalData.NODE_NUM; i++) { for (i = 0; i < FinalData.NODE_NUM; i++) {
for (j = 0; j < FinalData.NODE_NUM; j++) { for (j = 0; j < FinalData.NODE_NUM; j++) {