From: Nazar on 18 May 2010 09:42 I seem to have run into a conundrum of sorts using the GA; hopefully some of you can help me out. There are examples for custom populations being either integers or specific user defined random values within geometrical shapes and such; however, I seem to run out of coding ideas when it comes to restricting a possible population (for one given variable) to a localized area. Shortly said, I need an initial population to spawn within a predefined area and never leave that area. In this situation the best way to describe the area is: Square S1 with side length a1 = 1 Square S2 with side length a2 = 0.6 The limiting area being the subtraction of S2 within the S1 area, both being centered at the same point. (Think of a picture frame) Now, this being said; here is where I run into a wall: 1 - Is it possible to program that specific shape while respecting the proper syntax for inequality conditions of the GA function? 2 - If not, what alternatives do I have? Now, I am not expecting a full answer ( not that I would mind :) ), but I would appreciate a couple of ideas. Thank you Nazar PS: I did not find any similar questions out there; if I missed one, please link to it :)
From: Nazar on 18 May 2010 09:48 I apologise, slight correction: This is for two variables ofcourse (not one given variable as specified previously) meaning both on x and y. "Nazar " <nazar.delegan(a)gmail.com> wrote in message <hsu5fc$q6h$1(a)fred.mathworks.com>... > I seem to have run into a conundrum of sorts using the GA; hopefully some of you can help me out. > There are examples for custom populations being either integers or specific user defined random values within geometrical shapes and such; however, I seem to run out of coding ideas when it comes to restricting a possible population (for one given variable) to a localized area. > > Shortly said, I need an initial population to spawn within a predefined area and never leave that area. > > In this situation the best way to describe the area is: > Square S1 with side length a1 = 1 > Square S2 with side length a2 = 0.6 > > The limiting area being the subtraction of S2 within the S1 area, both being centered at the same point. > (Think of a picture frame) > > Now, this being said; here is where I run into a wall: > > 1 - Is it possible to program that specific shape while respecting the proper syntax for inequality conditions of the GA function? > 2 - If not, what alternatives do I have? > > Now, I am not expecting a full answer ( not that I would mind :) ), but I would appreciate a couple of ideas. > > Thank you > Nazar > > > PS: I did not find any similar questions out there; if I missed one, please link to it :)
|
Pages: 1 Prev: unable to debug Next: Problem with updating a Simulink modell from ML 13 to 14 |