MATLAB GA reject individual after fitness function evaluation
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello everybody,
I’m currently using MATLAB ga optimizer applied to an external software (Aspen Hysys). MATLAB generates the input (genetic algorithm individual), and then passes these values to the Hysys simulation. Hysys is used as a “hidden engine”, it calculates the output and returns as result the fitness value of the individual. Now, I would like to be able to reject an individual in case some of its parameters (computed in Hysys) don’t respect my indications. At the moment I simply set individual’s fitness function to 0 if this happens, but I would like this individual not to be stored in the actual generation, to avoid the risk of a large number of individuals with zero as fitness value.
Can anyone help me?
0 comentarios
Respuestas (1)
Star Strider
el 13 de Jul. de 2020
‘Now, I would like to be able to reject an individual in case some of its parameters (computed in Hysys) don’t respect my indications.’
I have no idea what that means.
The ga function allows linear and nonlinear constraints on the parameters, and parameter bounds. See for example: Optimize with Linear Constraints and Bounds and similar discussions in the ga documentation.
4 comentarios
Star Strider
el 13 de Jul. de 2020
I suggested setting it to a very high number rather than 0. Individuals with a very high fitness will be selected against, and those with a very low fitness will be selected for. That is how ga works.
Ver también
Categorías
Más información sobre Genetic Algorithm en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!