Constraining Dependent Variables in ga Optimization
Show older comments
Hi,
I am trying to constrain my optimization for min f(x) by restricting the range allowed for a dependent variable h(x). I am using a the ga optimizer from the Optimization Toolbox. Do I need to write a penalty or barrier function into by objective function, or is there another simpler way that I can apply the constraint? I tried using the nonlcon input in the ga function, however have been unable to get it to converge. The documentation suggests that nonlcon can only take x (independent variable vector) as an input and so I think that reading in dependent variables may be a misuse of the function.
Please help! Any guidance would be greatly appreciated.
Accepted Answer
More Answers (0)
Categories
Find more on Solver Outputs and Iterative Display in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!