Every container carries its own cost, so a lowest-cost objective (or, here, a single candidate box) picks between them on price rather than a heuristic guess. Each item that does not fit comes back with a reason instead of a silent drop.
SHOWN IN Node / JavaScript
import { pack } from '@packvium/engine';
const request = {
configuration: { objective: 'lowest_cost' },
items: [
{ id: 'mug', quantity: 6, weight: '400 g',
dimensions: { length: '120', width: '120', height: '100' } },
{ id: 'plate', quantity: 8, weight: '600 g',
dimensions: { length: '260', width: '260', height: '20' } },
{ id: 'ladder', quantity: 1, weight: '6 kg',
dimensions: { length: '1800', width: '300', height: '100' } },
],
containers: [
{ id: 'box', cost_minor: 180, max_payload: '15 kg',
inner_dimensions: { length: '400', width: '400', height: '400' } },
],
};
const result = pack(request);
console.log(result.status, result.containers.length, 'opened');
for (const unpacked of result.unpacked_items) {
console.log(unpacked.item_id, unpacked.reason);
}
WHAT COMES BACK
The status comes back as best_found rather than feasible: the mugs and plates place, and the ladder comes back among the unplaced items. Its reason is that no container here has dimensions that hold it in any orientation - not that the box filled up, which is a different refusal with a different fix. An answer, not an exception to catch.