Skip to content

Releases

Packvium 1.11.0

Choose a tag to compare

@github-actions github-actions released this 16 Nov 18:00
b69433a

Bottom gussets and standing pouches, a certified bound for the shipping objectives, one money
ceiling, and one measure grammar.

Added

  • bottom_gusset_depth and orientation on DeformableBoundary::GussetedBag, with the new
    BagOrientation { Flat, Standing }. Container gains upright_frame. A struct literal or a
    full pattern must name the new fields.
  • optimality.lower_bound and the gap under shipping_cost and lowest_landed_cost
    (bounds.rs); the validator checks them.
  • examples/checkout.rs and examples/fulfilment.rs.

Changed

  • One money ceiling, 2^53 − 1: a rate_table priced above it at its top bracket is refused
    at admission, and a quote refuses an amount above it where it used to answer up to i64::MAX
    and wrap past it. RatingRejection::AmountOutOfRange became AmountAboveCeiling(i128).
  • Measures follow the shared grammar: upper-case units ("1 G") are read; "100 millimeters"
    and "1 -1/2" are refused; "-0 1/2" is minus a half, not plus. hull_vertices holds at most
    32 points.
  • effort_budget limits and tag_limits written as 1000.0 are the integers they equal.

Fixed

  • A billed weight past i64 wrapped into the cheapest bracket, and an overflowing landed cost
    was reported as a weight past the last bracket.
  • On wasm32, a JSON count of 2^32 truncated to 0 (max_restarts, tag_limits). It now
    saturates.
  • The result validator could panic sorting a crafted result with mixed-type values.

Performance

  • The contact graph no longer buckets every box with the largest: 961,792 candidate checks
    fall to 10,672 with one pallet-wide box among 4,000.
  • The safe-removal search is no longer cubic.
  • The plan beam scores each plan 1.4–2.2 times less often.
  • The exact search's visited set is capped at 262,144 states.

Packvium 1.10.0

Choose a tag to compare

@github-actions github-actions released this 08 Nov 14:00
3cd1e9b

Pallets may overhang their deck, mailers may have gussets, a hull turns 24 ways, every
placement has an id, a request may name its currency, and three more objectives state a lower
bound. Some public structs and enums grew, so a struct literal or an exhaustive match needs an
edit (see Changed); units refuses keys it used to ignore.

Added

  • container.pallet_overhang_limit is honoured, where 1.9 refused it: a load may pass the
    deck by the stated length at each end and width at each side. Positions are measured from
    the corner of the overhang zone; only the deck bears weight, so a floor placement's
    support_ratio is the share of its base on the deck; the packed pallet reports
    achieved_dimensions and is billed and handed up at the larger of its declared footprint and
    that size. Beside access_directions, axles, made_to_measure, obstacles, a non-zero
    void_fill_reserve_ratio or an item's stop_index it is unsupported_feature. New types
    OverhangLimit and Deck.
  • Gusseted bags: deformable_boundary.kind: "gusseted_bag" with side_gusset_depth
    admits b + c <= W + G; DeformableBoundary::GussetedBag { side_gusset_depth }.
  • 24 rotations for a convex_hull item: 18 signed codes such as -L-W+H after the six
    legacy ones, accepted only on a hull (on a box, invalid_value). Rotation::EVERY,
    is_signed, is_upright, from_code and vocabulary.
  • placement_id on every placement, the canonical JSON of
    [container id, x, y, z, item_type, orientation] in ticks. fixed_placements[] and a
    revision's locked or verified placement may quote it; validate_json reports
    placement_id_mismatch and duplicate_placement_id.
  • currency on the request and on rate_table, three capital letters, echoed on the
    result; a rate table without a request currency or in another one is invalid_request, and
    validate_json reports currency_mismatch. It never enters the score.
  • Lower bounds for maximum_value, open_dimension_height and maximum_volume, so
    optimality.lower_bound and the gap are stated under every objective but the two carrier
    ones.
  • pack_nested_with(&request, level_beam_width) carries the k best chains from level to
    level and lets the outermost level choose; a width of 1 is pack_nested.
  • A made-to-measure box may keep a void_fill_reserve_ratio; when the box cut tight
    would break it, the box is cut from the envelope it was packed in.
  • Revisions stock the boxes a plan already cut: a locked or verified placement in a
    made-to-measure box becomes a stock container <type>@<revision>#<n> at its cut size, and
    verify_revision_chain_json reports artifact_required without the approved artifact.
    New revisions::stock_cut_boxes_json.

