I am working with metallic shapes which are curved and highly irregular. The initial order of them is random and by default they are merely sorted by size, which is simple. However the resulting order is neither optimal, nor "good".
A smaller frame means less material used, so an optimization is desired. The shapes themselves are planar, so the ordering happens in a 2D space. Ordering is also only relevant with respect to x-axis, meaning that elements are not placed above/below/diagonal to each other, but always one after the other.
Bruteforcing this is non-viable, because I am aware that this problem is NP-hard, since in order to find all possible frame-lengths I'd first need all permutations of which there are n!. In addition to this the calculation of the frame length is rather costly.
A frame with metallic shapes can be envisioned like this:
[ (((c((cCCc( ]
Where the curved symbols represent the metallic shapes and the outer brackets are the frame borders.
So far I am left thinking that finding the optimal solution is not feasible, but finding a good solution might be. There is a lot on material available on optimization and on cutting the cost of material use, mainly I am looking for advice on literature that comes as close to my challenge as possible. What should I look into?