Containers#
Containers abstract class#
- class automatic_warehouse.status_warehouse.container.tray_container.TrayContainer(height: int, offset_x: int, width: int, length: int, warehouse)#
A superclass representing the tray container of a
ColumnorCarousel.- Parameters:
- create_new_space(element: EmptyEntry | TrayEntry)#
Create a new space inside the container.
- Parameters:
element (EmptyEntry | TrayEntry) – entry of the new space to be created.
- get_container() list[TrayEntry | EmptyEntry]#
Get the full list of entries for the container in the warehouse.
- Return type:
- Returns:
the full list of entries for the container in the warehouse.
- get_def_space() int#
Get the default height space of the container.
- Return type:
- Returns:
the default height space of the container.
- get_height_container() int#
Get the height of the container.
- Return type:
- Returns:
the height of the container.
- get_height_warehouse() int#
Get the height of the warehouse.
- Return type:
- Returns:
the height of the warehouse.
- get_length() int#
Get the length of the container.
- Return type:
- Returns:
the length of the container.
- get_num_entries() int#
Get the number of entries (
get_height_container//get_def_space).- Return type:
- Returns:
the number of entries.
- abstract get_num_entries_free() int#
Get how many seats are available.
- Return type:
- Returns:
how many seats are available.
- get_num_entries_occupied() int#
Get how many entries occupied there are.
- Return type:
- Returns:
how many entries occupied there are.
- get_num_materials() int#
Get how many materials there are.
- Return type:
- Returns:
how many materials there are.
- get_num_trays() int#
Get how many trays there are in the container.
- Return type:
- Returns:
how many trays there are in the container.
- get_offset_x() int#
Get the x offset of the container.
- Return type:
- Returns:
the x offset of the container.
- get_warehouse()#
Get the warehouse where the container is stored.
- Return type:
- Returns:
the warehouse where the container is stored.
- abstract is_empty() bool#
Check if the container is empty.
- Return type:
- Returns:
Trueif the container is empty,Falseotherwise.
- abstract is_full() bool#
Check if the container is full.
- Return type:
- Returns:
Trueif the container is full,Falseotherwise.
- reset_container()#
Clean up the container using
EmptyEntryinstances.
- class automatic_warehouse.status_warehouse.container.enum_container.EnumContainer(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)#
Enumerate of the containers implemented.
Carousel#
- class automatic_warehouse.status_warehouse.container.carousel.Carousel(info: CarouselConfiguration, warehouse)#
The carousel represents the set of bay and the buffer (tray under the bay).
- Parameters:
info (CarouselConfiguration) – class containing information about the carousel (config).
warehouse (Warehouse) – the warehouse where the carousel is located.
- add_tray(tray: Tray)#
Add a tray in the buffer area or show as an output (bay).
- Parameters:
tray (Tray) – to show or to save.
- Raises:
RuntimeError – if the tray already exists.
ValueError – if the tray is longer or wider that the carousel.
- get_bay() int#
Get the height of the bay of the carousel.
- Return type:
- Returns:
the height of the bay of the carousel.
- get_bay_entry() TrayEntry | EmptyEntry#
Get the bay entry or an empty entry.
- Return type:
- Returns:
the bay entry or an empty entry.
- get_bay_tray() Tray#
Get the bay tray.
- Return type:
- Returns:
the
Trayof the bay.- Raises:
AttributeError – when the bay is empty and there is no tray.
- get_buffer() int#
Get the height of the buffer of the carousel.
- Return type:
- Returns:
the height of the buffer of the carousel.
- get_buffer_entry() TrayEntry | EmptyEntry#
Get the buffer entry or an empty entry.
- Return type:
- Returns:
the buffer entry or an empty entry.
- get_buffer_tray() Tray#
Get the buffer entry or an empty entry.
- Return type:
- Returns:
the buffer entry or an empty entry.
- Raises:
AttributeError – when the buffer is empty and there is no tray.
- get_hole() int#
Get the height of the hole.
The hole is the height from the bay to the start of the column, it is the space where a person can place a material inside the warehouse.
- Return type:
- Returns:
the height of the hole.
- get_num_entries_free() int#
Get how many seats are available.
- Return type:
- Returns:
how many seats are available.
- get_num_trays() int#
Get how many trays there are.
- Return type:
- Returns:
the number of trays there are.
- is_bay_full() bool#
Check if the bay is full.
- Return type:
- Returns:
Trueif is full,Falseotherwise.
- is_buffer_full() bool#
Check if the buffer is full.
- Return type:
- Returns:
Trueif is full,Falseotherwise.
- is_empty() bool#
Check if the container is empty.
- Return type:
- Returns:
Trueif the container is empty,Falseotherwise.
Column#
- class automatic_warehouse.status_warehouse.container.column.Column(info: ColumnConfiguration, warehouse)#
The column is a simple column of the warehouse. It can’t be where there is the bay and the buffer.
It is thought to store the trays.
- Parameters:
info (ColumnConfiguration) – info about the column (config).
warehouse (Warehouse) – the warehouse where the column is located.
- add_tray(tray: Tray, index: int = 0)#
Add a tray to the column.
- Parameters:
- Raises:
ValueError – if the tray is longer or wider that the column.
- gen_materials_and_trays(num_trays: int, num_materials: int) GenMaterialsAndTraysReturns#
Generate random trays and materials.
- Return type:
- Parameters:
- Returns:
a dataclass where we can find the
trays_insertedand thematerials_inserted
- get_height_last_position() int#
Get the height of the last position.
- Return type:
- Returns:
the height of the last position.
- get_num_entries_free() int#
Get how many seats are available.
- Return type:
- Returns:
how many seats are available.
- is_empty() bool#
Check if the container is empty.
- Return type:
- Returns:
Trueif the container is empty,Falseotherwise.
- is_full() bool#
Check if the container is full.
- Return type:
- Returns:
Trueif the container is full,Falseotherwise.
- class automatic_warehouse.status_warehouse.container.column.GenMaterialsAndTraysReturns(trays_inserted: int, materials_inserted: int)#
Python Dataclass - Values returned by the
gen_materials_and_traysmethod.