Changed

  • Source change for struct literals and exhaustive matches. PackingRequest, RateTable
    and PackingResult gained currency: Option<String>; FixedPlacement gained
    placement_id: Option<String>; Container gained pallet_overhang_limit and deck;
    DeformableBoundary gained GussetedBag; Rotation gained 18 variants. None is
    #[non_exhaustive]: add the fields to a struct literal (or build a Container with
    ..Container::new(...)), and give a match over Rotation or DeformableBoundary a
    wildcard arm. Callers of pack_json are unaffected.
  • units refuses every key but length: invalid_request / not_allowed at
    /units/<key>. A request that sent units.weight must write the unit on each weight.
  • Every container is numbered per type on the grid lattice and the block loader too:
    pair#1, large#1 where 1.9 could say pair#2 or large#10.
  • A nested chain keeps a handed-up container upright, so a nested answer can change where
    laying a carton on its side was the only way it fitted.
  • Artifact exports refuse an integer past 2^53 - 1 with number_out_of_range, instead of
    clamping a container index.

Fixed

  • An explicit rotation list emptied by keep_upright is refused at allowed_rotations,
    with the same named request error the independent validator checks.
  • Stocking cut boxes indexes artifact lookups once and reports malformed consumed
    machine fields as structured invalid_revision errors.
  • Nested beams keep fixed placements across container offers and handoffs instead of
    aborting when a different carried branch cannot supply a locked item or container.
  • The standalone crate test suite handles absent workspace-only nested scenes; its
    dedicated nested and fixed-lock regression tests still run.

Packvium 1.9.0

Choose a tag to compare

@github-actions github-actions released this 01 Nov 19:19
2017844

No API change, but admission is stricter: some requests 1.8 accepted are now refused (see the
weight and length limits below). The centre of gravity is checked, and answers agree with the
other engines where 1.8 found them apart.

