Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
optimization, variables from a discrete list

Subject: optimization, variables from a discrete list

From: Dave B

Date: 31 Aug, 2012 11:16:07

Message: 1 of 2

Hi,

Is there a way to ensure an optimizer only picks variable values from a predefined list of possibles? As an example, my allowable values for x might be [1 23 108 128 130 150 236 255].

Thanks in advance!

Subject: optimization, variables from a discrete list

From: Seth Deland

Date: 31 Aug, 2012 12:17:15

Message: 2 of 2

You could use the Genetic Algorithm to do this. You could constrain this
variable to only take on integer values between 1 and 8, then use the value
of this variable to index into your array [1 23 108 128 130 150 236 255] in
the fitness function.

A similar technique is shown in this video:
http://www.mathworks.com/videos/optimal-component-selection-using-the-mixed-integer-genetic-algorithm-68956.html

The variables are constrained to be integers then used to index into the
arrays of resistor and thermistor values.

Mixed-integer capabilities were added to the genetic algorithm in R2011b, so
you'll need to be using Global Optimization Toolbox R2011b or newer.

Hope that helps.



"Dave B" <davebrackett@hotmail.com> wrote in message
news:k1q6dn$ftf$1@newscl01ah.mathworks.com...
> Hi,
>
> Is there a way to ensure an optimizer only picks variable values from a
> predefined list of possibles? As an example, my allowable values for x
> might be [1 23 108 128 130 150 236 255].
>
> Thanks in advance!

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us