MATLAB GA reject individual after fitness function evaluation

6 vues (au cours des 30 derniers jours)
Enrico Gallo
Enrico Gallo le 13 Juil 2020
Commenté : Star Strider le 13 Juil 2020
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?

Réponses (1)

Star Strider
Star Strider le 13 Juil 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 commentaires
Enrico Gallo
Enrico Gallo le 13 Juil 2020
Modifié(e) : Enrico Gallo le 13 Juil 2020
I cannot model the plant directly on Matlab, only a specific program as Hysys can model the complexity of such a system (that's the reason why it is used, even though it is extremely expensive). Hysys receives from Matlab a vector and returns a scalar number (the production output). Your idea is the same that i'm already using: Matlab import the negative value of the volumetric flow of production in order to minimize it (this is like maximise the absolute value of production). If the actual simulation doesn't satisfy my constraints, the output is automatically set to 0, and theorically those individuals don't propagate. My worries are related on the number of these individuals: if at the first generation more than 70-80% of the population present a 0 value, the optimization process won't work well (i'm actually worried by having less than 5% valid solutions as extreme case). I would prefer the possibility to refuse an individual and recalculate another one, until it satisfies all constraints (that, i repeat, have to be calculated after the simulation is completed). This process would be longer in terms of time, of course, but more robust. But i don't know how to do this.
Star Strider
Star Strider le 13 Juil 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.

Connectez-vous pour commenter.

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by