Decide position algorithm#

automatic_warehouse.utils.decide_position_algorithm.algorithm.decide_position(columns: list[Column], space_req: int, algorithm: Algorithm) DecidePositionReturns#

Run the algorithm to decide where to insert a tray. It returns DecidePositionReturns dataclass where you can find the index and the best column.

Return type:

DecidePositionReturns

Parameters:
  • columns (list[Column]) – the columns checked by the algorithm to find the best position.

  • space_req (int) – space requested from tray.

  • algorithm (Algorithm) – algorithm used.

Returns:

if there is a space, dataclass with the fields index_position_where_insert, column_where_insert.

Raises:
class automatic_warehouse.utils.decide_position_algorithm.algorithm.DecidePositionReturns(index: int, column: Column)#

Python Dataclass - It is the return value of the decide_position function.

column: Column#

Column on which the tray is to be placed.

index: int#

Index position where the tray is to be placed.

class automatic_warehouse.utils.decide_position_algorithm.enum_algorithm.Algorithm(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)#

Enum of all implemented algorithms.

HIGH_POSITION = 1#

High Position algorithm prefers the top position of the column.