From b74cbf10c1a1d9aba9d1a7b076614d897739bbd9 Mon Sep 17 00:00:00 2001 From: Aaron Fenyes Date: Fri, 19 Sep 2025 12:35:11 -0700 Subject: [PATCH] Tighten the tolerances --- app-proto/src/assembly.rs | 2 +- app-proto/src/engine.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app-proto/src/assembly.rs b/app-proto/src/assembly.rs index c31df47..6550238 100644 --- a/app-proto/src/assembly.rs +++ b/app-proto/src/assembly.rs @@ -744,7 +744,7 @@ impl Assembly { // look for a configuration with the given Gram matrix let Realization { result, history } = realize_gram( - &problem, 1.0e-12, 0.5, 0.9, 1.1, 200, 110 + &problem, 1.0e-20, 0.5, 0.9, 1.1, 400, 110 ); /* DEBUG */ diff --git a/app-proto/src/engine.rs b/app-proto/src/engine.rs index 491a2f9..4679aed 100644 --- a/app-proto/src/engine.rs +++ b/app-proto/src/engine.rs @@ -414,7 +414,7 @@ pub fn realize_gram( let tol = scale_adjustment * scaled_tol; // set up constants and variables related to minimizing the soft loss - const GRAD_TOL: f64 = 1e-9; + const GRAD_TOL: f64 = 1e-12; let mut grad_size = f64::INFINITY; let mut softness = 1.0; @@ -515,7 +515,7 @@ pub fn realize_gram( // if we're near a minimum of the total loss, but the hard loss still // isn't tolerably low, make the soft constraints softer const SOFTNESS_BACKOFF_THRESHOLD: f64 = 1e-6; - const SOFTNESS_BACKOFF: f64 = 0.9; + const SOFTNESS_BACKOFF: f64 = 0.95; if state.loss_hard >= tol && grad_size < softness * SOFTNESS_BACKOFF_THRESHOLD { softness *= SOFTNESS_BACKOFF; state = SearchState::from_config(gram, soft, softness, state.config);