How do I set my fmincon constraint parameters?
1 次查看(过去 30 天)
显示 更早的评论
I was trying to use Lagrange multipliers to minimize this function: f(V,N,d,L) = V^2*d^2/(L*N)
given the constraints:
g1(V,N,d,L) = V*d^2*L - A = 0 g2(V,N,d,L) = r_r*N*d*L^2+4*r_l*N*d^2*L - m = 0
where r_r, r_l, A, and m are all constants.
I found that the algebra got way too complicated so I decided to try to use fmincon to optimize it.
My understanding is that I need to use fmincon like this:
x = fmincon(fun,x0,A,b)
Where A and b are a matrix and a vector that account for my constraint functions, but I don't have a clue how to set A and b so they account for the functions g1 and g2 that I've listed above. Can anyone help?
Thanks to anyone who has an answer!!!!!
0 个评论
回答(1 个)
Sargondjani
2012-6-12
you can insert them as nonlinear constraints (as functions, see the documentation).
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Nonlinear Optimization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!