15,850,298 members
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 45 10 30 5 10 103 5 60

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 5:14am
v2
[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

## Solution 1

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.