469,890 Members | 2,154 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,890 developers. It's quick & easy.

Genetic algorithm Problem

I wanted to create a genetic algorithm for this question :
Suppose you are out shopping. You have to buy things from different n number of stores. And have to bring home the goods required from every store. There is an amount(specified in kg) of goods that you have to buy at each store and once at a store, you have to buy that total amount. Of course, carrying all this weight around is going to cost you energy. So, you want to do this the most energy-saving way. Multiple visits to home are allowed, and all the weight can be dumped when you arrive at home. Carrying your body around would cost a constant amount of energy per meter. There would be an edge list as well as a node weight list as the problem description.
Actually, I started to make a program for this (using genetic algorithms), but I got stuck with the crossover function. As the paths can have a length of 2*n + 1, the length of the solutions varied so I couldn't really do it. I chose to do this for a project in a subject, but in the end I had to change it to a modified version of TSP (By removing multiple visits to home.).
So, can anyone tell me of a good way to implement the crossover function?
Or, are genetic algorithms a bad method for the problem? If so, do tell me what methods may be useful here? Thanks.
Oct 17 '07 #1
1 1843
Can anyone help please?
Oct 18 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Jelle Feringa / EZCT Architecture & Design Researc | last post: by
2 posts views Thread by SNAKE | last post: by
3 posts views Thread by ThanhVu Nguyen | last post: by
2 posts views Thread by Xiao Jianfeng | last post: by
reply views Thread by Vishal Patil | last post: by
6 posts views Thread by John Ladasky | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.