random_priority

class pyrecodes.distribution_priority.random_priority.RandomPriority(resource_name: str, parameters: dict, components: list[Component])

Bases: DistributionPriority

Randomly shuffle components for resource distribution.
Keeps resource suppliers on top of the priority list to maximize the consumption of components’ supply capacity.
get_component_priorities() list[int]
get_suppliers_id()
randomize_ids(component_ids: list, demand_types: list) tuple

The method randomizes component ids. Demand types are in the same order as in the input.

set_distribution_priority(parameters: dict) None