if one of the 28 turbine types that I have is chosen, its own characteristics (a vector of 10 elements) must be used in calculations.
so, I have a tabulated database (28 x 10) on .xls spreadsheet needed for the fitness function calculation.

I am not sure if I organized my code in the right way, BUT IT RUNS.
After few seconds I got this common message:

Maximum recursion limit of 500 reached. ... etc. ....

I copied these data on my fitness function code to avoid calling an external matrix, but still having the same problem.

1- How can I avoid that?

2- May somebody help me in organizing my code?

thank you to continue reading until this WORD,
Best Regards for ALL,
MAMDOUH.

On 5/20/2013 1:25 AM, Mamdouh wrote:
> Hi everybody,
> I am Mamdouh, it is my first post :) , however, I am not new in MATLAB
> I am working on GA Optimization for the first time.
>
> I am working on wind farm layout optimization ... having 3 variables :
> 1- turbine type, ................ 28 turbines
> 2- hub height, and
> 3- turbine location.
>
> if one of the 28 turbine types that I have is chosen, its own
> characteristics (a vector of 10 elements) must be used in
> calculations. so, I have a tabulated database (28 x 10) on .xls
> spreadsheet needed for the fitness function calculation.
>
>
> I am not sure if I organized my code in the right way, BUT IT RUNS.
> After few seconds I got this common message:
>
> Maximum recursion limit of 500 reached. ... etc. ....
>
> I copied these data on my fitness function code to avoid calling an
> external matrix, but still having the same problem.
> 1- How can I avoid that?
>
> 2- May somebody help me in organizing my code?
> thank you to continue reading until this WORD,
> Best Regards for ALL,
> MAMDOUH.

I think we need to see a small sample of the code you use before we can
make suggestions. Or, perhaps, a description of your blocks of code, and
how they call each other. I do not know why there is any recursion--does
a function call itself? Is there a loop of functions calling each other?

"Mamdouh " <mrenergy2011@hotmail.com> wrote in message
news:kncc3j$ror$1@newscl01ah.mathworks.com...
> Hi everybody,
> I am Mamdouh, it is my first post :) , however, I am not new in MATLAB
> I am working on GA Optimization for the first time.
>
> I am working on wind farm layout optimization ... having 3 variables :
> 1- turbine type, ................ 28 turbines
> 2- hub height, and
> 3- turbine location.
>
> if one of the 28 turbine types that I have is chosen, its own
> characteristics (a vector of 10 elements) must be used in calculations.
> so, I have a tabulated database (28 x 10) on .xls spreadsheet needed for
> the fitness function calculation.
>
>
> I am not sure if I organized my code in the right way, BUT IT RUNS. After
> few seconds I got this common message:
>
> Maximum recursion limit of 500 reached. ... etc. ....

See question 13 in the Programming section of the newsgroup FAQ. While that
question is phrased in terms of the ODE45 function, it also applies to other
"function functions" like GA.

> I think we need to see a small sample of the code you use before we can
> make suggestions. Or, perhaps, a description of your blocks of code, and
> how they call each other. I do not know why there is any recursion--does
> a function call itself? Is there a loop of functions calling each other?
>
> Alan Weiss
> MATLAB mathematical toolbox documentation

thank you Alan Weiss for your reply,

1- as I new in optimization, and as I mentioned in my first post, I am not sure if I properly formulated my problem on MATLAB. Actually, I wondered that it run.

2- I prefer to describe my problem briefly:

- my problem is to optimize the layout of a number of wind turbines (say 16) in series in order to maximize the power produced.
- I have the technical data for 28 types of wind turbines, a vector of 10 elements, must be used in calculation if any type of turbine is chosen at any location.
- besides, each turbine may operate at a rage of hub heights.
- the proposed location of each turbine also an aspect of optimization.
- so, for the 16 proposed turbines in series, I have 3 variables (turbine type, hub height, and X-coordinate), but the first variable is linked with the 28 x 10 technical data matrix (this is the source of extensively calling the data from the matrix).
- the wake effect of each turbine on all downstream turbines is calculated based on their type, height, and location.
- I have a specified LB and UB vectors, and have one linear equality constrain [sum (distance among turbines) = a specified total length]

