Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SigerCalculation
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TCS-eConfigTool
SigerCalculation
Commits
019a241a
Commit
019a241a
authored
Dec 03, 2025
by
lvshi.gong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改报警枚举类型
parent
073323de
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
35 deletions
+4
-35
RamdomForestCalculate.cpp
SigerCalculation/RadomForestSAC/RamdomForestCalculate.cpp
+2
-6
common.h
SigerCalculation/RadomForestSAC/common.h
+2
-2
main.cpp
SigerCalculation/main.cpp
+0
-27
SigerCalculation
SigerCalculation/package/E3/SigerCalculation
+0
-0
No files found.
SigerCalculation/RadomForestSAC/RamdomForestCalculate.cpp
View file @
019a241a
...
...
@@ -136,7 +136,7 @@ RamdomForestCalculate::RamdomForestCalculate(QObject *parent)
}
//GLS Test
// StreamInfo info(1,"C$14$1$1$1$
202$0","176458120666
0-0","0");
// StreamInfo info(1,"C$14$1$1$1$
101$0","176473370427
0-0","0");
// SendStreamAlarminfo(info);
...
...
@@ -161,9 +161,6 @@ RamdomForestCalculate::RamdomForestCalculate(QObject *parent)
//重新训练
});
}
QString
RamdomForestCalculate
::
QueryPowerData
(
const
StreamInfo
&
alarmInfo
)
...
...
@@ -489,7 +486,7 @@ int RamdomForestCalculate::Save_SACDATA(const Dc_SacData &sacdata)
//dbFunc->addDataToQueue(data);
//step4: 删除二进制文件
//
QFile::remove(FilePath);
QFile
::
remove
(
FilePath
);
return
0
;
}
...
...
@@ -557,7 +554,6 @@ void RamdomForestCalculate::Retrain()
std
::
vector
<
int
>
TypeValues
;
DealRecord
(
record
,
FearValues
,
TypeValues
);
Classifier
->
train
(
FearValues
,
TypeValues
,
0.2
f
,
100
);
SPDLOG_LOGGER_DEBUG
(
spdlog
::
get
(
"logger"
),
"Begin Train RamdomForestModel"
);
}
SigerCalculation/RadomForestSAC/common.h
View file @
019a241a
...
...
@@ -3,9 +3,9 @@
enum
{
NORMAL
=
0
,
// 正常(缺省值)
BREAKAGE
=
1
,
// 断刀
BREAKAGE
=
3
,
// 断刀
CHIPPING
=
2
,
// 崩刃
WEAR
=
3
// 磨损
WEAR
=
1
// 磨损
};
//#define DEBUG_PRINT(fmt, ...) debug_printf(" [%s] " fmt, __func__, ##__VA_ARGS__)
...
...
SigerCalculation/main.cpp
View file @
019a241a
...
...
@@ -4,34 +4,9 @@
#include "spdlog/sinks/base_sink.h"
//#include "spdlog/sinks/rotating_file_sink.h"
#include "spdlog/sinks/daily_file_sink.h"
//#include "MonitorLogfile.h"
#include <QDir>
#include "MonitorLogfile.h"
//void initSpdlog()
//{
// try {
// QString logDir = qApp->applicationDirPath() + "/log";
// QDir dir(logDir);
// if (!dir.exists())
// dir.mkpath(logDir);
// QString filePath = logDir + "/SigerCalculation.log";
// auto logger = spdlog::daily_logger_mt("logger", filePath.toStdString(), 2, 30);
// logger->set_level(spdlog::level::debug);
// logger->flush_on(spdlog::level::debug);
// logger->set_pattern("[%Y-%m-%d %H:%M:%S.%e][thread %t][%l] : %v");
// SPDLOG_LOGGER_DEBUG(logger, "initSpdlog DEBUG!!!"); // 绝对会写
// logger->flush();
// }
// catch (const spdlog::spdlog_ex& ex) {
// qDebug() << "spdlog error:" << ex.what();
// }
//}
void
initSpdlog
()
{
try
...
...
@@ -76,8 +51,6 @@ int main(int argc, char *argv[])
RamdomForestCalculate
RandomCaculate
;
//qRegisterMetaType<Dc_SacData>("Dc_SacData");
// do_test1();
// TcpServerManager manager;
...
...
SigerCalculation/package/E3/SigerCalculation
View file @
019a241a
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment