Nonlinear constraints in ga and gamultiobj with binary variables.
2 次查看(过去 30 天)
显示 更早的评论
Does the population type 'bitstring' allow for the use of nonlinear constraints in ga and/or gamultiobj?
I have been attempting to use it in ga and failed. If nonlinear constraints cannot be used in these cases, then my question is: I can easily change my objective function for a penalty function (following the same references used in matlab documentation for the augmented lagrangian genetic algorithm), but the penalty parameters require general information about the ga (current iteration, best fitness, etc). I think some of this information may be stored using global variables in my objective function, but I was wondering if there is some way I can retrieve the genetic algorithm variables used by the ga() to my objective function workspace while ga is running.
Thanks.
0 个评论
回答(1 个)
Walter Roberson
2016-10-19
Does the population type 'bitstring' allow for the use of nonlinear constraints in ga and/or gamultiobj?
No.
The way to proceed was to provide your own custom functions for initial population and mutation and crossover which always return integer results according to your needs; those can be used with non-linear constraints because you will not tell ga that you are running with integer constraints.
4 个评论
Walter Roberson
2016-10-21
If you do not use the custom crossover and mutation and initial population, if you just round() the values in the function as you use them, then the ga will wander around trying (for example) 0.82 and 0.87 trying to find places that give better results, not understanding that you need to go to 0.499* to change the effective value. bitstring and intcons only use the exact values, but they do so by dropping in integer-constrained hybrid and mutation and population functions.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multiobjective Optimization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!