- How did you write your constraint function? Give us a simplified form of the code if it is too long.
- What are the results of iterative display? In particular, what is the infeasibility of the initial population?
Question about an effect of ConstraintTolerance on multiple constraints for GA optimization
2 views (last 30 days)
Show older comments
Hi, I'm doing the optimization using GA with multiple constraint functions and have difficulty in understanding an effect of ConstrainTorelance.
For example, I have three constraint functions as follows:
Fcn1 > 10
Fcn > 8
Fcn > -7
One of the result was that Fcn1 = 9.8592, Fcn2 = 9.6328 and Fcn3 = -3.0568 showing that only Fcn2 and Fcn3 meet the constraints.
I thought that the reason is related to ConstraintTolerance, and it was set to 1.0000e-03 in the program.
But I don't understand how Fcn1 = 9.8592 was possible in the process of GA not meeting the constraint.
Could you please give me some advice on this problem?
2 Comments
Alan Weiss
on 6 Mar 2019
Can you please show us the following two items:
Alan Weiss
MATLAB mathematical toolbox documentation
Accepted Answer
Alan Weiss
on 7 Mar 2019
Thank you for the clear explanation. You have a difficult nonlinear problem with all integer variables. The solver is struggling to find any feasible point. Until it finds one feasible point, it does not matter that it satisfies a few constraints, the solver attempts to find something feasible and does not attempt to keep some constraints feasible when not all are feasible. See Integer ga algorithm.
I'm afraid that the best advice I can give you is to increase the size of the population considerably in an attempt to find a feasible point. This will slow the optimization even further, but until you find a feasible point, the solver is not doing anything productive. Also, there is no point in specifying a mutation function, as the integer ga algorithm overrides your choice anyway.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
More Answers (0)
See Also
Categories
Find more on Surrogate Optimization 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!