How can i define constraint in my optimization problem?
显示 更早的评论
I have a Constraint HP>0.0025 and HP is the function of PS. i dont know how to define this constraint. when i am using it directicly in inequaliity constraint i gives error that row dimension doesnot match. and as a non linear constraint i used it like this " c = HP - 0.0025". Need Help.
3 个评论
Walter Roberson
2019-12-26
Is PS one of the parameters, and HP is computed from PS? If so then use one of the minimizers such as fmincon that support nonlinear constraint functions, and have that function compute HP based upon the input PS and have it compute 0.0025-HP
Momin khan
2019-12-26
Walter Roberson
2019-12-26
No, not unless HP is a linear calculation.
Note that there are circumstances under which nonlinear constraints are not enforced, in particular during the initial gradient estimation.
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Nonlinear Optimization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!