how to add one equality constraint in gravitational search algorithm?
2 views (last 30 days)
Show older comments
i want use gsa for optimization, but i can't add constraint like: L(1)+L(2)+L(3)-200>=0 how i can do that?
1 Comment
Accepted Answer
Matt J
on 23 Jan 2014
Edited: Matt J
on 23 Jan 2014
If it was supposed to be an equality constraint L(1)+L(2)+L(3)-200=0, you could eliminate one of the variables, e.g, by substituting L(1) in the objective function with
L(1) =200-L(2)-L(3)
If you really did mean an inequality constraint L(1)+L(2)+L(3)-200>=0, you might be able to do the same kind of thing by introducing a slack variable
L(1) =200-L(2)-L(3) + S^2
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!