Repository navigation
Packvium 1.7.0
The reference validator ships in the package, quality looks ahead in its block solver, and a
request built from objects is refused as its JSON would be. No request or result field changes.
Added
packvium.validate(request, result),packvium.Issueandpackvium.MalformedResult. The
reference validator over the JSON documents: a list ofIssue(code,detail), empty when
the result is valid, andMalformedResultfor a result of the wrong shape. It shares no code
with the engine it checks.
Changed
- A request built from objects is refused as JSON is. A model constructor that
refuses a value raisesInvalidRequestError(code, reason, field""), a subclass of the
ValueErrorit raised before, and a mistyped value is still aTypeErrortoo.Packer.pack
checks the objects with the JSON rules before solving.FixedPlacementwith
container_instancebelow 1 is now refused bypackasinvalid_fixed_placement, not by its
constructor. - Every schema enum value is refused as
not_allowed. A value outside its list in
allowed_rotations, the output and dimensional-weight units,shape_type,
ground_contact_ruleorconfiguration.solversisinvalid_requestwith reasonnot_allowed
at its JSON Pointer, where some raised aKeyError.ticksas an output unit is now
refused; the schema never listed it. qualitylooks ahead in the block solver. Each round completes its leading
blocks greedily and commits the best, so the answer is never worse than the greedy pass. On our
benchmark 87 of 89 answers improved and none got worse, at 6% more CPU. Under a tight effort
budget the block start can now reporttruncated/effort_limit.fastandbalancedare
unchanged.- A
nesting_heightnot below the item's height is refused asinvalid_valueat its
pointer, and with nooutputblock the result is written inunits.length's schema code.
Fixed
- A tall stack no longer raises
RecursionError: the load rules walk stacks iteratively. - The covered ground-contact rule counts only supporters with positive area, so an item no
longer rests on a box it touches only at an edge. - A quantity past 2^53 − 1 on the object path is refused instead of hanging the solver.
- A route violation names its violators in sorted order.