Skip to content

Rounding can cause conflict between cumulative cap and max inventory in buy policy #1798

Open

Description

In the case where the entire cumulative cap mass is in a material buy policy facility at the same time and the cumulative cap is exactly equal to the maximum inventory size, rounding may cause an inability to reach the cap all at once. This mostly presents when the incoming material is being item-packaged (strict packaging limits).

No-code-change solution is for users always ensure max_inv_size is greater than cumulative_cap.

A code solution might be to check if the space available (max inventory minus quantity) is within eps_rsrc() of the remaining cycle cap (cumulative cap minus cycle cumulative inventory).

Issue similar to #1797 but specifically arises in the material buy policy rather than in the packaging.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions