-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[OptApp] Integration of NLOPT library #11480
Conversation
applications/OptimizationApplication/python_scripts/algorithms/NLOPT_algorithms.py
Show resolved
Hide resolved
applications/OptimizationApplication/python_scripts/algorithms/NLOPT_algorithms.py
Outdated
Show resolved
Hide resolved
applications/OptimizationApplication/python_scripts/algorithms/NLOPT_algorithms.py
Outdated
Show resolved
Hide resolved
applications/OptimizationApplication/python_scripts/algorithms/standardized_NLOPT_constraint.py
Outdated
Show resolved
Hide resolved
applications/OptimizationApplication/python_scripts/algorithms/standardized_NLOPT_constraint.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @RezaNajian Its cool to see the hardwork we put in last few months pays off. Apart from the minor comments I have mentioned in-place, my major comment is, Could you please reduce the mdpa size. It is 4k+ lines, and whole PR is 5k+ :/
applications/OptimizationApplication/python_scripts/algorithms/standardized_NLOPT_constraint.py
Outdated
Show resolved
Hide resolved
applications/OptimizationApplication/python_scripts/algorithms/standardized_NLOPT_constraint.py
Outdated
Show resolved
Hide resolved
applications/OptimizationApplication/python_scripts/algorithms/standardized_NLOPT_constraint.py
Outdated
Show resolved
Hide resolved
applications/OptimizationApplication/python_scripts/algorithms/standardized_NLOPT_objective.py
Outdated
Show resolved
Hide resolved
...cations/OptimizationApplication/python_scripts/controls/thickness/shell_thickness_control.py
Show resolved
Hide resolved
...ation/tests/algorithm_tests/nlopt_tests/mma_shell_thickness_opt/optimization_parameters.json
Outdated
Show resolved
Hide resolved
@sunethwarna I addressed your points could please accept it ?! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @RezaNajian :)
@KratosMultiphysics/technical-committee |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @RezaNajian. You can merge this. The FullDebug versions are for the time being disabled in the CI. (Every developer has to check them in their PCs). I also checked this PR, hence approving :D
Thanks @sunethwarna 🙏 |
This PR makes available NLOPT optimizers in OptimizationApplication. Currently, it supports gradient-based optimizers as:
"mma": nlopt.LD_MMA,
"slsqp": nlopt.LD_SLSQP,
"lbfgs": nlopt.LD_LBFGS,
"ccsaq": nlopt.LD_CCSAQ,
"tnewton_precond_restart": nlopt.LD_TNEWTON_PRECOND_RESTART,
"tnewton_precond": nlopt.LD_TNEWTON_PRECOND,
"tnewton_restart": nlopt.LD_TNEWTON_RESTART,
"augmented_lagrangian": nlopt.AUGLAG
and gradient-free optimizers as
"neldermead": nlopt.LN_NELDERMEAD,
"evolutionary": nlopt.GN_ESCH
The interface is implemented at the Python level, and the NLOPT Python library needs to be in the Python path.
A test case is also made which uses MMA for constrained thickness optimization.