feat(trigger): min convergence failure bound
Added a minimum value for the mean convergence failure which will never trigger. This prevents situations where one or two failures begine a trigger avalanche
This commit is contained in:
@@ -359,6 +359,9 @@ namespace gridfire::trigger::solver::CVODE {
|
|||||||
const gridfire::solver::CVODESolverStrategy::TimestepContext &ctx
|
const gridfire::solver::CVODESolverStrategy::TimestepContext &ctx
|
||||||
) const {
|
) const {
|
||||||
const float mean = current_mean();
|
const float mean = current_mean();
|
||||||
|
if (mean < 10) {
|
||||||
|
return false; // Avoid triggering on small means
|
||||||
|
}
|
||||||
if (static_cast<float>(ctx.currentConvergenceFailures) - mean > m_relativeFailureRate * mean) {
|
if (static_cast<float>(ctx.currentConvergenceFailures) - mean > m_relativeFailureRate * mean) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user