Hi everyone, I noticed that there is a lot of discussion in the forums about the optimization tutorial not being used properly, the problem is that the optimization results converge to an outlier. After my research, I think I have found the problem and come up with a solution.
1. When calling variable_sweep, use deepcopy function to store the original input before and after drawing. deepcopy function is also required inside carpet_plot. This is because SUAVE seems to have ignored python features when developing this part of the codes.
2. The scailing value of constraints in the optimized code is always 1, SUAVE does not work as expected in theory when dealing with constraints.
3.3. When calling scipy_setup.SciPy_Solve or pyoptsparse_setup.Pyoptsparse_Solve, please change the convergence criteria or step size in the interface. Please increase the step size or the threshold for judging convergence because a small change in objective may result in a larger numerical error.
After testing, scipy and pyoptsparse's other optimizations methods like fmin also works.
Have a good day, everybody