Repository navigation
Packvium 1.5.0
Every error names a closed code. A misspelt configuration key is now refused (see Fixed).
Added
pack_json_with(input, ExecutionOptions).pack_jsonwith explicit execution options;
ExecutionOptions { parallel: false }runs independent search starts in sequence. The
answer is the same either way.PackError::code()— the machine-readable code of every variant:invalid_input,
invalid_request,invalid_fixed_placement,unsupported_feature,unsupported_unit,
invalid_number,solution_failed_validation,time_limit. Branch on it instead of on the
message.PackError::request_error()— theRequestErrorbehindinvalid_requestand
invalid_fixed_placement, with itsreason()and JSON Pointerfield(), when there is one.
Changed
- Up to 41% faster on beam searches, same results. The collision index keeps its cells in a
flat array instead of a tree and sizes each query's result once. Measured: beam requests 41%
faster, a 60-item order 34%, a 250-item order 18%, peak memory within 4%. Every result is
byte-identical. pack_nestedchains levels. A level whose request lists no items packs the previous
level's containers, one item each; it is not run after a level that left something unpacked.
A level that lists its own items runs on them as before. A non-zerobeam_widthnow sets
every level'scontainer_plan_beam_width; it was ignored.
Fixed
qualitywithminimum_support_ratioanswers instead of failing. The homogeneous block
solver ran even when the request asked for support, and a block set on a smaller one
overhangs it, so the request ended insolution_failed_validation. Such a request is now
left to the per-item search. A block answer also reports the support each item really has;
it wrotesupport_ratio1.0 for every item.- A misspelt
configurationkey is refused. A key the request schema does not declare in
configurationor itseffort_budget(profileforsolver_profile,top_kfor
alternatives) was silently ignored, so the request ran on defaults.pack_jsonnow returns
PackError::InvalidRequestwith reasonnot_allowedand the key's pointer, for example
/configuration/profile.parallel, which this engine read although the schema never
declared it, is refused too; passExecutionOptions { parallel: false }topack_json_with
to run search starts in sequence. - An item that fits no orientation no longer spends the exact search's budget. One such
item made a scene solved in about 1 ms run to its whole budget (2.7 s andeffort_limitat
1M); it is now set aside before the search, which finishes in about 1 ms. Placements are
unchanged. - An unknown
objectiveor access direction is refused with its pointer (not_allowed),
and refusal messages match the documentation.