Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
2.22/5 (4 votes)
See more:
I need to implement an algorithm for optimal cutting linear materials. For example, for logs. There length of pieces that need to saw logs and the length of the logs.
Example:
Length of logs: 100


Length of piece Required number of piecesr
4510
305
10103
560


as a result should show the length of pieces resulting from each log and residue.

i have this material:
A Simple C# Genetic Algorithm
But I do not know how to apply it to my topic.

Has anyone encountered a similar problem?

sorry for my english,
thanks
Posted
Updated 26-Jun-13 4:14am
v2
Comments
[no name] 26-Jun-13 10:24am    
Material optimization, also called nesting, is a very broad and complex issue. Unless you have a real need to do this yourself, it might be more cost effective to buy a solution from someone that has already done it.
sorawit amorn 26-Jun-13 16:49pm    
could you explain a bit more about your example

1 solution

The Genetic algorithm is divided into 4 phases.

1.- Create initial population.
2.- Select parents from that population to be offspring.
3.- Reproduce from selected offspring using operators of crossover, mutation.
4.- From the offspring select the best individuals for the next population.
5.- Go to 1 until a stopping criteria is reached.

The important fact here is how you are going to encoded each individual in the population, which is the same as saying every solution.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900