Changed

  • Under a clearance a compressible item bears its load on its own footprint, so its crush
    check is stricter and validate measures its own compressed volume.
  • A weight is at most 2^63 - 1 ticks, and so is every item's weight times its quantity plus
    the heaviest tare
    : past it, invalid_request / above_maximum; a weight written as a JSON
    number past 2^53 - 1 is invalid_value and must be a string.
  • The centre of gravity is checked under a minimum_support_ratio above 0: a placement
    covering at most half its base with the centroid outside the contact hull is refused.
    A request without a ratio packs as before.
  • Agrees with the other engines where 1.8 did not: nesting under a clearance shares the
    items' own overlap and a deep nesting column nests in pairs; a length past 2^53 - 1 ticks or
    a box past 10^30 cubic ticks is invalid_request / above_maximum; a side that reads as zero
    ticks is invalid_value / must be positive; an obstacle box outside its container is
    invalid_value / lies outside inner_dimensions, each at its own pointer.
  • validate checks the centroid (centre_of_gravity_unsupported) and the whole stack's load
    (top_load_exceeded)
    , an item on several bearers shared by contact area. It no longer
    holds that item's whole weight against every bearer, so it accepts some results 1.8 rejected
    and names the overloaded bearer.
  • A plan beam wider than 1 compares every container type, whatever the node limit.
  • exact_small is 9-28% faster on the searches that run it (interned item ids, a child's
    state key extended from its parent's); answers are identical.

Fixed

  • A container past about 1.7 x 10^32 cubic ticks overflowed; it is now refused at
    admission, and a deep nesting column on the lattice no longer returns an answer validate_json
    refuses.
  • Null obstacle coordinates default to zero, including additional boxes, as request
    admission already permits.

Packvium 1.8.0

Choose a tag to compare

@github-actions github-actions released this 26 Oct 20:17
6f73c79

Results now say how far they can be from the best possible answer, Optimal means a proof,
and a mistyped flag is refused instead of defaulted.

Added

  • optimality.lower_bound and the gap under the default and lowest_cost objectives,
    with bounds::for_request, from_items, statement and Statement; validate_json
    checks them.

Changed

  • Only attaining the bound sets Optimal; a registry solver's Optimal is demoted to
    Feasible first.
  • An effort budget names a stop: a run that ends on exactly its budget is complete.
  • A non-boolean keep_upright, stackable, must_be_on_floor or
    require_placement_coordinates is invalid_request / wrong_type
    ; it was read as the
    field's default.
    validate_json returns MalformedResult (contract) for such a request, and reads null as
    the default.
  • Faster with identical answers: loading-order checks about 3x, exact_small about 2x on
    larger requests (the preflight answer is reused instead of solved twice), axle-limited solves
    up to 25%, rebalance_weight about 18%.

Fixed

  • homogeneous_blocks named alone packs under fast and balanced; it stopped before
    its first block and placed nothing.
  • validate reads units: null and units.length: null as millimetres, as the engines do,
    and refuses a units that is not an object, or an unknown units.length, as a contract
    MalformedResult naming the field. units.weight is not a field and is ignored: put the unit
    on each weight.

Packvium 1.7.0

Choose a tag to compare

@github-actions github-actions released this 18 Oct 16:17
6dce786

The reference validator ships in the crate, quality looks ahead in its block solver and
finishes inside its time limit, and extreme points scan the candidate set they were meant to.
No request or result field changes.

Added

  • validate_json(request, result) and validate_json_outcome, with ResultIssue,
    MalformedResult { kind, message } and RefusalKind: the reference validator over the JSON
    text, returning the same issues, code and detail, in the same order, as every other package.
    It shares no code with the solvers or IndependentValidator, which is unchanged.
  • PlacementConstraint::distinguishes_instances, a defaulted trait method, true unless
    overridden, so existing implementations compile and keep their behaviour. A constraint that
    reads only item attributes may return false to let the portfolio drop a start order that
    repeats another's item-type sequence.

Changed

  • A CandidateScorer leads the extreme-point rank. The rank is the tuple (sum of
    scorer scores, far corner z, y, x, origin, rotation); before, a scorer's score was added to
    one weighted sum of the far-corner ticks at the weight of one x tick. A scorer that returned
    small nudges meant as tie-breaks now decides the rank; return 0 where it has no preference.
    The trait's signature is unchanged, and no request without a custom scorer answers
    differently on the measured corpora.
  • 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_rule or configuration.solvers is invalid_request with reason not_allowed
    at its JSON Pointer. An unknown output unit was copied through; ticks as an output unit is
    now refused
    , as the schema always said.
  • quality looks ahead in the block solver, completing its leading blocks greedily
    and committing the best, so the answer is never worse than the greedy pass. On our benchmark
    85 of 89 answers improved and none got worse. Under a tight effort budget the block start can
    now report truncated / effort_limit.
  • quality finishes inside its limit. The staged beam refines the best greedy
    order instead of the first two, and the spatial index stops at the first hit without
    allocating. On the 22 pinned benchmark runs 1.6.0 needed more than 20 s of CPU on 10; this
    release needs at most 8.1 s.
  • Extreme points scan the exposed corners and their projections, not every
    combination of placed faces. With solvers: ["extreme_points"] alone, over 67 benchmark
    instances, fast/balanced/quality leave 2711/1477/1297 items out instead of
    3658/3048/2643. The full portfolio's answers did not change on the 89 benchmark requests, and
    its quality CPU fell to 42%.
  • Portfolio starts go to distinct item orders. A start that repeats another's
    item-type sequence runs a neighbouring order instead, kept only on a strict win. A stacking
    scene that took two containers now takes one.
  • no_eligible_container is reported proven, and insufficient_support is reported
    (observed) where the support rule is the only blocker.
  • A nesting_height not below the item's height is refused as invalid_value at its
    pointer, and with no output block the result is written in units.length's schema code.

Fixed

  • incompatible_tags is applied item against item, not against container tags, as the
    validator and every other engine apply it.
  • A panicking start fails a parallel portfolio as it fails a sequential one; it was dropped.
  • Axle-balanced candidate points use the envelope length under clearance and are not offered
    twice.

Packvium 1.6.0

Choose a tag to compare

@github-actions github-actions released this 11 Oct 16:42
c279e58

Boxes cut to measure, flat bags, stacking groups and a volume-first objective, and a fix for
small orders with a convex_hull item that ran out the clock.

Added

  • EffortBudget is re-exported from the crate root, and Item::new / Container::new
    fill every other field with the value a JSON request gets when it omits it.
  • MadeToMeasure and Container::made_to_measure. An on-demand box machine (largest box,
    minimum, cut step, board price and weight per m²); each packed box is the load's extent
    rounded up onto the machine grid and priced as cut, reported by
    PackedContainer::achieved_dimensions() and the result's made_to_measure.
  • DeformableBoundary::FlatBag and Container::deformable_boundary. A poly mailer admits a
    load when length plus thickness and width plus thickness fit.
  • Item::stacking_group and Item::accepts_stacking_groups. Which item classes may rest
    directly on which.
  • objective: "maximum_volume", ranking the volume left behind ahead of the piece count.
  • A warning for items resting on nothing when minimum_support_ratio is 0. No answer
    changes.

Code that builds Item or Container with a struct literal must add the new fields; None
and an empty set keep 1.5.0's behaviour.

Changed

  • An unpacked item names the limit that left it out, the same in every engine.
    Where the search used to fall back to no_feasible_placement or search_exhausted, an item a
    fresh container would take but none is left reports container_inventory_exhausted, and one
    that overloads an axle wherever it stands alone reports axle_overloaded; both are
    inferred. Code that matched the old reason for these cases must match the new one.
  • An explicit solvers: ["homogeneous_blocks"] request packs in the profile's start order
    when the block solver declines the scene
    , so the answer no longer depends on the
    order the items are listed in.
  • quality orders its beam by a convex_hull item's own solid, not its box, so
    it no longer assumes a second wedge cannot fit when it can.
  • The container plan counts a convex_hull item by its own solid too, so
    quality no longer ranks a plan as if wedges that share a container each needed their own.
  • fast and balanced add the block solver as one more start and keep its answer only
    when strictly better.

Fixed

  • Small orders with a convex_hull item no longer run out the clock. The exact search
    bounded a hull by its box volume, so it never stopped early: a five-item order with one jar
    took the whole time limit and now takes 6 search nodes. The same bound left one of two
    wedges that share a crate unpacked. Every release since 1.0.0.

Packvium 1.5.0

Choose a tag to compare

@github-actions github-actions released this 04 Oct 18:59
a73058a

Every error names a closed code. A misspelt configuration key is now refused (see Fixed).

Added

  • pack_json_with(input, ExecutionOptions). pack_json with 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() — the RequestError behind invalid_request and
    invalid_fixed_placement, with its reason() and JSON Pointer field(), 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_nested chains 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-zero beam_width now sets
    every level's container_plan_beam_width; it was ignored.

Fixed

  • quality with minimum_support_ratio answers 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 in solution_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 wrote support_ratio 1.0 for every item.
  • A misspelt configuration key is refused. A key the request schema does not declare in
    configuration or its effort_budget (profile for solver_profile, top_k for
    alternatives) was silently ignored, so the request ran on defaults. pack_json now returns
    PackError::InvalidRequest with reason not_allowed and the key's pointer, for example
    /configuration/profile. parallel, which this engine read although the schema never
    declared it, is refused too; pass ExecutionOptions { parallel: false } to pack_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 and effort_limit at
    1M); it is now set aside before the search, which finishes in about 1 ms. Placements are
    unchanged.
  • An unknown objective or access direction is refused with its pointer (not_allowed),
    and refusal messages match the documentation.

