progdude

09-17-2010, 11:08 AM

Hey guys, im a second year engineering student and really need help with my VBA project. Here is the question... Any help will be much appreciated! Thanks

------

Task in VBA -2010.

Imagine a large number of near-sighted birds who have excellent memories, hearing and spatial awareness (ruimtelike oriëntasie). They are flying in search of the highest points of a forest of poles, planted in a two-dimensional space x,y. When you find the birds, they are flying each in a random xy position (x0i and y0i for bird number i, within a search space limited by xmin, xmax, ymin, ymax). Since each bird can only see its immediate surrounds, they rely on each other to find the highest point. Each second, the birds call out to each other and through their excellent hearing, they determine the xy position from where the highest call came from, which they call xG and yG.

Once they’ve located the position of the highest call, they change their velocity, based on two things. Stored in their excellent memories they have the xy position of their own best point visited so far (xBi and yBi for bird number i). Also they have xG and yG of the flock’s highest point at that specific time.

Assume their current velocity can be expressed as two vectors in the xy space. We’ll call these two velocities vxi and vyi for bird number i. Each bird also knows its position xi and yi. Using these variables they change their velocity according to the following formula:

vxi = vxi +a( xG - xi) + b(xBi - xi)

and vyi = vyi +a( yG - yi) + b(yBi - yi)

Assume all the variables are in metre and that the velocities are thus in m/s. The a and b variables are variables that have two components (userpref_a*random for a and userpref_b*random for b)

You need to determine the velocities and positions of every bird at one second intervals.

Typically you would stop the process after a predetermined time or when the solution does not improve very much over time.

Make teams of four students each. Study the problem above and then write a VB application that can find good solutions to any problem of the following form, where all the variables and the function values are read of a file "GetValueXYZ.xlsm". Use VB to send x, y and z values to the specific positions on the sheet. Read the Value from the column E.

You will use the logic of the birds above, but will expand the project to three dimensions XYZ. You must also hand in a report where you describe the problem, your program and its working. Your application should find the maximum and/or minimum value of the function Value.

A typical application will have an input form, some graphical representation of the search and an output form with Function values, as well as some information of interest to a user.

-----

Just to make it clear, I have a general understanding of the concept, but have NO idea of how to approach this. So an idea of what direction to go would be appreciated. :banghead:

------

Task in VBA -2010.

Imagine a large number of near-sighted birds who have excellent memories, hearing and spatial awareness (ruimtelike oriëntasie). They are flying in search of the highest points of a forest of poles, planted in a two-dimensional space x,y. When you find the birds, they are flying each in a random xy position (x0i and y0i for bird number i, within a search space limited by xmin, xmax, ymin, ymax). Since each bird can only see its immediate surrounds, they rely on each other to find the highest point. Each second, the birds call out to each other and through their excellent hearing, they determine the xy position from where the highest call came from, which they call xG and yG.

Once they’ve located the position of the highest call, they change their velocity, based on two things. Stored in their excellent memories they have the xy position of their own best point visited so far (xBi and yBi for bird number i). Also they have xG and yG of the flock’s highest point at that specific time.

Assume their current velocity can be expressed as two vectors in the xy space. We’ll call these two velocities vxi and vyi for bird number i. Each bird also knows its position xi and yi. Using these variables they change their velocity according to the following formula:

vxi = vxi +a( xG - xi) + b(xBi - xi)

and vyi = vyi +a( yG - yi) + b(yBi - yi)

Assume all the variables are in metre and that the velocities are thus in m/s. The a and b variables are variables that have two components (userpref_a*random for a and userpref_b*random for b)

You need to determine the velocities and positions of every bird at one second intervals.

Typically you would stop the process after a predetermined time or when the solution does not improve very much over time.

Make teams of four students each. Study the problem above and then write a VB application that can find good solutions to any problem of the following form, where all the variables and the function values are read of a file "GetValueXYZ.xlsm". Use VB to send x, y and z values to the specific positions on the sheet. Read the Value from the column E.

You will use the logic of the birds above, but will expand the project to three dimensions XYZ. You must also hand in a report where you describe the problem, your program and its working. Your application should find the maximum and/or minimum value of the function Value.

A typical application will have an input form, some graphical representation of the search and an output form with Function values, as well as some information of interest to a user.

-----

Just to make it clear, I have a general understanding of the concept, but have NO idea of how to approach this. So an idea of what direction to go would be appreciated. :banghead: