Source code for batching.fifo

from ware_ops_algos.algorithms import FifoBatching
from ware_ops_algos.domain_models import Resources, Articles
from ware_ops_pipes.pipelines.templates.template_1 import BatchedPickListGeneration
from ware_ops_pipes.utils.io_helpers import load_pickle


[docs] class FiFo(BatchedPickListGeneration):
[docs] abstract = False
[docs] def get_inited_batcher(self): articles: Articles = load_pickle(self.input()["instance"]["articles"].path) resources: Resources = load_pickle(self.input()["instance"]["resources"].path) batcher = FifoBatching( # capacity=resources.resources[0].capacity pick_cart=resources.resources[0].pick_cart, articles=articles, ) return batcher