Skip to content

Material buy policy should be able to request packages #1803

Open

Description

Material buy policy strategies are all governed by mass. This can lead to rounding issues when masses, including #1797 #1798 and more.

In some cases, it would be better to request a package type and a number of packages. Maybe with a minimum total mass? Maybe not??

As usual, I'm thinking about fresh fuel here. I have a reoccurring issue where a fresh fuel vault has a cumulative_cap policy with mass set at the # of fuel assemblies per batch * the fuel assembly mass. This should result in the exact correct amount of mass being available for the reactor to request. But then a mass of 1 kg may actually be 1.00000000000, 1.00000000021, or 0.99999999987. So my reactors keep ending up with n-1 fuel assemblies, even though the fresh fuel vault has 52 assemblies on hand, or at least it does with the packaging type of fuel_assembly, which is not the same as the reactor's fuel_assembly.

A preferable solution would be for the fresh fuel vault to request 52 fuel_assembly packages. fuel_assembly packages have a fill_min == fill_max, so this should be equivalent to a single mass of 52 * fill_min, but it's not. So maybe the buy policies should be able to care about packages and number of trades too. This could also perhaps replace the reactor's buy policy, but that's implemented directly in Cycamore and doesn't currently use the toolkit

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

    Not KM's dissertationTag for future features and defects related to but not addressed by Katie Mummah's dissertation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions