|
|
|
|
@ -1277,7 +1277,7 @@ bool nmCalculationAutoFitPSO::writeSurrogateCandidateCsv(const QString& candidat
|
|
|
|
|
//
|
|
|
|
|
// 文件位置通常是 ML/nmWTAI-ML/data/temp/pso_screen_candidates_<run_id>_gen<N>.csv。
|
|
|
|
|
// 字段顺序必须与 ML 脚本 score_pso_candidates*.py 保持一致:
|
|
|
|
|
// particle_id,k,skin,wellboreC,phi,h,Ct,Cf
|
|
|
|
|
// particle_id,k,skin,wellboreC,phi,h,Cf
|
|
|
|
|
//
|
|
|
|
|
// 这里写的是“完整参数体系”中的关键字段,不是粒子内部紧凑向量。
|
|
|
|
|
// 例如用户没有勾选 Cf 时,Cf 会从当前 DataManager 取值写入 CSV。
|
|
|
|
|
@ -1290,7 +1290,7 @@ bool nmCalculationAutoFitPSO::writeSurrogateCandidateCsv(const QString& candidat
|
|
|
|
|
|
|
|
|
|
QTextStream out(&file);
|
|
|
|
|
// 代理模型只需要这些输入字段;其它参数当前不在训练输入集中。
|
|
|
|
|
out << "particle_id,k,skin,wellboreC,phi,h,Ct,Cf\n";
|
|
|
|
|
out << "particle_id,k,skin,wellboreC,phi,h,Cf\n";
|
|
|
|
|
|
|
|
|
|
for(int i = 0; i < m_swarm.size(); ++i) {
|
|
|
|
|
QVector<double> params = buildTraceParameterVector(m_swarm[i].position);
|
|
|
|
|
@ -1301,7 +1301,6 @@ bool nmCalculationAutoFitPSO::writeSurrogateCandidateCsv(const QString& candidat
|
|
|
|
|
<< traceParamAt(params, 2)
|
|
|
|
|
<< traceParamAt(params, 3)
|
|
|
|
|
<< traceParamAt(params, 5)
|
|
|
|
|
<< traceParamAt(params, 6)
|
|
|
|
|
<< traceParamAt(params, 7);
|
|
|
|
|
out << cols.join(",") << "\n";
|
|
|
|
|
}
|
|
|
|
|
@ -1899,10 +1898,10 @@ bool nmCalculationAutoFitPSO::isSurrogateRunContextSupported(QString* reason) co
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 参数 gate:代理输入目前只覆盖 k/skin/wellboreC/phi/h/Ct。
|
|
|
|
|
// 参数 gate:代理输入目前只覆盖 k/skin/wellboreC/phi/h,Cf 作为固定背景参数传入。
|
|
|
|
|
// 用户勾选其它参数时,代理无法可靠反映这些参数变化,直接禁用代理筛选。
|
|
|
|
|
QVector<int> allowedParamIndices;
|
|
|
|
|
allowedParamIndices << 0 << 1 << 2 << 3 << 5 << 6;
|
|
|
|
|
allowedParamIndices << 0 << 1 << 2 << 3 << 5;
|
|
|
|
|
|
|
|
|
|
for(int i = 0; i < m_enabledParamIndices.size(); ++i) {
|
|
|
|
|
if(!allowedParamIndices.contains(m_enabledParamIndices[i])) {
|
|
|
|
|
|