Packvium 1.4.0

Choose a tag to compare

@github-actions github-actions released this 27 Sep 21:05
b7b5380

Replanning a job that has already started, a beam search that no longer trades memory for
speed, and container ids that match the other engines.

Added

  • Fixed placements. fixed_placements in a JSON request, or
    PackingRequest.fixed_placements with packvium_core::FixedPlacement. Each entry pins an
    item type to a container type and instance, at the origin a result reports, in one
    orientation. Fixed items keep their place, count toward weight, support and top load, and
    come back marked "fixed": true. A fixed set that is not a valid packing on its own is
    refused with invalid_fixed_placement: ... before any search.
  • packvium_core::revisions — root_revision_json, derive_revision_json,
    apply_events_json, verify_revision_chain_json, document_digest_json and
    canonical_revision_json. A packvium-plan-revision/v1 chain records what happened on the
    dock against the artifact it changed, linked by SHA-256, and carries the request the next
    plan solves. Every Packvium engine computes the same bytes from the same inputs. Errors are
    RevisionError with a RevisionErrorCode.
  • A new dependency, sha2 (RustCrypto, no default features), for the digest.
  • PackError::InvalidRequest(RequestError). A malformed request names what is wrong:
    code() is invalid_request, reason() one of a closed set (missing_field, wrong_type,
    below_minimum, above_maximum, negative_measure, invalid_unit, duplicate_id,
    not_allowed, invalid_value), field() the JSON Pointer of the bad value, and the message
    reads invalid_request: /items/0/quantity: must be at least 1. The fixed-placement refusal is
    a RequestError too, with code invalid_fixed_placement.
  • examples/revisions.rs.

