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:
choosing the proper Optimization Algorithm based on nvars

Subject: choosing the proper Optimization Algorithm based on nvars

From: Mamdouh

Date: 29 Jul, 2013 08:04:14

Message: 1 of 4

Hi everyone,
I have some case studies regarding to Wind Farm Layout Optimization,
the number of turbines may be a few hundreds,
for every turbine I want to optimize its X,Y locations as well as its height,
so, the number of variables may reach 1,000 wow !!!
right now, I am using GA for smaller number of turbines (few tens of variables), but the results didn't give the optimum solution (I know the optimum solution for some cases) ...

my questions are:
1- do you see GA is capable to handle a large number of variables ?
2- If YES, how do I adapt the solver settings to capture the global minimum ?
3- If NO, what Optimization algorithm(s) do you suggest for my problem ?

thank you for reading,
Best Regards to ALL,
Mamdouh

Subject: choosing the proper Optimization Algorithm based on nvars

From: Mamdouh

Date: 29 Jul, 2013 10:42:11

Message: 2 of 4

Besides,
I confused somewhat ...
what makes the optimization process more easier/faster/accurate ? to increase the integer or even discrete constrains or to reduce them ?
I can do both, but I can't figure out which makes my problem more solvable ?

Hey, com on :)
any kind of help will be greatly appreciated,
thank you,
Mamdouh

Subject: choosing the proper Optimization Algorithm based on nvars

From: Alan_Weiss

Date: 29 Jul, 2013 13:40:10

Message: 3 of 4

On 7/29/2013 4:04 AM, Mamdouh wrote:
> Hi everyone,
> I have some case studies regarding to Wind Farm Layout Optimization,
> the number of turbines may be a few hundreds,
> for every turbine I want to optimize its X,Y locations as well as its
> height,
> so, the number of variables may reach 1,000 wow !!!
> right now, I am using GA for smaller number of turbines (few tens of
> variables), but the results didn't give the optimum solution (I know
> the optimum solution for some cases) ...
>
> my questions are:
> 1- do you see GA is capable to handle a large number of variables ? 2-
> If YES, how do I adapt the solver settings to capture the global
> minimum ?
> 3- If NO, what Optimization algorithm(s) do you suggest for my problem ?
>
> thank you for reading,
> Best Regards to ALL,
> Mamdouh

It depends on what kind of optimization you are doing.

If the objective function is a smooth function of the decision
variables, and is given by a formula, not a simulation or numerical
integration, then you should almost certainly use fmincon for your
optimization.
http://www.mathworks.com/help/gads/choosing-a-solver.html#bsa_e9p
fmincon is routinely used for optimizations using thousands of variables.

However, if the objective function is not smooth, or is given by a
simulation or numerical integration, then you can try patternsearch
first, or fmincon with some possible adjustments as described here:
http://www.mathworks.com/help/optim/ug/optimizing-a-simulation-or-ordinary-differential-equation.html

patternsearch is usually much more reliable and speedy than ga, and it
is easier to tune. The main difference in calling syntax is that
patternsearch (and fmincon) take an initial point, whereas ga can take
just the dimensionality of the problem as the second input. If you have
finite bounds on all components, you can use the following formula to
generate random initial points for patternsearch and fmincon:
x0 = lb + rand(size(lb)).*(ub-lb);

Alan Weiss
MATLAB mathematical toolbox documentation

Subject: choosing the proper Optimization Algorithm based on nvars

From: Mamdouh

Date: 29 Jul, 2013 14:28:12

Message: 4 of 4


> It depends on what kind of optimization you are doing.
>
> If the objective function is a smooth function of the decision
> variables, and is given by a formula, not a simulation or numerical
> integration, then you should almost certainly use fmincon for your
> optimization.
> http://www.mathworks.com/help/gads/choosing-a-solver.html#bsa_e9p
> fmincon is routinely used for optimizations using thousands of variables.
>
> However, if the objective function is not smooth, or is given by a
> simulation or numerical integration, then you can try patternsearch
> first, or fmincon with some possible adjustments as described here:
> http://www.mathworks.com/help/optim/ug/optimizing-a-simulation-or-ordinary-differential-equation.html
>
> patternsearch is usually much more reliable and speedy than ga, and it
> is easier to tune. The main difference in calling syntax is that
> patternsearch (and fmincon) take an initial point, whereas ga can take
> just the dimensionality of the problem as the second input. If you have
> finite bounds on all components, you can use the following formula to
> generate random initial points for patternsearch and fmincon:
> x0 = lb + rand(size(lb)).*(ub-lb);
>
> Alan Weiss
> MATLAB mathematical toolbox documentation


thank you very much dear Alan for fast and valuable reply,
it is extremely helpful,
although my Objective Function doesn't include any simulation or numerical work, it given by many loops of straight and simple calculations and summation,
is it dealt as smooth or non smooth ?

anyway, I will start by fmincon, as it included in the Optimization Toolbox that I already have right now,
otherwise, I will try to get access to the Global Optimization Toolbox to work on Patternsearch,

thanks again and a lot,
Best Regards,
Mamdouh
 

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