I hope these released secrets regarding to my problem may help you to help me :)
thank you again,
Mamdouh.

"Steven_Lord" <slord@mathworks.com> wrote in message <kndesb$9jd$1@newscl01ah.mathworks.com>...

>
> See question 13 in the Programming section of the newsgroup FAQ. While that
> question is phrased in terms of the ODE45 function, it also applies to other
> "function functions" like GA.
>
> http://matlab.wikia.com/wiki/FAQ
>
> Move your call to GA out of any of the functions that you're passing into GA
> as input arguments (either directly or in the options.)
>
> --
> Steve Lord
> slord@mathworks.com
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com

thank you Steve Lord for your reply,

1- as I new in optimization, and as I mentioned in my first post, I am not sure if I properly formulated my problem on MATLAB. Actually, I wondered that it run.

2- I prefer to describe my problem briefly:

- my problem is to optimize the layout of a number of wind turbines (say 16) in series in order to maximize the power produced.
- I have the technical data for 28 types of wind turbines, a vector of 10 elements, must be used in calculation if any type of turbine is chosen at any location.
- besides, each turbine may operate at a rage of hub heights.
- the proposed location of each turbine also an aspect of optimization.
- so, for the 16 proposed turbines in series, I have 3 variables (turbine type, hub height, and X-coordinate), but the first variable is linked with the 28 x 10 technical data matrix (this is the source of extensively calling the data from the matrix).
- the wake effect of each turbine on all downstream turbines is calculated based on their type, height, and location.
- I have a specified LB and UB vectors, and have one linear equality constrain [sum (distance among turbines) = a specified total length]

I hope these released secrets regarding to my problem may help you to help me :)
thank you again,
Mamdouh.

Hi Mamdouh, I am new to using matlab for wind farm optimization but I am trying to start with a simple model of 10x10 wind farm and assign uniform direction wind to it to get the results of the optimal location (which would look like 3 straight lines along the wind direction) I see you are working on wind farm layout optimization too so I wonder if you could help me get started. I am not sure how to code a 10x10 grid of wind farm locations in matlab and not sure where I should start.

please email me davidtongg@gmail.com if you are willing to give me a hand.

thanks

David
Alan_Weiss <aweiss@mathworks.com> wrote in message <knd8jm$gia$1@newscl01ah.mathworks.com>...
> On 5/20/2013 1:25 AM, Mamdouh wrote:
> > Hi everybody,
> > I am Mamdouh, it is my first post :) , however, I am not new in MATLAB
> > I am working on GA Optimization for the first time.
> >
> > I am working on wind farm layout optimization ... having 3 variables :
> > 1- turbine type, ................ 28 turbines
> > 2- hub height, and
> > 3- turbine location.
> >
> > if one of the 28 turbine types that I have is chosen, its own
> > characteristics (a vector of 10 elements) must be used in
> > calculations. so, I have a tabulated database (28 x 10) on .xls
> > spreadsheet needed for the fitness function calculation.
> >
> >
> > I am not sure if I organized my code in the right way, BUT IT RUNS.
> > After few seconds I got this common message:
> >
> > Maximum recursion limit of 500 reached. ... etc. ....
> >
> > I copied these data on my fitness function code to avoid calling an
> > external matrix, but still having the same problem.
> > 1- How can I avoid that?
> >
> > 2- May somebody help me in organizing my code?
> > thank you to continue reading until this WORD,
> > Best Regards for ALL,
> > MAMDOUH.
>
> I think we need to see a small sample of the code you use before we can
> make suggestions. Or, perhaps, a description of your blocks of code, and
> how they call each other. I do not know why there is any recursion--does
> a function call itself? Is there a loop of functions calling each other?
>
> Alan Weiss
> MATLAB mathematical toolbox documentation

Tags for this Thread

No tags are associated with 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.