3DPACK.ING searches for arrangements using simulated annealing. It starts from a workable arrangement and repeatedly makes one small random change — swap two boxes in the loading order, rotate one, move a stack — then keeps or discards it. Early in the search it will accept changes that make the load slightly worse; as the search proceeds it grows steadily less willing to. The name is borrowed from metallurgy, where cooling a metal slowly lets its crystal structure settle somewhere lower-energy than quenching it ever would.
Accepting a worse arrangement sounds perverse, and the alternative is worse. A search that only ever improves walks into the first local optimum it meets and stops — typically a tidy-looking load with one awkward void it cannot undo, because undoing it means going backwards first. Tolerating a temporary loss is precisely what lets the search climb out of that void and find the arrangement on the far side of it.
There is no claim of optimality here, and there should not be. The solver returns the best arrangement it found in the time it was given, and running it twice on the same load can return two different plans of near-identical quality. What it does guarantee is feasibility: every plan it returns physically holds. Nothing intersects, nothing floats, nothing exceeds the payload, and nothing sits on a box you said could not bear it.
Call the same solver from your own code