Warehouse#
- class automatic_warehouse.warehouse.Warehouse#
Representation of the real warehouse. It contains all the information about the warehouse and the methods for calculating the internal movements of its components.
- add_column(col: Column)#
Add a column to the warehouse column container.
- Parameters:
col (Column) – the column to add.
- Raises:
ValueError – if the column
x_offsetis not unique.
- choice_random_tray() Tray#
Pick a random tray from the columns in the warehouse.
- Return type:
- Returns:
the random tray chosen from the columns in the warehouse.
- Raises:
AssertionError – if each column doesn’t have a tray.
- cleanup()#
Cleanup the warehouse (columns and carousel). Each
Entrywill beEmptyEntry.
- cleanup_carousel()#
Cleanup the carousel of the warehouse. Each
Entrywill beEmptyEntry.
- cleanup_columns()#
Cleanup the columns of the warehouse. Each
Entrywill beEmptyEntry.
- gen_rand(gen_bay: bool, gen_buffer: bool, num_trays: int, num_materials: int)#
Generate a random warehouse. Be careful! Every entry in the warehouse will be reset!
- get_carousel() Carousel#
Get the carousel of the warehouse.
- Return type:
- Returns:
the carousel of the warehouse.
- get_column(index: int) Column#
Get the (i-)column of the warehouse.
- Return type:
- Parameters:
index (int) – the index of the column.
- Returns:
get the column of the warehouse with the given index.
- Raises:
IndexError – list index out of range.
- get_def_space() int#
Get the height (distance) between two trays (config value).
- Return type:
- Returns:
the height (distance) between two trays (config value).
- get_height() int#
Get the height of the warehouse.
- Return type:
- Returns:
the height of the warehouse.
- get_max_height_material() int#
Get the maximum height of a
Material. It’s the value calculated by dividing the buffer height by the return value ofget_def_spacemethod.- Return type:
- Returns:
the maximum height of a material.
- get_minimum_offset() MinimumOffsetReturns#
Calculate the minimum offset between the columns of the warehouse.
- Return type:
- Returns:
the index of the list and the offset.
- get_num_columns() int#
Get the number of columns in the warehouse.
- Return type:
- Returns:
the number of columns in the warehouse.
- get_num_trays() int#
Get the number of trays in the warehouse.
- Return type:
- Returns:
the number of trays in the warehouse.
- get_pos_y_floor() int#
Get the y-position of the floor. It is used by the simulator to calculate the time it takes to move between columns and up and down.
- Return type:
- Returns:
the y-position of the floor.
- get_speed_per_sec() int#
Get the speed of the platform (config value). It’s used by the simulator to calculate the time it takes to move between columns and up and down.
- Return type:
- Returns:
the speed of the platform (config value).
- is_full() bool#
Verify if there is a space inside the warehouse.
- Return type:
- Returns:
Trueif there is a space inside the warehouse, otherwiseFalse.
- pop_column(index: int = -1) Column#
Remove a
Columnfrom the column container in the warehouse. If no index is given, the last column of the container is removed by default.- Return type:
- Parameters:
index (int) – the index of the column to pop.
- Raises:
IndexError – if the index is out of range or the column is empty.
- Returns:
the column of the warehouse removed.
- remove_column(value: Column)#
Remove a column from the container of the warehouse. If two or more values are the same, remove the first one found.
- Parameters:
value (Column) – the column to remove.
- Raises:
ValueError – if the column is not in a container.
- set_pos_y_floor(pos: int)#
Set the y-position of the floor.
- Parameters:
pos – new position of the floor.
- Raises:
AssertionError – if the
posparameter is not greater than or equal to zero.
- class automatic_warehouse.warehouse.MinimumOffsetReturns(index: int, offset: int)#
Python Dataclass - Values returned by the
Warehouse.get_minimum_offsetmethod.