From 79b643564bdc1009d137b03d6fb999e454b75418 Mon Sep 17 00:00:00 2001 From: rebeccamccabe Date: Tue, 17 Dec 2024 20:19:58 -0500 Subject: [PATCH] change constraint from Ds<=Df to Dfin<=Df, which fixes negative float length ratio that errored pareto search --- mdocean/optimization/gradient_optim.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mdocean/optimization/gradient_optim.m b/mdocean/optimization/gradient_optim.m index 6a7ca4a..f5876b2 100644 --- a/mdocean/optimization/gradient_optim.m +++ b/mdocean/optimization/gradient_optim.m @@ -89,10 +89,11 @@ T_s = D_s * p.T_s_over_D_s; h_f = T_f_2 / p.T_f_2_over_h_f; D_d = p.D_d_over_D_s * D_s; + D_f_in = D_s * p.D_f_in_over_D_s; MEEM = pi*p.harmonics / (p.besseli_argmax*2); prob.Constraints.linear_spar_natural_freq = D_d >= p.D_d_min; - prob.Constraints.linear_float_spar_diam = D_s <= D_f - .01; + prob.Constraints.linear_float_spar_diam = D_f_in <= D_f - .01; prob.Constraints.linear_float_spar_draft = T_f_2 <= T_s - .01; prob.Constraints.linear_float_spar_tops = h_s - T_s >= h_f - T_f_2 + .01; prob.Constraints.linear_float_seafloor = p.h - T_f_2 >= MEEM * D_f; % M