How to limit ga parameter to certain values.

2 visualizaciones (últimos 30 días)
Andres Yie
Andres Yie el 14 de Mzo. de 2018
Respondida: Walter Roberson el 14 de Mzo. de 2018
Hi
I have a vector X that I’m optimizing with a ga. This vector some of this values may just take 2 values 0 or Xn while others are contained by la lower and upper limit.
How can I limit this elements to this 2 values?

Respuestas (1)

Walter Roberson
Walter Roberson el 14 de Mzo. de 2018
Do an integer constraint on that variable, constrain to 0 and 1. Then internally multiply the passed in variable by Xn.

Categorías

Más información sobre Nonlinear Optimization en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by