Replies: 1 comment 1 reply
-
|
Thanks for the kind words! Notice how the form of your constraint is fundamentally different than the rest of the constraints: a To add this constraint, you'd want to compute |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I was playing around with airfoil optimization and the speed an results of this code are amazing.
I would like to add a cpmin constraint. I was using the tutorial example
tutorial/06 - Aerodynamics/02 - AeroSandbox 2D Aerodynamics Tools/02 - NeuralFoil Optimization.ipynb
as a base.
I simply added
CP_min_constraints = np.array([-8, -8, -8, -8, -8, -8])at the top (high values for testing).
and added my contraint in
opti.subject_to([ aero["analysis_confidence"] > 0.90, aero["CL"] == CL_multipoint_targets, np.all(aero["Cpmin"] >= CP_min_constraints),...I get the following error
File "C:\Portable\Python\Neurafoil\lib\site-packages\aerosandbox\optimization\opti.py", line 482, in subject_to
raise RuntimeError(
RuntimeError: The problem is infeasible due to a constraint that always evaluates False.
This can happen if you've frozen too many decision variables, leading to an overconstrained problem.
The strange thing is that when remove the constraint and check it after the optimization is finished it is satisfied.
Any help is very much appreciated!
Thanks a lot, Enno
Beta Was this translation helpful? Give feedback.
All reactions