From 5f298e3bf2536acce72d7cb7d9cb5e51470730f7 Mon Sep 17 00:00:00 2001 From: FHoltorf <32248677+FHoltorf@users.noreply.github.com> Date: Tue, 26 Sep 2023 18:05:10 -0400 Subject: [PATCH] hardcode NLsolve parameters --- src/trustRegion.jl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/trustRegion.jl b/src/trustRegion.jl index 014c1fcc5..90ae6efdd 100644 --- a/src/trustRegion.jl +++ b/src/trustRegion.jl @@ -437,12 +437,12 @@ function trust_region_step!(cache::TrustRegionCache) end # trust region update - if r < cache.shrink_threshold # default 1 // 10 - cache.trust_r *= cache.shrink_factor # default 1 // 2 - elseif r >= cache.expand_threshold # default 9 // 10 - cache.trust_r = cache.expand_factor * norm(cache.du) # default 2 - elseif r >= cache.p1 # default 1 // 2 - cache.trust_r = max(cache.trust_r, cache.expand_factor * norm(cache.du)) + if r < 1//10 # cache.shrink_threshold + cache.trust_r *= 1//2 # cache.shrink_factor + elseif r >= 9//10 # cache.expand_threshold + cache.trust_r = 2 * norm(cache.du) # cache.expand_factor * norm(cache.du) + elseif r >= 1//2 # cache.p1 + cache.trust_r = max(cache.trust_r, 2*norm(cache.du)) # cache.expand_factor * norm(cache.du)) end # convergence test