曲线采样点数改为80

feature/MultiWellAutoFit-20260805
lvjunjie 5 days ago
parent e73b5ab453
commit e1a8610df4

@ -3936,9 +3936,9 @@ struct TrustRegionEvaluation
static bool trustRegionResidualsValid(
const AutoFitObjectiveBreakdown& breakdown)
{
// 损失函数固定使用 50 个压力点和 50 个导数点。严格校验长度,避免
// 损失函数固定使用 80 个压力点和 80 个导数点。严格校验长度,避免
// Jacobian 沿用旧维度后访问另一候选的短残差向量。
if(!breakdown.valid || breakdown.residualVector.size() != 100) {
if(!breakdown.valid || breakdown.residualVector.size() != 160) {
return false;
}
@ -4248,7 +4248,7 @@ StopReasonPSO nmCalculationAutoFitPSO::runTrustRegionFitting()
bool modelRebuiltAtMinimumRadius = false;
StopReasonPSO stopReason = PSO_MAX_ITERATIONS;
// jacobian 的行对应固定 100 维残差,列对应用户勾选的参数。
// jacobian 的行对应固定 160 维残差,列对应用户勾选的参数。
// 三个 gradient 单独描述诊断分量对参数的局部变化,只用于本轮选参。
QVector<QVector<double> > jacobian;
QVector<double> verticalGradient(dimensions, 0.0);
@ -6516,7 +6516,7 @@ double nmCalculationAutoFitPSO::calculateLogLogCurveError(
const double invalidLoss = 1.0e10;
const double valueFloor = 1.0e-12;
const double minimumCoverage = 0.95;
const int numPoints = 50;
const int numPoints = 80;
m_lastObjectiveBreakdown = AutoFitObjectiveBreakdown();
if(!validateLogLogData(target) || !validateLogLogData(result)) {
@ -6754,7 +6754,7 @@ double nmCalculationAutoFitPSO::calculateLogLogCurveError(
}
// 通过门槛后最多只缺少首尾少量目标点。按模拟曲线端点趋势补齐后,
// 每个候选仍在固定 50 点上计算均方根误差,不能靠少算难拟合端点获益。
// 每个候选仍在固定 80 点上计算均方根误差,不能靠少算难拟合端点获益。
for(int i = 0; i < numPoints; ++i) {
if(isFiniteNumber(pressureResidual[i]) &&
isFiniteNumber(derivativeResidual[i])) {
@ -7335,7 +7335,7 @@ double nmCalculationAutoFitPSO::calculateLogLogCurveError(
0.5 * breakdown.pressureLoss +
0.5 * breakdown.derivativeLoss;
} else {
// 非代理总目标等于固定 100 维普通残差的二范数;压力和
// 非代理总目标等于固定 160 维普通残差的二范数;压力和
// 导数各占一半能量。上下、左右和形状分量不参与候选排序与接受。
breakdown.total = qSqrt(
0.5 * breakdown.pressureLoss * breakdown.pressureLoss +

Loading…
Cancel
Save