How to avoid points that the genetic optimization cannot compute?

2 views (last 30 days)
I am trying to find 12 parameters for my "black-box" function with the help of Matlab's Genetic Algorithm solver. However the aforementioned solver sometimes encounter a point where the "black-box" cannot compute anything, and thus the GA-solver stops completely.
This is what I recieve in the command window when the solver fails:
Caused by: Failure in user-supplied fitness function evaluation. GA cannot continue.
How do I force the GA-solver to just either ignore or create another point that the "black-box" can compute in the current population?
The "black-box" function in question is a 12 parameter material model of which I simulate creep-behaviour in an FE-software (ANSYS). The fitness value is determined by how well the material model will perform against experimental data. The GA-solver fails in-conjunction when the FE-software fails to compute any creep-behavior with the suggested (probably non-physical parameters) parameters by the GA-solver.
Edit: I made a temporary solution where I remodified the black-box function by giving an articially high fitness value when the black-box failed to compute the point. I did this with the help of if and try/catch statements. This solution isn't ideal since it might obscure the mutation/crossover process when having artifical fitness values in the population.

Answers (1)

Alan Weiss
Alan Weiss on 25 Feb 2020
The patternsearch and surrogateopt solvers are robust to this type of failure. I suggest that you give them a try.
In particular, surrogateopt is good for time-consuming function evaluations.
For any solver, it helps to use the tightest bounds that you can.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!