Obviously im here as I need some help.

I need to come up with a algorithm to optimise 1d cutting. I need to to able to try every combination to work out which uses the least amount of bought in cut lengths.

Example

We purchase plastic tubes in 6000mm lengths and will have a cut off piece from the previous job.

We have an variable number of jobs each to be cut at variable lengths.

I need to try every combination of cuts using the off cut and then stock pieces to work out which combination uses the least amount of tubes and has the least waste.

Need any more information let me know.

Regards

Jim Bob Joe

See the wikipedia article on dynamic memory allocation and also this page for some code examples: http://www.osdcom.info/content/view/31/39/

Common allocation algorithms are "First Fit" and "Best Fit"

I think in this case you want to use the "Best Fit" algorithm, so see below for a sample algorithm of that nature:

http://www.cs.rit.edu/~ark/lectures/gc/03_03_03.html

--

Alain