Changed

  • PackError is #[non_exhaustive], and a malformed request is InvalidRequest. It used
    to be InvalidInput, InvalidNumber or UnsupportedUnit with free text. An exhaustive
    match on PackError needs a wildcard arm; formatting the error is unaffected.
  • The container-plan beam keeps 1.3.0's speed without its memory cost. It ranks nodes by
    five integers, compares placement signatures in place only when ranks tie, and orders only
    the nodes it keeps. Results are byte-identical. At equal work it took 0.70× and 0.71× the
    time of 1.3.0's, and peaked at 0.986× and 0.992× of 1.2.0's memory in a Linux container.
  • Container ids number each type from 1. The greedy and beam searches counted containers
    across types, so a crate opened after a box was crate#2 where the other engines said
    crate#1. Only answers with more than one container type change, and only their ids.
  • PackingRequest gains fixed_placements and fixed_containers, Container gains
    preloaded, and Placement gains fixed.
    JSON callers are unaffected. Code that builds
    these structs with a literal must add the fields: empty vectors and false keep 1.3.0's
    behaviour.

Fixed

  • Numbers below their floor are refused. A negative item or container quantity was
    packed, and a zero or negative time_limit_ms, max_containers, max_items,
    alternatives, search width or rate-table amount was silently replaced by its default. Each
    is now an error naming the field; an absent or null value keeps its default.
  • The independent validator checks incompatible tags. It had no incompatible_items rule,
    so an answer with incompatible items in one container passed it. The search already
    enforced the rule, so only a hand-built answer or a fixed set could slip through.
  • A placement or obstacle far outside its container is refused. An origin near the top of
    the integer range overflowed when its extent was added, and the box then looked inside.
  • A fixed placement is refused, never coerced, when it is not the schema's shape. An
    instance of "1" or 1.5, a position given as a list or null, or an unknown key is refused
    naming the entry, instead of falling back to instance 1 or the origin.

Packvium 1.3.0

Choose a tag to compare

@github-actions github-actions released this 21 Sep 17:32
03bcdcc

Portable operational artifacts for the Rust core, and execution plans that match the other
engines beyond the test corpus. Nothing breaks 1.2.0.

Added

  • packvium_core::artifacts::build_artifact_json(request_json, result_json, loading_orders_json)
    builds one packvium-operational-artifact/v1 document: the execution plan, exact geometry,
    the values a work order shows, and the request that produced it. Every Packvium
    engine builds the same bytes from the same result. Errors are ArtifactError with an
    ArtifactErrorCode.
  • packvium_core::artifact_exports — export_json, export_csv (RFC 4180, 18 columns) and
    export_work_order_html: a printable work order in one HTML file with no scripts and no
    external resources.
  • examples/artifacts.rs.

Fixed

  • execution::build_plan_json disagreed with the other engines on results outside the test
    corpus.
    Score terms are now copied and compared by value, a null status is refused, a
    null loading order means no order and a non-integer entry is refused, and a missing
    unplaced reason is written as the other engines write it. Floats are read exactly: the
    default JSON parser could read one a step off and write different digits back.
  • The plan is written as RFC 8785, and a number beyond 2^53 − 1 is refused instead of written.

Changed

  • The beam search caches its sort keys and the incumbent's key. Results are byte-identical.
    On the wide cases measured (48 items, beam width 12) it took 18–26% less time for about
    0.5 MB more resident memory.
  • A pinned catalog version resolves without scanning the version history.

Packvium 1.2.0

Choose a tag to compare

@github-actions github-actions released this 14 Sep 14:07
58edc3a

Execution plans for the Rust core, and a faster group-batching path. Nothing breaks 1.1.0.

Added

  • packvium_core::execution::build_plan_json(result_json, loading_orders_json) turns an
    already validated result into a work order: what to lift, why a carton was chosen, and what
    was not packed. It calls no solver and no validator. Solver decisions sit under facts,
    readable text under presentation, and the step order is taken from loading_orders or
    reported as "unavailable". The canonical JSON is byte-identical to the other Packvium engines.

Changed

  • Group batching does less work. The extreme-point solver drops two quadratic scans over
    group members for a single pass. Results are byte-identical.