How to update constraint in nonlinear optimization
1 view (last 30 days)
Show older comments
I have a location facility project where i should optimize the cost of implementing it using fmnincon. The problem is i have a condition on (x,y) (this is th coordinate of my facilities):
sqrt((x-15)^2+(y-48)^2))>10
sqrt((x-18)^2+(y-12)^2))>10
Since this two equation are non linear i can define this function:
function [c,ceq]=NLcon(z)
ceq=[];
c(1)=-z(1)^2 +26*z(1)-z(2)^2+96*z(2)-2473+100;
c(2)=-z(1)^2+36*z(1)+24*z(2)-z(2)^2-468+100;
end
but how can I add this constraint: if 20<=y<=40 then x<=20?
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Get Started with Optimization Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!