Skip to content

Commit

Permalink
change constraint from Ds<=Df to Dfin<=Df, which fixes negative float…
Browse files Browse the repository at this point in the history
… length ratio that errored pareto search
  • Loading branch information
rebeccamccabe committed Dec 18, 2024
1 parent 51078b4 commit 79b6435
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mdocean/optimization/gradient_optim.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 79b6435

Please sign in to comment.