How to force the GA optimization for certain varibale values ??
Mostrar comentarios más antiguos
Hello every one, I am using GAtool to optimize a function. I wrote the function in matlab m-file
suppose that I have this function y(x)= 2x^2+sinx,
I want to use the gatool to solve for optimum value of x easly.
my question is that. what if I want the value of x used in optimization goes in certain range
like x= [ 0.2 0.4 0.6 ..........100] ,
how to tell the gatool box that x do optimization but for these x values only
so it is not allowed to get answer x=0.22 for example
many thanks
Respuestas (1)
Alan Weiss
el 20 de En. de 2015
0 votos
Turn your problem into one of Mixed Integer Optimization. There is an example here that shows how to convert from integer to general discrete constraints, but your case seems simple (x to x/5 for x between 0 and 500)).
Alan Weiss
MATLAB mathematical toolbox documentation
Categorías
Más información sobre Surrogate Optimization en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!